Sign in to follow this  

Texture is not protected. using last loaded texture.

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

This topic is 3742 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this