lunixbochs / glshim

OpenGL 1.x driver shim for OpenGL ES devices.
https://boards.openpandora.org/topic/11506-glshim/
MIT License
159 stars 32 forks source link

Glest 3.2.2 game armv7 rendering problems #132

Open MagaTailor opened 8 years ago

MagaTailor commented 8 years ago

Hi,

This game, the original Glest from 2009, runs perfectly on x86 using OpenGL 1.4. But on Odroid C1 (x11, mali) the game sort of works, but all the rendered parts are completely gray:

./glest 
libGL:loaded: libGLESv1_CM.so
libGL:loaded: libEGL.so
libGL: built on Aug 30 2015 11:08:44
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
libGL: GL_INVALID_ENUM when calling glGet<GL_FLOAT>(GL_TRANSPOSE_PROJECTION_MATRIX)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33274.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33274.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33274.00)
libGL: GL_INVALID_ENUM when calling glGet<GL_FLOAT>(GL_TRANSPOSE_PROJECTION_MATRIX)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33274.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33274.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33273.00)
stubbed glLightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, 33274.00)
libGL: GL_INVALID_ENUM when calling glGet<GL_FLOAT>(GL_TRANSPOSE_PROJECTION_MATRIX)

and so on.

Could this possibly be fixed?

lunixbochs commented 8 years ago

I'll run glest tonight and see if I can determine why it's gray.

MagaTailor commented 7 years ago

You seem to have lost interest, shall we close this?

lunixbochs commented 7 years ago

No. Hand injuries, will get to it. Try ptitseb's gl4es in meantime.

MagaTailor commented 7 years ago

Oh, terribly sorry to hear that. Please be more careful ;)

lunixbochs commented 7 years ago

1d/2d/3d texture binding should be tracked separately. glTexSubImage, etc should make sure the correct texture is bound

but glDraw*, glEnd also need to make sure all relevant textures are bound. I don't believe you can use 1d, 2d, 3d textures simultaneously as texture coords wouldn't apply to all. I assume games will usually only glEnable one of GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D at a time, but maybe checking how other implementations handle this would help.