Jump to content
  • Advertisement
Sign in to follow this  
snoddas14

Texture is not protected. using last loaded texture.

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

hey. when i load my vertexbuffer whit one texture and lets say we load the "blue.jpg" picture and then i create a new class and do a new commando for the vertexbuffer initalation and then i set it whit the "red.jpg" picutre. both of them will get the Red picture or the last one wrote on the command. in my vertex class i have set the LPDIRECT3DVERTEXBUFFER9 Device under Private. and the LPDIRECT3DTEXTURE9 under protected. and still it aint working. help is needed.

Share this post


Link to post
Share on other sites
Advertisement
The texture has nothing to do with the vertex buffer at all. You need to set one vertex buffer and texture, draw vertices, then change the texture (and vertex buffer if you need to) and draw more vertices. The texture isn't referenced by the VB in any way.

The "private" and "protected" modifiers don't change the data at all, they just mean that various other classes can't access that particular instance of the variable.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!