Mixing VAR and VertexProgram Problem

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

David

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

Originally posted by Sancho:
[b],

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

[/b]

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 ?

Well probably nobody has ever heard about such a problem.
Maybe it is a driver bug.

Can you tell me something more about your error? FX5200 works well with all vbo & cg samples.

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.

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 ). 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