Jump to content


Photo

Opengl Es - System Freeze


  • Please log in to reply
9 replies to this topic

#1 spacechase0

spacechase0

    Member

  • Member
  • PipPip
  • 6 posts

Posted 22 February 2012 - 11:28 PM

I was trying to get SFML2 working on the Wiz. At one time it worked fine, but I was directly hacking the generated CMake files. At one point I added to the CMake files, and it's not working anymore. Even with using OpenGL ES without SFML's window module, it doesn't work.

It seems like it freezes after the first frame, and the only to leave the application is to reboot (and the normal shut-down screen doesn't appear). Any idea why this might be happening?

Code
Log

#2 Pickle

Pickle

    Mega GP Mania

  • X-treme Team
  • 4074 posts
  • Gender:Male
  • Location:Detroit, Michigan

Posted 23 February 2012 - 02:57 PM

I was trying to get SFML2 working on the Wiz. At one time it worked fine, but I was directly hacking the generated CMake files. At one point I added to the CMake files, and it's not working anymore. Even with using OpenGL ES without SFML's window module, it doesn't work.

It seems like it freezes after the first frame, and the only to leave the application is to reboot (and the normal shut-down screen doesn't appear). Any idea why this might be happening?

Code
Log


Since your only using it for a time delay add, try removing sfml and replace with SDL as a test, or even just let it run as fast as possible without either.
If your going to keep yourself within opengl-es api, why bother with nanoGL?

#3 spacechase0

spacechase0

    Member

  • Member
  • PipPip
  • 6 posts

Posted 23 February 2012 - 03:09 PM

Since your only using it for a time delay add, try removing sfml and replace with SDL as a test, or even just let it run as fast as possible without either.
If your going to keep yourself within opengl-es api, why bother with nanoGL?

Because I thought I needed it. :P Plus I think SFML's graphics module uses a lot of OpenGL 1 functions (although that might not be true with the latest graphics API changes).

Removing nanoGL and SFML didn't fix it. :( The log is here, but it's not much different other than no nanoGL messages.

#4 Pickle

Pickle

    Mega GP Mania

  • X-treme Team
  • 4074 posts
  • Gender:Male
  • Location:Detroit, Michigan

Posted 23 February 2012 - 03:32 PM

ok i think your swap buffers is wrong

you have:
eglSwapBuffers(myGlDisplay, myGlContext);

should be
eglSwapBuffers(myGlDisplay, myGlSurface);


#5 spacechase0

spacechase0

    Member

  • Member
  • PipPip
  • 6 posts

Posted 23 February 2012 - 03:34 PM

Wow... I can't believe it was that simple. :P

Thank you! :D

#6 Pickle

Pickle

    Mega GP Mania

  • X-treme Team
  • 4074 posts
  • Gender:Male
  • Location:Detroit, Michigan

Posted 23 February 2012 - 03:52 PM

Wow... I can't believe it was that simple. :P

Thank you! :D


No problem ;-)

Another thing not sure your aware, the OS_CreateWindow is just a malloc, so if you wanted to remove the call you can replace with something like

g_Window = (NativeWindowType)malloc(16*1024);

Also I put together a an EGL interface file for easy use of EGL across many platforms (including wiz/caanoo). Maybe its useful to you:
http://sourceforge.n...ojects/eglport/

#7 crow_riot

crow_riot

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1133 posts
  • Gender:Male
  • Location:.at
  • Interests:music & programming

Posted 24 February 2012 - 07:43 AM

ok i think your swap buffers is wrong

you have:

eglSwapBuffers(myGlDisplay, myGlContext);

should be
eglSwapBuffers(myGlDisplay, myGlSurface);


oh wow, nice find :)

#8 spacechase0

spacechase0

    Member

  • Member
  • PipPip
  • 6 posts

Posted 26 February 2012 - 03:48 PM

One more thing - I can't seem to find GLEW for the Wiz. Is it possible to build for the Wiz, or can it not be done with OpenGL ES? A quick search for GLEW in SFML gives me (other than initializing it):

GLEW_EXT_blend_func
GLEW_EXT_framebuffer_object
GLEW_ARB_shading_language_100
GLEW_ARB_shader_objects
GLEW_ARB_vertex_shader
GLEW_ARB_fragment_shader
GLEW_ARB_texture_non_power_of_two

If it can't, I guess I'll add a couple of #ifdef's. :P

#9 crow_riot

crow_riot

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1133 posts
  • Gender:Male
  • Location:.at
  • Interests:music & programming

Posted 26 February 2012 - 05:28 PM

add some ifdef's :)

the wiz only supports "opengl es 1.1 lite", which does not provide any of the extensions you mention here, so you'll be faster with #ifdef'ing

#10 spacechase0

spacechase0

    Member

  • Member
  • PipPip
  • 6 posts

Posted 26 February 2012 - 06:14 PM

add some ifdef's :)

the wiz only supports "opengl es 1.1 lite", which does not provide any of the extensions you mention here, so you'll be faster with #ifdef'ing

Ok. :) Thanks.