forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GL_TRIANGLES needing resetting as GL_QUADS? Quick question

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
sg57



Joined: 14 Oct 2005
Posts: 154

PostPosted: Mon Jul 10, 2006 8:19 am    Post subject: GL_TRIANGLES needing resetting as GL_QUADS? Quick question Reply with quote

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
View user's profile Send private message
zilt



Joined: 21 Feb 2006
Posts: 45
Location: Ontario, Canada

PostPosted: Mon Jul 10, 2006 8:25 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Mon Jul 10, 2006 8:36 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group