Jump to content
  • Advertisement

Archived

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

goldsword

Direct Graphics - Surface Question

This topic is 5988 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

Does a DGFX surface contain the exact same thing as a DDRAW surface? Thus being able to acquire a pointer to the memory by locking it? Or is there a better (FASTER!) way of retrieving a pointer to the surface memory? ----------------------------------------------------------------- Some other qustions... (Q2) The DrawPrimitive() function takes a pointer to a vertexbuffer, an index and the type of primitive right... Why does it need an index? Since it could be coded like this instead... DrawPrimitive(&VertexBuffer[index],Type) Please, I''m a little confused here...

Share this post


Link to post
Share on other sites
Advertisement
The vertex buffer is not an array of vertices, anymore than a DirectDraw surface is an array of RGB triplets. Just as you need to lock a DirectDraw surface to get or set the actual image data, so do you need to lock the vertex buffer to get or set the actual vertex data. So saying &VertexBuffer[index] would generate an error.

~CGameProgrammer( );



Edited by - CGameProgrammer on January 29, 2002 4:13:18 PM

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!