Skip to main content
gamedev.net
🔒 Locked

N-Gons?

Started by Eight Jul 25, 2001 at 4:56 AM 2 replies 1k views
Original Post
Eight
Eight
I was just looking at the documentation for the Wavefront (.obj) format. It seems this format creates faces/planes using a mininum of three vertices but doesn''t specify a maximum. In terms of writing an OpenGL renderer for these objects, is it possible to set OpenGL to render polygons with more than 3 or 4 vertices? I came across talk of using something like GL_POLYGONS which might wait until you specify a closed loop of vertices before it renders. Is this right? Can anyone point me to an example of it Kind regards, E
Dean Harding
Dean Harding
That''s right, though I won''t use it for anything that''s meant to be realtime. You''ll want to tesselate larger polygons, and maybe convert them to tristrips or fans.


War Worlds - A 3D Real-Time Strategy game in development.
Julio
Julio
GL_POLYGON is the slowest rendering of all of the rendering types. when you load the geometry you could split it up into triangles, (fans while you''re at it) which will speed it up if neccessary. If it runs fast enough with GL_POLYGONS then more power to you.

HHSDrum@yahoo.com
Polarisoft Home Page
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Eight
Eight
Thanks Dean, Julio.

Looks like this will do the job nicely.

Topic Locked

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

Sign in to reply to this topic.