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

Problems by using big texture size...

Started by Chris_V Oct 19, 2000 at 12:04 AM 1 replies 550+ views
Original Post
Chris_V
Chris_V
Hello, That''s my project : I "DrawIndexedPrimitive" a world composed by 25921 vertices... and I texture it with one texture. 1. If I load "D3DXCreateTextureFromFile" a 256*256 or smaller texture, all works fine.... but if I try to use a bigger one (512*512), I have an access violation !!! So I try to retrieve information from the device (GetCaps) and it returns to me that I can use up to 1024*1024 texture''s size ! What is the problem ? How can I allocate correctly memory for the texture ? 2. What are the advantages of using a Vertex Buffer ? 3. What are the limits of Vertices number to draw with one call of DrawIndexedPrimitive ? Thanks in advance for some help. Christophe Vuignier Swisscom.com
Christophe VuignierSwisscom.com
Ridcully
Ridcully
i can''t answer your first question, but i''ll try to for your second and third one

2. if you need the geometry stored in a vb several times, you can use ProcessVertices to transform the vertices for rendering and reuse the result several times in the same cycle

3. D3DMAXNUMVERTICES (0xFFFF). but you shouldn''t pass that many vertices at once, better split it up in small chunks, or the hardware accelerator will have nothing to do while waiting for the data to arrive

rid
havoc
havoc
Answer to first question:
Not all videocards can work with large texture
You must determinire maximal supported texture size. AFAIR, SDK have tool, which can show to you capabilities of your video card

Topic Locked

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

Sign in to reply to this topic.