Post

 Resources 

Console


DrawIndexedPrimitive Carl (3 replies, 0 views) (2000-Jun-26)
-
A question for you, is that your actual code, or did you write it from memory??? Your DrawPrimitive call renders a shape with 4 vertices, but your DrawIndexedPrimitive call renders a shape with 4096 vertices, and yet it only has 4 indices, From the code I can see you should only be rendering 4 vertices, so change 4096 to 4. Also why do you need to use iteration to set the VertIdx() array, you are only setting 4 values, but your obviously looping through and setting the same four elements in the array several times. And not only that, if your are going to do this then why don't you start and finish you 'i' and 'j' loops 1 number lower, because you are subtracting 1 from their values every time you use them. So what I would say is, if this is your actual code then you are wasting time by perfoming 2 loops (probably big loops aswell) to set the same 4 elements of an array to different values, you really need to fix this. Plus you are sending way too many vertices to the DrawIndexedPrimitive call when you only need to be sending 4 vertices at the most. If on the other hand this isn't your actual code then please copy and paste it to the message board, so we can help you more. It would be nice to see how big your 'i' and 'j' loops actually are, and how you get the values for mapverts() etc. As for using OpenGL in VB, well I've heard that it is very slow in VB compared to using it in C++, whereas you can actually get very good performance out of D3D in VB, nearly all the slowdown you'll experience with D3D in VB is the maths that you'll perform working things out (unless you don't have a 3D card, then it will be slow anyway) and you'll need to do the exact same math in OpenGL. But if your working in C++ then you should head over to the forums at <gamedev.net> and search for OGL vs D3D arguements, there are loads of them. ============================== Post your latest game news at <http://freeridedesign.cjb.net> ==============================


-
Up One Level | Back to Forum

RE: DrawIndexedPrimitive Noah Adler (0 replies) (2000-Jun-26)
RE: DrawIndexedPrimitive Corre (1 reply) (2000-Jun-28)
RE: DrawIndexedPrimitive Noah Adler (0 replies) (2000-Jun-28)

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