Lavos Posted April 27, 2013 Author Share Posted April 27, 2013 [VISUAL Basic 6]I'm trying to make a routine for a vertex array so i may draw 3d grid on a from using:```DrawPrimitive, D3DPT_LINELIST, 0, mapsize / 2```and the mapsize in parameter in the data. Can anyone point me to the right direction on create a vertex array to draw a grid?this is how i have it setup for now, i want it to be a tile grid with multiple polygons.Rendered Normal:[attachment=771:test1.png]Rendered Wireframe:[attachment=772:test2.png]I need it to look like this with the floor:[attachment=773:test3.png] Link to comment Share on other sites More sharing options...
Mal Posted April 28, 2013 Share Posted April 28, 2013 [http://gamedev.stack…elp-with-method](http://gamedev.stackexchange.com/questions/31714/drawing-2d-grid-in-3d-view-need-help-with-method)The next time you ask a question regarding how to do something you should make sure to include the language and the graphics library you're using; we can't read your mind, and the methods utilized to do what you're asking are as numerous as there are 3D libraries. Link to comment Share on other sites More sharing options...
Lavos Posted April 28, 2013 Author Share Posted April 28, 2013 thanks budweiser, this kinda helps me think of a method to build one. Link to comment Share on other sites More sharing options...
Lavos Posted April 28, 2013 Author Share Posted April 28, 2013 This is how i currently have it set up.```Public TileGird as D3DVERTEX```On the sub routine:```Public Sub Build_TileGrid(ByVal x As Long, ByVal y As Long, ByVal z As Long)Dim i As LongDim j As Long'we generate a grid with a random hight level for'each control pointFor i = -1 To 1 For j = -1 To 1 TileGrid(i + 1, j + 1).x = (i) * 1000 TileGrid(i + 1, j + 1).y = (i) * 1000 TileGrid(i + 1, j + 1).z = (j) * 1000 TileGrid(i + 1, j + 1).tu = (i + 1) / 2 TileGrid(i + 1, j + 1).tv = (j + 1) / 2 Next jNext iEnd Sub```Now I'm stuck at what step i need to do to draw everything. Can anyone help me create a formula? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now