My renderer used to render geometry with the old fixed function stuff using glBegin/glEnd. After switching it to use vertex arrays via glVertexPointer et. al., my Cg shaders stopped showing up. If i just do a regular texture binding, it works fine, so the array data is solid. Also if I use the old glBegin/glEnd system, the Cg shaders work fine. Is there some consideration I am missing specific to vertex buffers?
Asked
Active
Viewed 240 times
2
-
How do you enable the vertex array? Are you using `glEnableClientState` rather than just `glEnable`? – mnemosyn Feb 07 '10 at 21:29
-
Yeah, I'm using glEnableClientState. The weird thing is that if I use the same exact method but with VBOs (calling glBindBufferARB and then passing NULL to glVertexPointer), it works fine. But I would like the option of using memory arrays in addition to hardware VBOs. – toastie Feb 07 '10 at 23:42
1 Answers
1
vertex data submission (Begin/End, regular VertexPointer+DrawArrays, VBO+DrawArrays) is supposed to be completely orthogonal to shaders (as long as you provide the data). So you're not really missing anything (especially if it works with VBO).
Your problem is likely somewhere that you don't mention.

Bahbar
- 17,760
- 43
- 62