Skip to main content
GameDev.net gamedev.net
🔒 Locked

drawing a grid

Started by Xetrov Aug 3, 2001 at 9:39 AM 2 replies 750+ views
Original Post
Xetrov
Xetrov
How do I draw a massive grid on the x-y plane in the quickest way possible such that I can amove the camera in any direction that I please, whilst the grid remains in a horizontal position(to the world). Ahh i guess that didn''t make too much sense.... ok: I want to draw a grid, which extends from -infinity to +infinity in both the X and Y axes of my world. I tried to do this with GL_LINES but it just did not look right Would a texture be better?
Julio
Julio
I''d think GL_LINES would work better and faster than texture mapping that large of an area. can you post your implimentation?




How many Microsoft employees does it take to screw in a light bulb?
None, they just declare drakness as a new standard.
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
zedzeek
zedzeek
>> I want to draw a grid, which extends from -infinity to +infinity <<

using GL_LINES should be quick enough ( u can turn off a few states eg lighting/depth writes )
the key to doing it fast is only draw the lines that are on the screen, ie much smaller than infinity
wolfman8k
wolfman8k
I think that using a texture would be faster:

If you use GL_LINES then every frame you have to pass about 400 points(for a 10x10 grid) to the graphics card.

If you use a texture, then u just upload it once, and only pass one quad every frame.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.