Post

 Resources 

Console


How to create a simple cube in immediate mode? Spaghetti (1 reply, 0 views) (2000-Jul-15)
-
All i want is someone to show me the code to draw the cube, I have already got 3D plains in but now I want to try using cubes. Please help. this is how my code looks... Public Sub CreateSurface(X1 As Single, Y1 As Single, X2 As Single, Y2 As Single, X3 As Single _ , Y3 As Single, X4 As Single, Y4 As Single, Zoom As Single) Surface(0, 1) = LVertex(Vector(X1, Zoom, Y1), DX.CreateColorRGBA(1, 1, 1, 1), 0, 0) Surface(0, 2) = LVertex(Vector(X2, Zoom, Y2), DX.CreateColorRGBA(1, 1, 1, 1), 0, 0) Surface(0, 3) = LVertex(Vector(X3, Zoom, Y3), DX.CreateColorRGBA(1, 1, 1, 1), 0, 0) Surface(0, 4) = LVertex(Vector(X4, Zoom, Y4), DX.CreateColorRGBA(1, 1, 1, 1), 0, 0) Device.SetRenderState D3DRENDERSTATE_FILLMODE, D3DFILL_SOLID Device.DrawPrimitive D3DPT_TRIANGLESTRIP, D3DFVF_LVERTEX, Surface(0, 1), 4, D3DDP_DEFAULT End Sub


-
Back to Forum


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