Ok, I am going to try and give you answer.
Thanks for help.
GLSL & VBO
Huuuu, something strange
When I test your function : LogGLInfoLog(...), nBytes is equal to 1, and so the log is null.
Morever, glValidateProgramARB do not do anything? When I call after this function:
glGetObjectParameterivARB(_id_sh, GL_OBJECT_VALIDATE_STATUS_ARB, &i_res),
i_res is not changed.
[Edited by - ArnoAtWork on July 13, 2005 11:47:59 AM]
When I test your function : LogGLInfoLog(...), nBytes is equal to 1, and so the log is null.
Morever, glValidateProgramARB do not do anything? When I call after this function:
glGetObjectParameterivARB(_id_sh, GL_OBJECT_VALIDATE_STATUS_ARB, &i_res),
i_res is not changed.
[Edited by - ArnoAtWork on July 13, 2005 11:47:59 AM]
I've posted below what I get when I compile a bunch of shaders on a GeForce FX with the latest drivers. The shaders the compile successfully seem to return the 1 byte message you mentioned. The ones that fail give the register limit exceeded error (and right now I get white on the screen for the ones that fail). This code used to dump the assembler generated from the GLSL compiler. Either nVidia turned that off in the driver, or perhaps the assembler dump was only given by my Radeon 9600.
As a side note, I replaced one of the shaders above with your shader code to see if there was anything wrong with them. The polygons all showed up in the correct places, and they were red as they're supposed to be. If you're still having a problem, it's in your code somewhere. It actually worked whether I used 1.0f or 1.0, though past versions of the driver have been more picky about that. If you want it to work on the widest range of video cards/drivers, use 1.0 (not 1, 1f, 1., or 1.f).
2005-07-14 09:15:15 Severity: INFORMATION Thread: 0x97CCompiling GLSL vertex shader shaders\SkyFromSpaceVert.glsl2005-07-14 09:15:15 Severity: INFORMATION Thread: 0x97CCompiling GLSL fragment shader shaders\SkyFromSpaceFrag.glsl2005-07-14 09:15:15 Severity: INFORMATION Thread: 0x97C2005-07-14 09:15:15 Severity: INFORMATION Thread: 0x97CCompiling GLSL vertex shader shaders\SkyFromAtmosphereVert.glsl2005-07-14 09:15:15 Severity: INFORMATION Thread: 0x97CCompiling GLSL fragment shader shaders\SkyFromAtmosphereFrag.glsl2005-07-14 09:15:16 Severity: INFORMATION Thread: 0x97C2005-07-14 09:15:16 Severity: INFORMATION Thread: 0x97CCompiling GLSL vertex shader shaders\GroundFromSpaceVert.glsl2005-07-14 09:15:16 Severity: INFORMATION Thread: 0x97CCompiling GLSL fragment shader shaders\GroundFromSpaceFrag.glsl2005-07-14 09:15:16 Severity: ERROR Thread: 0x97CFailed to link shaders shaders\GroundFromSpaceVert.glsl and shaders\GroundFromSpaceFrag.glsl2005-07-14 09:15:16 Severity: INFORMATION Thread: 0x97CVertex info-----------(0) : error C6001: Temporary register limit of 16 exceeded; 17 registers needed to compile program2005-07-14 09:15:16 Severity: INFORMATION Thread: 0x97CCompiling GLSL vertex shader shaders\GroundFromAtmosphereVert.glsl2005-07-14 09:15:16 Severity: INFORMATION Thread: 0x97CCompiling GLSL fragment shader shaders\GroundFromAtmosphereFrag.glsl2005-07-14 09:15:16 Severity: ERROR Thread: 0x97CFailed to link shaders shaders\GroundFromAtmosphereVert.glsl and shaders\GroundFromAtmosphereFrag.glsl2005-07-14 09:15:16 Severity: INFORMATION Thread: 0x97CVertex info-----------(0) : error C6001: Temporary register limit of 16 exceeded; 18 registers needed to compile program
As a side note, I replaced one of the shaders above with your shader code to see if there was anything wrong with them. The polygons all showed up in the correct places, and they were red as they're supposed to be. If you're still having a problem, it's in your code somewhere. It actually worked whether I used 1.0f or 1.0, though past versions of the driver have been more picky about that. If you want it to work on the widest range of video cards/drivers, use 1.0 (not 1, 1f, 1., or 1.f).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement