glshim


Just as a test I rebuilt mednafen using this lib and its much slower than with software rendering... even the atari lynx module lags.
 
If OpenGL is just used for putting textures on the screen and doesn't do any meaningful rendering it'll actually be slower on the PowerVR GPU than regular software rendering iirc because texture loading is CPU-intensive.
 
Darn. I thought this could play games that use the Cube engine.

EDIT: Ah, I get it now.
 
Last edited by a moderator:
It will be worth it once someone ports AssaultCube using it and correctly configures the controls. There is still a fairly large online community.
 
I tried a bit harder to get games running with linuxbochs's OpenGL libs.

I tried with Cataclysm_tiles. I had to inibit some call do glDrawBuffer:


glReadBuffer (GL_FRONT);
glDrawBuffer (GL_BACK);
glCopyPixels (0, 0, window_width, window_height, GL_COLOR);
 

 

I commented the whole block.

It link fine after that, but segfault at start :(

 

I retried also on FreeSpace2_Open.

There where a few call to glGetTexLevelParameteriv and friend...

a few glVector4f commented...

 

The, the game won't start because it detect an OpenGL v0.0 where it need 1.2. 

It use this code


Code:
ver = (char *)glGetString(GL_VERSION);
sscanf(ver, "%d.%d", &major, &minor);


 

The glGetString give the GLES-CM version string, so it fail getting the version (it would get 1.1 if it succeed anyway). I forced to 1.2

Now, the game complain the ARB_MULTITEXTURE extension is not available... I haven't checked yet how it does the check.



So, still no luck for now.
 
Last edited by a moderator:
Imho, the best option to do this is to create a GLES backend for mesa... So everything will either be supported or use the software version that mesa provide...
 
Imho, the best option to do this is to create a GLES backend for mesa... So everything will either be supported or use the software version that mesa provide...
Yes, but that sound like a huge job ! But a GLES Galium drivers sounds nice...
 
Imho, the best option to do this is to create a GLES backend for mesa... So everything will either be supported or use the software version that mesa provide...
There *is* a GLES backend for MESA. It's nice in theory. I think someone tried it earlier and reported almost no performance increase over pure MESA.

This project has a much simpler pipeline and is a great candidate for performance hacks. Not to mention I already have a large amount of the 1.x spec working.
 
Last edited by a moderator:
Just compile your program with the normal gl lib provided by eg sebt3s toolchain and afterwards use lunixbochs libgl instead when running on Pandora.
 
EDIT: Seems most of these functions aren't required, depth range is used, but set to 0 -> 1 which is possibly default, so I've stopped the requirement of these functions and it doesn't error exit, but hangs instead with some blocks on the screen (possibly where text should be). Needs to be looked into further!

I tried AVP (linux version), compiled to Pandora (it doesn't statically link against GL, instead you can specify the GL library to use on the command line at runtime, so I just pointed it at the provided libibGL.so.1 in this thread). I was pleased to see that the initial front end/profile select renders and is usable, however when I attempt to enter a level I get:

glColor3fv not found

glColor4fv not found

glDepthRange not found

glDrawBuffer not found

glDrawRangeElements not found

glPolygonMode not found

glReadBuffer not found

glTexCoord2fv not found

glTexCoord3f not found

glTexCoord3fv not found

glTexCoord4f not found

glTexCoord4vf not found

glVertex2fv not found

glVertex4fv not found

glVertex4f not found

glVertex4fv not found

Unable to load OpenGL Library: missing function glColor3fv

I haven't investigated any further.
 
Last edited by a moderator:
Okay, so I looked into the hang, annoyingly it freezes up the Pandora, so can't use GDB on the device itself to get anything useful, however I tracked it down to a call to:

SDL_GL_SwapBuffers

When I step over this function it locks up. I guess the swap buffer function flushes the previous frames graphics commands and perhaps something in there gets into an infinite loop or something? Just guessing really.

Is there anywhere I can go from here? Or should I just await a new version of the lib with the hope it may get further?
 
Okay, so I looked into the hang, annoyingly it freezes up the Pandora, so can't use GDB on the device itself to get anything useful, however I tracked it down to a call to:

SDL_GL_SwapBuffers

When I step over this function it locks up. I guess the swap buffer function flushes the previous frames graphics commands and perhaps something in there gets into an infinite loop or something? Just guessing really.

Is there anywhere I can go from here? Or should I just await a new version of the lib with the hope it may get further?
if SDL_GL_SwapBuffers doesnt call EGL_SwapBuffer behind the scene (which it doesnt), you probably have to chane the call.
 
Okay, so I looked into the hang, annoyingly it freezes up the Pandora, so can't use GDB on the device itself to get anything useful, however I tracked it down to a call to:

SDL_GL_SwapBuffers
if SDL_GL_SwapBuffers doesnt call EGL_SwapBuffer behind the scene (which it doesnt), you probably have to chane the call.
It calls glXSwapBuffers, which I override. The point is you shouldn't need to change calls :)

Steven, can you zip or tarball the AVP binaries for me? I can fix any issues I find. On another note, did you use libpreload?
 
Last edited by a moderator:
Back
Top