adding pictures to surface in DirectX

sensi

Member
Joined
Aug 25, 2003
Messages
6
Hey guys,

I am just starting to learn Managed DirectX9.0a and i was wondering how you would go about adding a picture to a surface in DirectX. If you could point me to a website or tell me what it is called exactly that would would be great. Thanks.
 
When you create a surface simply specify the image file name:
Code:
Dim imagesurface As New Surface(yourdevice, New Bitmap("image filename", Pool.Default)
 
Is there a way you can do that to the meshes? Would you apply the surface to a face of the mesh?
 
You cant apply surfaces to meshes. You can apply textures, but if you are using the X file format and the Mesh class it will already have all the texture info and the textures will be mapped. You dont have to worry about that.
 
The x file generally just has a filename. If you look in the code generated by the Direct3D wizard, youll see the code needed to load the textures (plus a whole lot more!). Just create a new DirectX project and choose to add a mesh and youll get the code.

-Ner
 
Back
Top