Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Side by Side Diff: third_party/gles2_book/Common/Include/esUtil.h

Issue 543015: Added simple vertex shader demo.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // 1 //
2 // Book: OpenGL(R) ES 2.0 Programming Guide 2 // Book: OpenGL(R) ES 2.0 Programming Guide
3 // Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner 3 // Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
4 // ISBN-10: 0321502795 4 // ISBN-10: 0321502795
5 // ISBN-13: 9780321502797 5 // ISBN-13: 9780321502797
6 // Publisher: Addison-Wesley Professional 6 // Publisher: Addison-Wesley Professional
7 // URLs: http://safari.informit.com/9780321563835 7 // URLs: http://safari.informit.com/9780321563835
8 // http://www.opengles-book.com 8 // http://www.opengles-book.com
9 // 9 //
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 /// the results in the arrays. Generate index list for a TRIANGLE_STRIP 88 /// the results in the arrays. Generate index list for a TRIANGLE_STRIP
89 /// \param numSlices The number of slices in the sphere 89 /// \param numSlices The number of slices in the sphere
90 /// \param vertices If not NULL, will contain array of float3 positions 90 /// \param vertices If not NULL, will contain array of float3 positions
91 /// \param normals If not NULL, will contain array of float3 normals 91 /// \param normals If not NULL, will contain array of float3 normals
92 /// \param texCoords If not NULL, will contain array of float2 texCoords 92 /// \param texCoords If not NULL, will contain array of float2 texCoords
93 /// \param indices If not NULL, will contain the array of indices for the triang le strip 93 /// \param indices If not NULL, will contain the array of indices for the triang le strip
94 /// \return The number of indices required for rendering the buffers (the number of indices stored in the indices array 94 /// \return The number of indices required for rendering the buffers (the number of indices stored in the indices array
95 /// if it is not NULL ) as a GL_TRIANGLE_STRIP 95 /// if it is not NULL ) as a GL_TRIANGLE_STRIP
96 // 96 //
97 extern int esGenSphere ( int numSlices, float radius, GLfloat **vertices, GLfloa t **normals, 97 extern int esGenSphere ( int numSlices, float radius, GLfloat **vertices, GLfloa t **normals,
98 GLfloat **texCoords, GLuint **indices ); 98 GLfloat **texCoords, GLushort **indices );
99 99
100 // 100 //
101 /// \brief Generates geometry for a cube. Allocates memory for the vertex data and stores 101 /// \brief Generates geometry for a cube. Allocates memory for the vertex data and stores
102 /// the results in the arrays. Generate index list for a TRIANGLES 102 /// the results in the arrays. Generate index list for a TRIANGLES
103 /// \param scale The size of the cube, use 1.0 for a unit cube. 103 /// \param scale The size of the cube, use 1.0 for a unit cube.
104 /// \param vertices If not NULL, will contain array of float3 positions 104 /// \param vertices If not NULL, will contain array of float3 positions
105 /// \param normals If not NULL, will contain array of float3 normals 105 /// \param normals If not NULL, will contain array of float3 normals
106 /// \param texCoords If not NULL, will contain array of float2 texCoords 106 /// \param texCoords If not NULL, will contain array of float2 texCoords
107 /// \param indices If not NULL, will contain the array of indices for the triang le strip 107 /// \param indices If not NULL, will contain the array of indices for the triang le strip
108 /// \return The number of indices required for rendering the buffers (the number of indices stored in the indices array 108 /// \return The number of indices required for rendering the buffers (the number of indices stored in the indices array
109 /// if it is not NULL ) as a GL_TRIANGLES 109 /// if it is not NULL ) as a GL_TRIANGLES
110 // 110 //
111 extern int esGenCube ( float scale, GLfloat **vertices, GLfloat **normals, 111 extern int esGenCube ( float scale, GLfloat **vertices, GLfloat **normals,
112 GLfloat **texCoords, GLuint **indices ); 112 GLfloat **texCoords, GLushort **indices );
113 113
114 // 114 //
115 /// \brief Loads a 24-bit TGA image from a file 115 /// \brief Loads a 24-bit TGA image from a file
116 /// \param fileName Name of the file on disk 116 /// \param fileName Name of the file on disk
117 /// \param width Width of loaded image in pixels 117 /// \param width Width of loaded image in pixels
118 /// \param height Height of loaded image in pixels 118 /// \param height Height of loaded image in pixels
119 /// \return Pointer to loaded image. NULL on failure. 119 /// \return Pointer to loaded image. NULL on failure.
120 // 120 //
121 extern char* esLoadTGA ( char *fileName, int *width, int *height ); 121 extern char* esLoadTGA ( char *fileName, int *width, int *height );
122 122
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 //// \brief return an indentity matrix 182 //// \brief return an indentity matrix
183 //// \param result returns identity matrix 183 //// \param result returns identity matrix
184 // 184 //
185 extern void esMatrixLoadIdentity(ESMatrix *result); 185 extern void esMatrixLoadIdentity(ESMatrix *result);
186 186
187 #ifdef __cplusplus 187 #ifdef __cplusplus
188 } 188 }
189 #endif // __cplusplus 189 #endif // __cplusplus
190 190
191 #endif // ESUTIL_H 191 #endif // ESUTIL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698