Jump to content
  • Advertisement

Archived

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

ichor

Access violation how to access...

This topic is 5221 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 getting an access violation when trying to copy vertices over from one vertex array to another. The line of code is:
nodeVerts[0].verts[0] = vertArray.verts[0];  
nodeVerts and vertArray are both VertexArray's... the .verts is a struct, defined in VertexArray as: Vertex *verts; Now, I'm able to access other variables using similiar code (ie, nodeVerts[0].numberOfVerts = 10; ), so I'm pretty sure something is wrong with my access to the struct array. What am I doin' wrong? EDIT: code made a smiley face [edited by - ichor on April 5, 2004 11:31:34 PM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Quick guess...

you say Vertex *verts

did you allocate verts?

Share this post


Link to post
Share on other sites
Yep, that was it...when using it in a different area, I allocate and memset() it... forgot to this time. Whoops.

Thanks!

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!