Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

  • *Experts*
Posted

When you create a surface simply specify the image file name:

Dim imagesurface As New Surface(yourdevice, New Bitmap("image filename", Pool.Default)

  • *Experts*
Posted
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.
  • *Experts*
Posted

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

"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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...