PDA

View Full Version : Best way to draw a grid



qiz
12-01-2002, 02:15 AM
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.

jwatte
12-01-2002, 06:52 PM
glDrawElements( GL_LINES, ... )

V-man
12-01-2002, 07:39 PM
glBegin(GL_GRID_EXT);
.....
glEnd();

is easier to use. GL_EXT_grid_primitive is required.

V-man

AdrianD
12-02-2002, 12:01 AM
what about reading ANY OpenGL tutorial before postiong here such questions ?

qiz
12-02-2002, 09:16 AM
AdrianD: I was asking for the best way not how ok?


Thanx V-man! http://www.opengl.org/discussion_boards/ubb/smile.gif

Old GLman
12-02-2002, 10:17 AM
qiz,

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).]

jwatte
12-02-2002, 01:34 PM
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.

dorbie
12-02-2002, 08:49 PM
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).]

qiz
12-03-2002, 03:49 AM
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.