Sign in to follow this  

adding a bitmap to a drawing

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

Hi, I'm new to DirectX so sorry if this is a stupid question. I'm trying to draw stuff and add a bitmap (texture) at the same time. After I draw some rectangles I say: this.OnCreateVertexBuffer(vb, null); device.SetTexture(0, tex); device.VertexFormat = CustomVertex.PositionColoredTextured.Format; device.SetStreamSource(0, vb, 0); device.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 2); but the rectangles vanish just after OnCreateVertexBuffer(); though the bitmap does appear. What do I need to do so that I can have both my rectangles and the texture at the same time? Let me know if you need more of my code to see what I'm screwing up. Thanks so much! Mel

Share this post


Link to post
Share on other sites

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