Release Out of Order


Mmmm, not sure.


In source/Engine/graphics.cpp line 558, change the 32 to 16 (or 0) in the SDl_SetVideoMode to be sure you are in 16bpp mode.


oh, also in eglport.cpp, line 273, remove the "800, 480" to put back the "width, height"... in fact no, it will not work like that, you'll also had to enable width and height in the function header line 179, and also in the eglport.h and then add realWinWidth and realWinHeight in the EGL_Init call line 569 in graphics.cpp
 
Last edited by a moderator:
The first one wasn't enough and the 2nd (in a moment) probably requires changing the EGL_Init declaration as right now it only takes void? Or did you mean EGL_Open?
 
Last edited by a moderator:
I managed to get it to compile even after passing realWinWidth, realWinHeight to EGL_Init after some more hacking but it didn't help either :)


Thanks anyway, I opened an issue with the project on github; maybe it can be made to work at any colour depth.
 
I managed to get it to compile even after passing realWinWidth, realWinHeight to EGL_Init after some more hacking but it didn't help either :)


Thanks anyway, I opened an issue with the project on github; maybe it can be made to work at any colour depth.

You still get the same error at the creation of the window surface?


If yes, you can try to create a file name eglport.cfg in current folder and change values.


Here are the default:


size_red=5
size_green=6
size_blue=5
size_alpha=0
size_depth=16
size_buffer=16
size_stencil=0


Try to change things (maybe it's not a 565 but a 5551 16bpp you have?


*EDIT* On second thought, that error "EGLport ERROR: unable to get window!" is on line 625, that means the handle of the X11 Windows that should be created by SDL is not there (it's NULL). Strange. Is the SDL_InitVideoMode successfull? Do you see the creation of that window ? (And be sure your SDL is compiled with X11 support).
 
Last edited by a moderator:
Right now I'm still getting:

  • EGLport ERROR: unable to get window!
  • EGLport ERROR: Unable to obtain native window!

And I don't see the creation of any window. The SDL lib is fully functional otherwise.


Using a custom eglport.cfg prints:

EGLport:  set to 0.
EGLport:  set to 0.
EGLport:  set to 0.
EGLport:  set to 0.
EGLport:  set to 0.
EGLport:  set to 0.
EGLport:  set to 0.
 
If I just wanted to hard-code 16bpp which parts of your diff should be enough?
 
Most of the changes are related...


I still think you should focus on the SDL_SetVideoMode line in graphics.cpp. If you don't see a windows created, and eglport neither, that probably means something goes wrong here, and no real windows is created there...
 
I think I'm going to revert to the fixed resolution state cause it seems strange I had to pass anything to EGL_Init 
 
Should it matter I'm just recompiling the binary and not using the patched .frag files?
 
Uncommenting the lines in eglport.cpp (341-345) immediately leads to `EGLport ERROR: unable to get window!`      


In case it's a question of capabilities could you look at eglinfo? Maybe the CFG values are wrong.                   

View attachment eglinfo.txt
 
Interesting. I see you support both 565 and full 32bits mode, but all the mode are using 24bits depth + 8bits stencil. So setup like that for a try (instead of 16bits depth and 0 stencil).
 
Didn't help unfortunately. Are there any env vars that could be set to get more debug info from SDL/X11? 


I've just remembered about a single other GLES2/SDL 1.2 app that's seems to start @ 16bpp - hcraft. Wonder what it's doing right...       


EDIT One thing it's doing differently is using the root window.                                             
 
Last edited by a moderator:
Didn't help unfortunately. Are there any env vars that could be set to get more debug info from SDL/X11? 


I've just remembered about a single other GLES2/SDL 1.2 app that's seems to start @ 16bpp - hcraft. Wonder what it's doing right...                                                            

hcraft is using Irrlicht engine. The creation of the context is handled by Irrlicht itself (and I don't remember any magic inside that engine).
 
Last edited by a moderator:
Alright, without any additional debug info I'm not going to find out why it's failing. Let's wait to hear from the sludge engine's maintainer. (hopefully) 
 
Alright, without any additional debug info I'm not going to find out why it's failing. Let's wait to hear from the sludge engine's maintainer. (hopefully) 

mmm, there is no activity for an entire year, so not sure...


I'm pretty sure it can be debugged. The error is due the the lack of a X11 window handler. I'm sure it's something simple. At least, add some printf after the SDL_SetVideoMode to print the @ of the surface that is generated.
 
Ok, I can see now all available fields of the struct - what's the best place for this printf then? (if still getting `EGLport ERROR: unable to get window!`)
 
Last edited by a moderator:
Back
Top