GLUS
glus_wavefront.h
Go to the documentation of this file.
1 /*
2  * GLUS - Modern OpenGL, OpenGL ES and OpenVG Utilities. Copyright (C) since 2010 Norbert Nopper
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef GLUS_WAVEFRONT_H_
19 #define GLUS_WAVEFRONT_H_
20 
24 typedef struct _GLUSmaterial
25 {
30 
35 
40 
45 
50 
55 
60 
65 
70 
75 
80 
85 
90 
95 
100 
105 
110 
115 
120 
125 
130 
135 
136 } GLUSmaterial;
137 
141 typedef struct _GLUSmaterialList
142 {
147 
152 
154 
158 typedef struct _GLUSgroup
159 {
164 
169 
174 
179 
184 
189 
194 
202 
203 } GLUSgroup;
204 
208 typedef struct _GLUSgroupList
209 {
214 
219 
220 } GLUSgroupList;
221 
225 typedef struct _GLUSwavefront
226 {
231 
236 
241 
246 
251 
256 
261 
266 
271 
276 
281 
286 
291 
292 } GLUSwavefront;
293 
303 
310 
311 #endif /* GLUS_WAVEFRONT_H_ */
GLUSuint tangentsVBO
Tangents VBO.
Definition: glus_wavefront.h:255
GLUSchar materialName[GLUS_MAX_STRING]
Name of the material.
Definition: glus_wavefront.h:168
GLUSuint indicesVBO
Indices VBO.
Definition: glus_wavefront.h:183
GLUSuint transparencyTextureName
Can be used to store the transparency texture name.
Definition: glus_wavefront.h:129
GLUSuint numberIndices
Number of indices.
Definition: glus_wavefront.h:193
GLUSuint normalsVBO
Normals VBO.
Definition: glus_wavefront.h:245
GLUSuint emissiveTextureName
Can be used to store the emissive texture name.
Definition: glus_wavefront.h:109
GLUSfloat ambient[4]
Ambient color.
Definition: glus_wavefront.h:39
GLUSfloat * tangents
Tangents.
Definition: glus_wavefront.h:250
GLUSfloat diffuse[4]
Diffuse color.
Definition: glus_wavefront.h:44
GLUSfloat indexOfRefraction
Index of refraction.
Definition: glus_wavefront.h:74
struct _GLUSgroup GLUSgroup
Group of geometry.
GLUSchar specularTextureFilename[GLUS_MAX_STRING]
Specular color texture filename.
Definition: glus_wavefront.h:94
GLUSchar name[GLUS_MAX_STRING]
Name of the group.
Definition: glus_wavefront.h:163
GLUSuint verticesVBO
Vertices VBO.
Definition: glus_wavefront.h:235
GLUSfloat shininess
Shininess.
Definition: glus_wavefront.h:54
float GLUSfloat
Definition: glus_typedef.h:37
GLUSchar diffuseTextureFilename[GLUS_MAX_STRING]
Diffuse color texture filename.
Definition: glus_wavefront.h:89
GLUSuint specularTextureName
Can be used to store the specular texture name.
Definition: glus_wavefront.h:124
Structure for holding the group data list.
Definition: glus_wavefront.h:208
void GLUSvoid
Definition: glus_typedef.h:51
GLUSchar bumpTextureFilename[GLUS_MAX_STRING]
Bump texture filename.
Definition: glus_wavefront.h:104
GLUSindex * indices
Indices.
Definition: glus_wavefront.h:178
struct _GLUSmaterialList GLUSmaterialList
Structure for holding material data list.
struct _GLUSmaterialList * next
The pointer to the next element.
Definition: glus_wavefront.h:151
struct _GLUSmaterial GLUSmaterial
Structure for holding material data.
GLUSuint vao
VAO of this group.
Definition: glus_wavefront.h:188
GLUSfloat specular[4]
Specular color.
Definition: glus_wavefront.h:49
Group of geometry.
Definition: glus_wavefront.h:158
GLUSAPI GLUSvoid GLUSAPIENTRY glusWavefrontDestroy(GLUSwavefront *wavefront)
Destroys the wavefront structure by freeing the allocated memory.
Definition: glus_wavefront.c:1078
GLUSmaterialList * materials
Pointer to the first element of the materials.
Definition: glus_wavefront.h:290
#define GLUSindex
Definition: glus_define_uint.h:24
unsigned int GLUSuint
Definition: glus_typedef.h:28
Structure for a complete wavefront object file.
Definition: glus_wavefront.h:225
Structure for holding material data.
Definition: glus_wavefront.h:24
GLUSfloat * bitangents
Bitangents.
Definition: glus_wavefront.h:260
GLUSuint numberVertices
Number of vertices.
Definition: glus_wavefront.h:280
GLUSgroupList * groups
Pointer to the first element of the groups.
Definition: glus_wavefront.h:285
unsigned int GLUSenum
Definition: glus_typedef.h:33
GLUSchar transparencyTextureFilename[GLUS_MAX_STRING]
Transparency texture filename.
Definition: glus_wavefront.h:99
char GLUSchar
Definition: glus_typedef.h:24
GLUSuint bumpTextureName
Can be used to store the bump texture name.
Definition: glus_wavefront.h:134
GLUSenum mode
Triangle render mode - could be either:
Definition: glus_wavefront.h:201
GLUSmaterial * material
Pointer to the material.
Definition: glus_wavefront.h:173
GLUSboolean refraction
Refraction.
Definition: glus_wavefront.h:69
struct _GLUSgroupList * next
The pointer to the next group element.
Definition: glus_wavefront.h:218
GLUSmaterial material
The material data.
Definition: glus_wavefront.h:146
GLUSuint diffuseTextureName
Can be used to store the diffuse texture name.
Definition: glus_wavefront.h:119
GLUSuint texCoordsVBO
Texture corrdinates VBO.
Definition: glus_wavefront.h:275
#define GLUSAPI
Definition: glus_function.h:38
#define GLUS_MAX_STRING
Definition: glus_define.h:82
GLUSchar name[GLUS_MAX_STRING]
Name of the material.
Definition: glus_wavefront.h:29
GLUSfloat emissive[4]
Emissive color.
Definition: glus_wavefront.h:34
unsigned char GLUSboolean
Definition: glus_typedef.h:21
GLUSuint bitangentsVBO
Bitangents VBO.
Definition: glus_wavefront.h:265
GLUSfloat * normals
Normals.
Definition: glus_wavefront.h:240
GLUSfloat * texCoords
Texture coordinates.
Definition: glus_wavefront.h:270
struct _GLUSgroupList GLUSgroupList
Structure for holding the group data list.
struct _GLUSwavefront GLUSwavefront
Structure for a complete wavefront object file.
GLUSchar ambientTextureFilename[GLUS_MAX_STRING]
Ambient color texture filename.
Definition: glus_wavefront.h:84
GLUSchar emissiveTextureFilename[GLUS_MAX_STRING]
Emissive color texture filename.
Definition: glus_wavefront.h:79
GLUSgroup group
The group data.
Definition: glus_wavefront.h:213
Structure for holding material data list.
Definition: glus_wavefront.h:141
GLUSAPI GLUSboolean GLUSAPIENTRY glusWavefrontLoad(const GLUSchar *filename, GLUSwavefront *wavefront)
Loads a wavefront object file with groups and materials.
Definition: glus_wavefront.c:1015
#define GLUSAPIENTRY
Definition: glus_function.h:31
GLUSuint ambientTextureName
Can be used to store the ambient texture name.
Definition: glus_wavefront.h:114
GLUSfloat transparency
Transparency, which is the alpha value.
Definition: glus_wavefront.h:59
GLUSboolean reflection
Reflection.
Definition: glus_wavefront.h:64
GLUSfloat * vertices
Vertices in homogeneous coordinates.
Definition: glus_wavefront.h:230