PDA

View Full Version : ZenGL and OpenGL ES



Andru
02-03-2011, 11:27 AM
So, as I said before, I started to work on OpenGL ES render. First step is initialization and some small changes in ZenGL code for adding OpenGL ES render. And when I started to work I got a problems with emulation... I was hoping that AMD Catalyst driver will provide me OpenGL ES 1.1, but it not... only OpenGL ES 2.0 and with some problems - GL_RENDER, GL_VERSION and list of extensions are empty :) Ok, I switched to PowerVR SDK... and OMG, it wants for libEGL and libGLES_CM old libpng12 and libjpeg6 >_< WHY? Other problem - SDK has only 32-bit libraries... After some search in AUR I found lib32-libpng32 and lib32-jpeg6. Finally I hoped that all problems are gone and I will start to work, but nope... This SDK has extension GL_OES_blend_func_separate, but I can't get functions glBlendEquation and glBlendFuncSeparate via eglGetProcAddress, seems I need to register on their forum and start yelling "WTF is this" :) Also, as you can see, GL_MAX_RENDERBUFFER_SIZE is much bigger than GL_MAX_TEXTURE_SIZE, and this is also a bug of PowerVR SDK.

So, here is a mix of ZenGL and PowerVR console output. Next step will be rendering some stuff via vertex arrays :)


==============================
=== ZenGL 0.2 (2011.02.27) ===
==============================
Begin
XOpenIM - ok
XCreateIC - ok
Current mode: 1920 x 1080
Egl scizka: /usr/lib32/libEGL.so
eglChooseConfig: zDepth = 24; stencil = 0; fsaa = 0
vendor/shl: Imagination Technologies (Host GL: `ATI Technologies Inc.`)
vendor/shl: OpenGL ES 1.1 ( SDK build: 2.07.27.0297)4.1.10428 Compatibility Profile Context`)
bufek withs es1 exts: OGLES1 EXTENSIONS: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_matrix_get GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_point_sprite GL_OES_point_size_array GL_OES_matrix_palette GL_OES_draw_texture GL_OES_query_matrix GL_IMG_read_format GL_IMG_texture_compression_pvrtc GL_IMG_texture_format_BGRA8888 GL_OES_texture_env_crossbar GL_OES_texture_mirrored_repeat GL_OES_blend_subtract GL_OES_blend_func_separate GL_OES_blend_equation_separate GL_OES_stencil_wrap GL_OES_extended_matrix_palette GL_OES_stencil8 GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_texture_cube_map GL_OES_compressed_ETC1_RGB8_texture GL_OES_mapbuffer GL_EXT_multi_draw_arrays GL_OES_framebuffer_object
vendor/shl: Imagination Technologies (Host GL: `ATI Technologies Inc.`)
vendor/shl: OpenGL ES 2.0 ( SDK build: 2.07.27.0297) 4.1.10428 Compatibility Profile Context`)
vendor/shl: OpenGL ES GLSL ES 1.00 ( Host GL: `4.10`)
GL_VERSION: OpenGL ES-CM 1.1
GL_RENDERER: PowerVR PVRVFrame ATI Radeon HD 5800 Series `) SDK Build: 2.07.27.0297
GL_MAX_TEXTURE_SIZE: 2048
GL_MAX_TEXTURE_UNITS_ARB: 4
GL_EXT_TEXTURE_FILTER_ANISOTROPIC: FALSE
GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: 0
PVRVFrameSetGlesLibraryPath: /usr/lib32/libGLES_CM.so
PVRVFrameSetGlesv2LibraryPath: /usr/lib32/libGLESv2.so
GL_OES_BLEND_FUNC_SEPARATE: FALSE
GL_MAX_RENDERBUFFER_SIZE: 16384
GL_OES_FRAMEBUFFER_OBJECT: TRUE
Support WaitVSync: TRUE
Screen options changed to: 800 x 600 windowed
Average FPS: 11797
Timers to free: 2
Textures to free: 2
End

gintasdx
02-03-2011, 08:07 PM
It would be really nice to see ZenGL running on Android devices :)
Goodluck!

Andru
03-03-2011, 12:45 AM
It would be really nice to see ZenGL running on Android devices
Maybe some day... :)

So, here the "next step"(at left side you can see PowerVR debugger):
http://zengl.org/history/zengl_opengles01s.png (http://zengl.org/history/zengl_opengles01.png)
Render now works(even LightEngine 2D (http://www.pascalgamedevelopment.com/showthread.php?6480-Dynamic-2D-Shadows) works :)), but it slower than original OpenGL render with glBegin/glEnd, so I will try to optimize it in future.
Another problem which I got - seems Maemo don't have OpenGL ES 1.1(libGLES_CM.so), only libGLESv2.so is present... so, maybe I will think how to implement OpenGL ES 2.0, which wants shaders almost everywhere :)

billwillman
05-03-2011, 05:11 AM
Very Cool. I am writing OpenGL ES FrameWork,too. Can you find "libGLESv2.dylib" and "libGLES_CM_NoE.dylib" ?I search this from Google, but I can''t find it.

Andru
05-03-2011, 10:58 AM
I also have tried to find it, but no luck. Reading the google results I can say that one of this libraries(libGLESv2.dylib) can be built from source code of Mesa and it will work in software mode. Also you can try to use iOS OpenGLES.framework(it work in software mode) which ships with iOS simulator. Anyway, developing OpenGL ES projects under MacOS X/iOS little bit harder, because this OS'es wants EAGLContext via Cocoa, which wants Objective-Pascal and so on :)

billwillman
05-03-2011, 01:26 PM
o, it is a bad message. EAGLContext is used by Cocoa. Carbon haven't it.

Andru
06-03-2011, 01:51 AM
First experience with Windows Mobile. There are a lot of work to do, but someday it will work fine :)
http://zengl.org/history/zengl_wince01s.png (http://zengl.org/history/zengl_wince01.png)

wagenheimer
06-03-2011, 11:28 AM
Wow!!!! Very very nice!!! I will really use ZenGL for Windows Mobile ports of my games when this is ready! =)

Does this provider will allow to make games to MeeGo?

Intel is giving $500 for the first 100 programs published in the Intel AppUp for MeeGo!

code_glitch
06-03-2011, 11:39 AM
Indeed, that does spark a major interest. Especially if it works on meego. (meego user here although I hate zypper/yum since I'm an APT person XD)...

Andru
06-03-2011, 12:55 PM
Does this provider will allow to make games to MeeGo?
MeeGo is "just" a Linux for ARM, so I think with little modifications it will work, if there are libEGL.so and libGLES_CM.so. For now I have only Maemo SDK installed, but it doesn't support OpenGL ES inside emulator(and because of that I'm looking for OpenGL ES with software rendering like one above inside Windows Mobile emulator). MeeGo SDK seems does(via qemu-gl), but I haven't it yet. When I done bigger part of ZenGL wiki, on which I'm working now, I will allocate some time for mobile platforms, because it's really fun :)

code_glitch
06-03-2011, 01:36 PM
Although it is proprietary, have you had a go on vmware player? From what I've seen OpenGl plays rather nicely with it on my ubuntu, XP, DOS and fedora VMs... I figured Meego would be 'just' another linux distro but from test I did, it can do some weird things in response to normal code. Probably due to intel and co making some weird default packages. I mean, have you seen the procedure to let it play MP3 files? Its seriously wacko.

Andru
06-03-2011, 02:16 PM
Although it is proprietary, have you had a go on vmware player?
Nope, I don't like this VM and because of that I'm prefer VirtualBox :) And OpenGL just works fine in VirtualBox too.


I mean, have you seen the procedure to let it play MP3 files?
I think this is not a problem of MeeGo. If you can compile, e.g., libmad and use it - you will be able to play MP3-files :)

code_glitch
06-03-2011, 02:33 PM
No its not that so much as they don't include any of the repositories or dependencies for ffmpeg, gstreamer or libmad. You have to get everything yourself which is not difficult but it puts into context how much is missing since my core 2 took 50minutes to completely finish installing and compiling everything. I mean, have you ever come accross a 50min compile time for a simple codec before? Because I sure have not. The longest compiles were those for vmware and they only took 5-10mins.

Lol, now I think of it, my distribution upgrade from 9.10 to 10.04 took less time than that...

Andru
11-03-2011, 07:09 PM
Here (http://zengl.org/history/zengl_wince_demo01.zip) the first WinCE demo(software and hardware version). It must start as a fullscreen application and close by pressing Enter(joystick main button? I don't know, because I haven't device with WinCE :)). Don't try to rotate device, because ZenGL for now doesn't support reposition of window. Also for now you can't(with svn version of ZenGL for WinCE):
- use dynamic linking with ZenGL.dll
- use units zgl_joystick.pas, zgl_textures_jpg.pas, zgl_sound.pas, zgl_sound_wav.pas and zgl_sound_ogg.pas