티스토리 뷰
void drawSolidPoly( CGPoint *poli, int points, BOOL closePolygon ) { glVertexPointer(2, GL_FLOAT, 0, poli); glEnableClientState(GL_VERTEX_ARRAY); glDrawArrays(GL_TRIANGLE_FAN , 0, points); glDisableClientState(GL_VERTEX_ARRAY); }
Primitive Flag Description
GL_POINTS A point is placed at each vertex.
GL_LINES A line is drawn for every pair of vertices that are given.
GL_LINE_STRIP A continuous set of lines are drawn. After the first
vertex, a line is drawn between every successive vertex
and the vertex before it.
GL_LINE_LOOP This is the same as GL_LINE_STRIP except that the start and end
vertices are connected as well.
GL_TRIANGLES For every triplet of vertices, a triangle is drawn with corners
specified by the coordinates of the vertices.
It begins with v0,v1,v2 then v3,v4,v5 and so on.
GL_TRIANGLE_STRIP After the first 2 vertices, every successive vertex uses the
previous 2 vertices to draw a triangle.
It begins with v0,v1,v2 then v1,v2,v3 then v2,v3,v4 and so on.
GL_TRIANGLE_FAN After the first 2 vertices, every successive vertex uses the
previous vertex and the first vertex to draw a triangle.
This is used to draw cone-like shapes
It begins with v0,v1,v2 then v0,v2,v3 then v0,v3,v4 and so on.
GL_QUADS Draws a series of quadrilaterals (four sided polygons)
beginning with v0,v1,v2,v3 then v4,v5,v6,v7 and so on
GL_QUAD_STRIP Does a series of quadrilaterals beginning with
v0,v1,v3,v2 then v2,v3,v5,v4 then v4,v5,v7,v6 and so on
GL_POLYGON Draws a polygon using the points v0,v1,...,vn
as vertices. n must be at least 3, or nothing is drawn.
'my Programing > iPhone' 카테고리의 다른 글
iPhone SDK 구버젼 받기 ... (0) | 2010.07.03 |
---|---|
peakPowerForChannel (0) | 2010.01.28 |
UIAcceleration (0) | 2010.01.20 |
아이폰에 어플 올리기!! 성공! (0) | 2010.01.20 |
아이폰 개발자 등록없이 앱 올리기 ...펌 (0) | 2010.01.18 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- XBOX360
- VirtualBox
- BigbusTour
- J2ME
- ALC888
- LockInfo
- Cydia
- kext helper
- ubuntu
- 아이폰
- theme
- Mac
- suave
- 한글2008
- 테일즈 오브 베스페리아
- 청용
- MaskFilterEffect
- java vm
- kext
- iPhone
- 기어스오브워2
- awn
- 우분투
- java
- 두바이
- euro2008
- WeatherWidget
- 10.5.8
- iOS4.0
- Lee Chung Yong
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
글 보관함