Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

fatgraham

glVertexAttribPointerNV has no effect

This topic is 5223 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m trying to set attrib data onto my vertexes for my vertex program (I''m using the NV vertex program at the moment rather than ARB) But the data is all 0''s in the program (I''m testing by setting the colour to the attrib, and it just comes out black) I''m using attrib #6 as it doesnt conflict with anything else (in case that was the problem) There seems to be little documentation on this so I''m a bit stuck, is there anything I should know about? this is the basic order of my rendering; could I have left out anything I need? glEnableClientState( vertexes ) glVertexPointer() glEnable( GL_VERTEX_PROGRAM_NV ) glBindProgramNV( GL_VERTEX_PROGRAM_NV, program ) glEnableClientState( GL_VERTEX_ATTRIB_ARRAY6_NV ) glVertexAttribPointerNV( 6, 4, GL_FLOAT, 0, pdata ) glDrawElements() I do error checks at each step and nothing comes up. The only thing I haven''t tested is using attrib pointer instead of vertex pointer, but I think I can use them both at the same time can''t I?

Share this post


Link to post
Share on other sites
Advertisement
There are some simple examples using vertex attributs & nv_vp at nutty's site. But personaly I would just forgat about NV_VP... Just use ARB verison.. it's much better.

You should never let your fears become the boundaries of your dreams.

[edited by - _DarkWIng_ on February 7, 2004 12:55:12 PM]

Share this post


Link to post
Share on other sites
I started with the NV version, so I wanted to finish with it. I''ll change over to ARB now that its all working

For reference, I fixed the problem with a few changes;

1) you cannot use glVertexPointer and mix it with glVertexAttribPointer. I Changed my references of glVertexPointer with an applicable attrib pointer

2) I was using VBO''s at the same time, but that code needed updating and conflicted with the shader things (I haven''t investigated this, just disabled its use)

3) I think theres a 3 but I''ve forgotten it

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!