Post

 Resources 

Console


RE: DrawIndexedPrimitive Noah Adler (0 replies, 0 views) (2000-Jun-26)
-
Well, yes this is actual code, but the reason for the sloppiness (e.g. subtractions in every iteration) is that I've greatly modified the code since I started, and I also don't plan on actually using this scheme in anything for real. I basically just wrote it to familiarize myself with Direct3D features like multitexturing, alpha blending, etc. Now I thought about that sending 4096 vertices part, but how can I send less?? That array holds the vertices for the entire map. Besides, I would assume sending 4096 vertices with this call is about the same as sending only a few vertices, because shouldn't it just use a pointer to the first vertex anyway? In the docs, the C++ call takes a pointer to the array, which would make sense...I just assumed that the VB wrapper works the same way, except abstracting the pointer stuff. (Am I making any sense? :) Oh well) In other words, there should be no reason to copy 4096 vertices. Thus there shouldn't be this huge slowdown. Correct me if I'm wrong (please!), but I'm guessing something else is the problem. And just to reiterate, I know I'm wasting my time with the looping. I'll be implementing quadtree culling soon enough, in my real engine. I just whipped this thing together to test/learn Direct3D. Thanks again, Noah Adler


-
Up One Level | Back to Forum


Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 154 visitors within the last 20 minutes
RSS News Feed