sensi Posted August 25, 2003 Posted August 25, 2003 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. Quote
*Experts* mutant Posted August 26, 2003 *Experts* Posted August 26, 2003 Direct3D or DirectDraw? :) Quote
*Experts* mutant Posted August 26, 2003 *Experts* Posted August 26, 2003 When you create a surface simply specify the image file name: Dim imagesurface As New Surface(yourdevice, New Bitmap("image filename", Pool.Default) Quote
sensi Posted August 26, 2003 Author Posted August 26, 2003 Is there a way you can do that to the meshes? Would you apply the surface to a face of the mesh? Quote
*Experts* mutant Posted August 27, 2003 *Experts* Posted August 27, 2003 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. Quote
sensi Posted August 27, 2003 Author Posted August 27, 2003 Oh, OK I get it I wasn't sure if the .x file had the texture in them thanks for the help. Quote
*Experts* Nerseus Posted August 27, 2003 *Experts* Posted August 27, 2003 The x file generally just has a filename. If you look in the code generated by the Direct3D wizard, you'll 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 you'll get the code. -Ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.