PDA

View Full Version : Mixing VAR and VertexProgram Problem



Sancho
06-12-2003, 05:30 AM
Hi,

I have a strange problem with my 3D engine when I use a simple ligthing vertex program to render a cube. The function glDrawRangeElements() generate an OpenGL error the first time is called but the next calls will not generate error...and then I see what I expected.

Any idea ?

Moreover when I cgGet the parameters of my bound program, I find uniform parameters with strange name ($C_17$...). This problem occurs since I have changed my graphics card http://www.opengl.org/discussion_boards/ubb/frown.gif

David

NB: Unfortunately I have a GeForce Fx 5200 with the last 43.03 driver working on windows XP

Sancho
06-12-2003, 06:25 AM
Originally posted by Sancho:
,

Moreover when I cgGet the parameters of my bound program, I find uniform parameters with strange name ($C_17$...). This problem occurs since I have changed my graphics card http://www.opengl.org/discussion_boards/ubb/frown.gif



The program that I use is the cg_simple lighting program and the unexpected parameters are contant called $C_9$ and $C_10$.

Have you ever seen such a problem ?

Sancho
06-12-2003, 10:25 PM
Well probably nobody has ever heard about such a problem.
Maybe it is a driver bug.

M/\dm/\n
06-13-2003, 05:19 AM
Can you tell me something more about your error? FX5200 works well with all vbo & cg samples.

jwatte
06-13-2003, 04:09 PM
You don't give enough information about the error. In fact, from what information you give us, it seems much more likely that you have a problem in your own code (such as with EnableClientState or similar state management) than it being a driver problem.

Perhaps the error you get is from something you do earlier in the program.

Sprinkle assert(!glGetError()) (or something to that effect) liberally around your code; at a minimum, before the return of each function that calls OpenGL. This will let you track down what's going wrong as early as possible.

Sancho
06-15-2003, 10:43 PM
Originally posted by jwatte:
Sprinkle assert(!glGetError()) (or something to that effect) liberally around your code; at a minimum, before the return of each function that calls OpenGL. This will let you track down what's going wrong as early as possible.

It is what I do.

My probleme was that when the first time I create the program, I load It but I didn't bind it (I forgot it http://www.opengl.org/discussion_boards/ubb/frown.gif ). The next times I only bind the program ! That is why the first time I did glDrawRangeElement(), it generated an OpenGL error ! MEACULPA !

Nevertheless my second problem on unexpected parameter (named "$C_7$", "$C_9", etc..) still happening !
Any idea on this last (drive) problem ?

Thanks David