开发者

Cg shaders not being applied after switch to glVertexPointer

开发者 https://www.devze.com 2022-12-19 05:32 出处:网络
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 s

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号