Archived

This topic is now archived and is closed to further replies.

aaroncox1234

Vertex Buffers with DirectX 8.1

Recommended Posts

hi, im using textures for a little 2D game but im kinda confused about the vertex buffer thing. when i create the buffer, i have to specify the number of vertices, and when displaying a texture with DrawPrimitive, i have to specify how many primitives to draw. my problem is dealing with more than one texture. is there a better way to do it than having to change the vertex buffer and the call to DrawPrimitive every time i want to draw a new texture to the screen?

Share this post


Link to post
Share on other sites
Hi,

With SetTexture() function you can specify which texture interface to use when rendering the polygon. You can found more information from Microsoft DirextX documents or MSDN (http://msdn.microsoft.com/archive/en-us/directx9_c/directx/graphics/reference/d3d/interfaces/idirect3ddevice9/settexture.asp).

[edited by - Spoogy on May 19, 2004 4:08:15 AM]

Share this post


Link to post
Share on other sites