Best way to draw a grid

I’m working on a simple 3D editor.

I have four different views in it each one containing a grid.
The problem is that I dont really know how to draw the grids.

I’m looking for something similar to 3dsMax etc.

glDrawElements( GL_LINES, … )



is easier to use. GL_EXT_grid_primitive is required.


what about reading ANY OpenGL tutorial before postiong here such questions ?

AdrianD: I was asking for the best way not how ok?

Thanx V-man!


People tend to get upset if you post beginner questions on the advanced board. There is no such thing as EXT_grid_primitive, hes pulling your leg. A grid is a simple thing, and could be accomplished in any number of ways. The best way depends upon what you want to do with it. I believe there is a NeHe tutorial where he puts together a grid based game. Go take a look at that and maybe you will get some good ideas.

Good luck,

Old GLman

[This message has been edited by Old GLman (edited 12-02-2002).]

Asking for “the best way” in an unspecified manner is farily often a sign of a beginner in the area of question. Here’s a general software engineering hint: if it works for you, on your target platform, and you understand it and are sure it works correctly for all inputs, then it’s the best possible way to do it in your situation.

Only when it breaks, and you can’t come up with any reasonable alternatives by, say, reading a specification document and the result of some Google searches, is it a good idea to post about what “the best way” would be. At that point, you will be well prepared, having all kinds of data available. Then your question will sound like: “I’m doing this now, but it’s too slow when running on an S3 Savage; I tried doing that but it doesn’t look the same; do you have other suggestions for how to make the S3 faster or some other mechanism that’ll look the same?”

At that point, you’ll probably get loads of helpful, relevant replies. If you’re not at that point, then maybe the replies will indicate that you should do a little more homework, first.

Too funny, slap the guy who answers your question and thank the guy who takes the piss. I normally don’t go for troll but that was admirable V-man.

[This message has been edited by dorbie (edited 12-02-2002).]

I obviously made a big misstake here and I’m sorry for that.

I should have specified my question more since I already have a grid system runing and know a lot of different ways to do it. All I wanted was some opinions.

At last, let’s say that I am a beginner, even if I’m not, why pulling my leg?
Why not just redirect me to another forum, url etc?

Since this gone totally OT I rest my case and we better leave it here.

My apologys.