Hi guys, i've modified the COpenGLDriver.cpp and SMaterial.h files to work with more than 4 texture layers, here the engine still running very well (video card is Geforce 9500M GS with 16 texture units), this change in the engine can cause problems to my games (when running in other video cards)?
When i change the MATERIAL_MAX_TEXTURES to 8 just 4 layers work, the glGetIntegerv(GL_MAX_TEXTURE_UNITS, &num) in COpenGLDriver.cpp does not return the correct value, is that a bug?
ps: my game will not support older video cards, just 2.0+ pixel/vertex shaders.
More than 4 texture layers, working.
-
andres
- Competition winner
- Posts: 78
- Joined: Tue Jul 08, 2008 5:18 pm
- Location: Guarapuava/Brazil
- Contact:
More than 4 texture layers, working.
Prof. Andres Jessé Porfirio
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net

Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net

in the openGL Extension handler class make clone the MaxTextureUnits variable (i.e. MTU2) and set it to 8. Then just make a new function in the openGL driver, basically a clone of setActiveTexture() (i.e. setActiveTextureShader() ) and make it use MTU2 instead of MaxTextureUnits so the limit is 8. Then in OpenGL GLSL renderer in the function that sets the active textures of a material (i think it is in OnSetMaterial() ) just swap the function from setActiveTexture() to setActiveTextureShader(). And then do a happy recompile!!! Do not set the texture limit above 16 or there will be tears.
-
andres
- Competition winner
- Posts: 78
- Joined: Tue Jul 08, 2008 5:18 pm
- Location: Guarapuava/Brazil
- Contact:
works fine now, i've setted MaxTextureUnits to 8.
thanks for response.
thanks for response.
Prof. Andres Jessé Porfirio
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net

Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net
