PDA

Click to See Complete Forum and Search --> : DirectX in VB?


JungleMan
Nov 19th, 2001, 09:03 PM
Is this possible? :D

Zaei
Nov 19th, 2001, 09:19 PM
Of course. =)

Z.

Ph34R
Nov 22nd, 2001, 11:35 AM
download the DirectX8 SDK from microsofty ;P

http://msdn.microsoft.com/downloads/default.asp?url=/downloads/topic.asp?URL=/msdn-files/028/000/114/topic.xml&frame=true

ive been up day and night trying to figure out how to load textured models, without luck so im probably gonna resort to OpenGL ;o (probably better anyways...)

Zaei
Nov 22nd, 2001, 12:25 PM
There is pretty much no difference between D3D and OGL in graphics speed. On the other hand, D3D is FAR easier to use in VB, as it is directly supported (OGL would be like using the API, you have to get all of the function declarations "Declare"d in VB first.

As for texturing models, make sure tht your model has Texture coordinates, by loading some random texture from a file (remember, it has to be a square texture, with dimnesions that are powers of two), and set that texture before you draw the model. If the texture shows Up, you know the model is correct. Then, you should take a look through the SDK samples (the code), to find where they load a model (there is a tutorial on this as well). If I remember correctly, using the D3DX model loading function, there should be a parameter where you pass in a string (dont quote me, i dont have any code availible to me, at the moment) to get the texture paths. Using that string, extract the filenames, and load those textures, and go from there.

Again, read through the model loading tutorial, and browse the samples, and you should be able to get it easily.

Z.

Zaei
Nov 22nd, 2001, 12:37 PM
Well, I just took a look at the online Docs, and did some research for you. You pass in a buffer (retMaterials). Inside of this buffer are the materials and texture paths. You can get those using several more D3DX functions: D3DX8.BufferGetMaterial, and D3DX8.BufferGetTextureName.

Enjoy!

Z.

Sastraxi
Nov 22nd, 2001, 02:59 PM
What part of DirectX are you looking into? DirectAudio, Direct3D, DirectDraw(7), DirectPlay?