| View previous topic :: View next topic |
| Author |
Message |
sg57
Joined: 14 Oct 2005 Posts: 154
|
Posted: Mon Jul 10, 2006 8:19 am Post subject: GL_TRIANGLES needing resetting as GL_QUADS? Quick question |
|
|
Seeing as how the GU_TRIANGLE_FAN needs to:
| Code: |
glBegin(GL_TRIANGLE_FAN);
draw a wal for example
glEnd();
glBegin(GL_TRIANGLE_FAN)
draw another wall
glEnd();
etc...
|
Since GL_QAUDS isnt really in the PSPGL, I was wondering if the GL_TRIANGLES needs the same treatment as the fan.
Quick and probablay stupid question, i kno, but Id like an answer :-?[/code] |
|
| Back to top |
|
 |
zilt
Joined: 21 Feb 2006 Posts: 45 Location: Ontario, Canada
|
Posted: Mon Jul 10, 2006 8:25 am Post subject: |
|
|
| Quick answer - no. Each GL_TRIANGLES element is independent from the previous triangle. However, trying to reuse the same veritces in the following triangle sometimes allows the low level driver/hardware to speed up the triangle rendering by converting the GL_TRIANGLES into a GL_TRIANGLE_STRIP - but is heavily dependent on the hardware and order. Google for it if you want more info. |
|
| Back to top |
|
 |
Insert_witty_name
Joined: 10 May 2006 Posts: 376
|
Posted: Mon Jul 10, 2006 8:36 am Post subject: |
|
|
Do a little research on what each one does. GL_TRIANGLES will create a triangle from each 3 points you give it, so you can wrap them all between a glBegin and glEnd.
See this page for more info on them and other primitives.
http://www.rush3d.com/reference/opengl-redbook-1.1/chapter02.html |
|
| Back to top |
|
 |
|