Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectX WorldObject Overview - Concept

Started by TristanRhodes Dec 21, 2004 at 9:34 AM 0 replies 500+ views
Original Post
TristanRhodes
TristanRhodes
I'm relatively new to directX, to the point where I am working with Indecies, Vertices, and Textures. Now, assuming I have these, an object that will be rendered to the device will require a VertexBuffer, an IndexBuffer (Depending on rendering mode, as some modes no not require indecies), and a buffered Texture. Now, these will all be built at run time from the Vertex and Index lists, and the assigned texture. The vertex and Index buffers can be built from the two lists above which will be unique to the world object. The texture buffer is slightly more complicated, as I do not want to duplicate textures in the buffer. So i'll need some kind of texture management component to buffer all my needed textures and assign them to the appropriate object when they are built. So: 1) 10 different objects each sharing the same texture would need to pull the texture from a pool managing the texture buffers. 2) 10 Identical objects would need to render the same object 10 times using different translation matrixes to describe their location. I'm working with C# at the moment, and I can't seem to create Texture using the Texture builder, from a memory stream to an internal bitmap. I posted in the newbie forum about it, but i'm not sure it's in the right place. Anyway, if anyone could tell me if i'm going about this the right way, and possibly give me feedback. I've only been at it a few days, but DX + D3D is really getting me hooked. I'm just falling over on the larger program structure atm. Cheers Tristan
Trip99
Trip99
A texture manager is definately a good idea. It should load textures and handle duplicate textures etc. as you describe so textures are not loaded more than once. So yes you are going about this the right way.
------------------------See my games programming site at: www.toymaker.info

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.