The GL status is enabled by default and does not need to be set again. Glableclientstate (GL_VERTEX_ARRAY) glableclientstate (GL_COLOR_ARRAY) glableclientstate (gradient) GL_TEXTURE_2D) commonly used graphic plotting functions are as follows: 1. ccDrawColor4B (GLubyter, GLubyte
The GL status is enabled by default and does not need to be set again. Glableclientstate (GL_VERTEX_ARRAY) glableclientstate (GL_COLOR_ARRAY) glableclientstate (gradient) GL_TEXTURE_2D) commonly used drawing graphics functions are as follows: 1. ccDrawColor4B (GLubyte r, GLubyte
The GL status is enabled by default and does not need to be set again.
GlEnableClientState (GL_VERTEX_ARRAY)
Glableclientstate (GL_COLOR_ARRAY)
Glableclientstate (GL_TEXTURE_COORD_ARRAY)
Glable (GL_TEXTURE_2D)
Common graphic functions are as follows:
1. ccDrawColor4B (GLubyte r, GLubyte g, GLubyte B, GLubyte a) // set the painting color
Parameter 1: red
Parameter 2: green component
Parameter 3: Blue
Parameter 4: Transparency
2. glLineWidth (GLfloat width) // you can specify the line width.
3. ccDrawLine (const CCPoint & origin, const CCPoint & destination) // draw a straight line
Parameter 1: Start Coordinate
Parameter 2: terminal Coordinate
4. ccPointSize (GLfloat pointSize) // you can specify the size of each vertex.
5. ccDrawPoint (const CCPoint & point) // draw a point
6. ccDrawCircle (const CCPoint & center, float radius, float angle, unsigned int segments, bool drawLineToCenter) // draw a circle
Parameter 1: Center Coordinate
Parameter 2: radius Length
Parameter 3: Circular Angle
Parameter 4: Angle
Parameter 5: Count
7. ccDrawPoly (const CCPoint * poli, unsigned int numberOfPoints, bool closePolygon) // draw a hollow Polygon
Parameter 1: vertex Array
Parameter 2: Number of points
Parameter 3: whether to automatically close a polygon
8. ccDrawSolidRect (CCPoint orgin, CCPoint destination, ccColor4F color) // draw a filled rectangle
9. ccDrawRect (CCPoint origin, CCPoint destination) // draw a hollow rectangle
10. ccdrawquadbezr (const CCPoint & origin, const CCPoint & control, const CCPoint & destination, unsigned int segments) // plot the besell Curve
Parameter 1: Start Point
Parameter 2: Control Point
Parameter 3: End Point
Parameter 4: Number of vertices
11. ccdrawcubes (const CCPoint & origin, const CCPoint & control1, const CCPoint & control2, const CCPoint & destination, unsigned int destinations)
// Draw a three-dimensional besell Curve
Parameter 1: Start Point
Parameter 2: Control Point 1
Parameter 3: Control Point 2
Parameter 4: End Point
Parameter 5: Number of vertices