SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLGLEnums.h File Reference

Enumerations containing OpenGL constants. More...

#include <SL.h>
#include <SLGLState.h>
Include dependency graph for SLGLEnums.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  SLGLBufferType { BT_float = GL_FLOAT , BT_int = GL_INT , BT_ubyte = GL_UNSIGNED_BYTE , BT_ushort = GL_UNSIGNED_SHORT , BT_uint = GL_UNSIGNED_INT }
 Enumeration for buffer data types. More...
 
enum  SLGLPrimitiveType {
  PT_points = GL_POINTS , PT_lines = GL_LINES , PT_lineLoop = GL_LINE_LOOP , PT_lineStrip = GL_LINE_STRIP , PT_triangles = GL_TRIANGLES , PT_triangleStrip = GL_TRIANGLE_STRIP ,
  PT_triangleFan = GL_TRIANGLE_FAN
}
 
enum  SLGLAttributeType {
  AT_position = 0 , AT_normal , AT_uv1 , AT_uv2 , AT_color , AT_tangent ,
  AT_jointIndex , AT_jointWeight , AT_custom0 , AT_custom1 , AT_custom2 , AT_custom3 ,
  AT_custom4 , AT_custom5 , AT_custom6 , AT_custom7 , AT_custom8 , AT_custom9 ,
  AT_velocity = 1 , AT_startTime = 2 , AT_initialVelocity = 3 , AT_rotation = 4 , AT_angularVelo = 5 , AT_texNum = 6 ,
  AT_initialPosition = 7 , AT_instancePosition = 8
}
 Enumeration for float vertex attribute types. More...
 
enum  SLGLBufferUsage { BU_static = GL_STATIC_DRAW , BU_stream = GL_STREAM_DRAW , BU_dynamic = GL_DYNAMIC_DRAW }
 Enumeration for buffer usage types also supported by OpenGL ES. More...
 

Detailed Description

Enumerations containing OpenGL constants.

Date
January 2016
Authors
Marcus Hudritsch
Remarks
Please use clangformat to format the code. See more code style on https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style

Definition in file SLGLEnums.h.

Enumeration Type Documentation

◆ SLGLAttributeType

Enumeration for float vertex attribute types.

Enumerator
AT_position 

Vertex position as a 2, 3 or 4 component vectors.

AT_normal 

Vertex normal as a 3 component vector.

AT_uv1 

Vertex 1st texture coordinate as 2 component vector.

AT_uv2 

Vertex 2nd texture coordinate as 2 component vector.

AT_color 

Vertex color as 3 or 4 component vector.

AT_tangent 

Vertex tangent as a 4 component vector (see SLMesh)

AT_jointIndex 

Vertex joint id for vertex skinning.

AT_jointWeight 

Vertex joint weight for vertex skinning.

AT_custom0 

Custom vertex attribute 0.

AT_custom1 

Custom vertex attribute 1.

AT_custom2 

Custom vertex attribute 2.

AT_custom3 

Custom vertex attribute 3.

AT_custom4 

Custom vertex attribute 4.

AT_custom5 

Custom vertex attribute 5.

AT_custom6 

Custom vertex attribute 6.

AT_custom7 

Custom vertex attribute 7.

AT_custom8 

Custom vertex attribute 8.

AT_custom9 

Custom vertex attribute 9.

AT_velocity 

Vertex velocity 3 component vectors.

AT_startTime 

Vertex start time float.

AT_initialVelocity 

Vertex initial velocity 3 component vectors.

AT_rotation 

Vertex rotation float.

AT_angularVelo 

Vertex angular velocity for rotation float.

AT_texNum 

Vertex texture number int.

AT_initialPosition 

Vertex initial position 3 component vectors.

AT_instancePosition 

Vertex instance position for instanced particle drawing.

Definition at line 44 of file SLGLEnums.h.

45 {
46  /*
47  // The enum must correspond to the attributes in SLMesh:
48  SLVVec3f P; //!< Vector for vertex positions layout (location = 0)
49  SLVVec3f N; //!< Vector for vertex normals (opt.) layout (location = 1)
50  SLVVec2f UV1; //!< Vector for 1st vertex tex. coords. (opt.) layout (location = 2)
51  SLVVec2f UV2; //!< Vector for 2nd. vertex tex. coords. (opt.) layout (location = 3)
52  SLVCol4f C; //!< Vector for vertex colors (opt.) layout (location = 4)
53  SLVVec4f T; //!< Vector for vertex tangents (opt.) layout (location = 5)
54  SLVVuchar Ji; //!< 2D Vector of per vertex joint ids (opt.) layout (location = 6)
55  SLVVfloat Jw; //!< 2D Vector of per vertex joint weights (opt.) layout (location = 7)
56  */
57 
58  AT_position = 0, //!< Vertex position as a 2, 3 or 4 component vectors
59  AT_normal, //!< Vertex normal as a 3 component vector
60  AT_uv1, //!< Vertex 1st texture coordinate as 2 component vector
61  AT_uv2, //!< Vertex 2nd texture coordinate as 2 component vector
62  AT_color, //!< Vertex color as 3 or 4 component vector
63  AT_tangent, //!< Vertex tangent as a 4 component vector (see SLMesh)
64  AT_jointIndex, //!< Vertex joint id for vertex skinning
65  AT_jointWeight, //!< Vertex joint weight for vertex skinning
66 
67  AT_custom0, //!< Custom vertex attribute 0
68  AT_custom1, //!< Custom vertex attribute 1
69  AT_custom2, //!< Custom vertex attribute 2
70  AT_custom3, //!< Custom vertex attribute 3
71  AT_custom4, //!< Custom vertex attribute 4
72  AT_custom5, //!< Custom vertex attribute 5
73  AT_custom6, //!< Custom vertex attribute 6
74  AT_custom7, //!< Custom vertex attribute 7
75  AT_custom8, //!< Custom vertex attribute 8
76  AT_custom9, //!< Custom vertex attribute 9
77 
78  AT_velocity = 1, //!< Vertex velocity 3 component vectors
79  AT_startTime = 2, //!< Vertex start time float
80  AT_initialVelocity = 3, //!< Vertex initial velocity 3 component vectors
81  AT_rotation = 4, //!< Vertex rotation float
82  AT_angularVelo = 5, //!< Vertex angular velocity for rotation float
83  AT_texNum = 6, //!< Vertex texture number int
84  AT_initialPosition = 7, //!< Vertex initial position 3 component vectors
85  AT_instancePosition = 8 //!< Vertex instance position for instanced particle drawing
86 };
@ AT_jointWeight
Vertex joint weight for vertex skinning.
Definition: SLGLEnums.h:65
@ AT_instancePosition
Vertex instance position for instanced particle drawing.
Definition: SLGLEnums.h:85
@ AT_angularVelo
Vertex angular velocity for rotation float.
Definition: SLGLEnums.h:82
@ AT_texNum
Vertex texture number int.
Definition: SLGLEnums.h:83
@ AT_jointIndex
Vertex joint id for vertex skinning.
Definition: SLGLEnums.h:64
@ AT_custom5
Custom vertex attribute 5.
Definition: SLGLEnums.h:72
@ AT_custom0
Custom vertex attribute 0.
Definition: SLGLEnums.h:67
@ AT_custom1
Custom vertex attribute 1.
Definition: SLGLEnums.h:68
@ AT_position
Vertex position as a 2, 3 or 4 component vectors.
Definition: SLGLEnums.h:58
@ AT_custom3
Custom vertex attribute 3.
Definition: SLGLEnums.h:70
@ AT_normal
Vertex normal as a 3 component vector.
Definition: SLGLEnums.h:59
@ AT_custom7
Custom vertex attribute 7.
Definition: SLGLEnums.h:74
@ AT_rotation
Vertex rotation float.
Definition: SLGLEnums.h:81
@ AT_custom9
Custom vertex attribute 9.
Definition: SLGLEnums.h:76
@ AT_color
Vertex color as 3 or 4 component vector.
Definition: SLGLEnums.h:62
@ AT_custom2
Custom vertex attribute 2.
Definition: SLGLEnums.h:69
@ AT_uv1
Vertex 1st texture coordinate as 2 component vector.
Definition: SLGLEnums.h:60
@ AT_startTime
Vertex start time float.
Definition: SLGLEnums.h:79
@ AT_custom6
Custom vertex attribute 6.
Definition: SLGLEnums.h:73
@ AT_initialPosition
Vertex initial position 3 component vectors.
Definition: SLGLEnums.h:84
@ AT_velocity
Vertex velocity 3 component vectors.
Definition: SLGLEnums.h:78
@ AT_uv2
Vertex 2nd texture coordinate as 2 component vector.
Definition: SLGLEnums.h:61
@ AT_tangent
Vertex tangent as a 4 component vector (see SLMesh)
Definition: SLGLEnums.h:63
@ AT_custom8
Custom vertex attribute 8.
Definition: SLGLEnums.h:75
@ AT_initialVelocity
Vertex initial velocity 3 component vectors.
Definition: SLGLEnums.h:80
@ AT_custom4
Custom vertex attribute 4.
Definition: SLGLEnums.h:71

◆ SLGLBufferType

Enumeration for buffer data types.

Enumerator
BT_float 

float vertex attributes

BT_int 

int vertex attributes

BT_ubyte 

vertex index type (0-2^8)

BT_ushort 

vertex index type (0-2^16)

BT_uint 

vertex index type (0-2^32)

Definition at line 19 of file SLGLEnums.h.

20 {
21  BT_float = GL_FLOAT, //!< float vertex attributes
22  BT_int = GL_INT, //!< int vertex attributes
23  BT_ubyte = GL_UNSIGNED_BYTE, //!< vertex index type (0-2^8)
24  BT_ushort = GL_UNSIGNED_SHORT, //!< vertex index type (0-2^16)
25  BT_uint = GL_UNSIGNED_INT //!< vertex index type (0-2^32)
26 };
@ BT_ubyte
vertex index type (0-2^8)
Definition: SLGLEnums.h:23
@ BT_ushort
vertex index type (0-2^16)
Definition: SLGLEnums.h:24
@ BT_float
float vertex attributes
Definition: SLGLEnums.h:21
@ BT_int
int vertex attributes
Definition: SLGLEnums.h:22
@ BT_uint
vertex index type (0-2^32)
Definition: SLGLEnums.h:25

◆ SLGLBufferUsage

Enumeration for buffer usage types also supported by OpenGL ES.

Enumerator
BU_static 

Buffer will be modified once and used many times.

BU_stream 

Buffer will be modified once and used at most a few times.

BU_dynamic 

Buffer will be modified repeatedly and used many times.

Definition at line 89 of file SLGLEnums.h.

90 {
91  BU_static = GL_STATIC_DRAW, //!< Buffer will be modified once and used many times.
92  BU_stream = GL_STREAM_DRAW, //!< Buffer will be modified once and used at most a few times.
93  BU_dynamic = GL_DYNAMIC_DRAW, //!< Buffer will be modified repeatedly and used many times.
94 };
@ BU_stream
Buffer will be modified once and used at most a few times.
Definition: SLGLEnums.h:92
@ BU_static
Buffer will be modified once and used many times.
Definition: SLGLEnums.h:91
@ BU_dynamic
Buffer will be modified repeatedly and used many times.
Definition: SLGLEnums.h:93

◆ SLGLPrimitiveType

Enumerator
PT_points 
PT_lines 
PT_lineLoop 
PT_lineStrip 
PT_triangles 
PT_triangleStrip 
PT_triangleFan 

Definition at line 29 of file SLGLEnums.h.

30 {
31  PT_points = GL_POINTS,
32  PT_lines = GL_LINES,
33  PT_lineLoop = GL_LINE_LOOP,
34  PT_lineStrip = GL_LINE_STRIP,
35  PT_triangles = GL_TRIANGLES,
36  PT_triangleStrip = GL_TRIANGLE_STRIP,
37  PT_triangleFan = GL_TRIANGLE_FAN
38 };
@ PT_points
Definition: SLGLEnums.h:31
@ PT_lines
Definition: SLGLEnums.h:32
@ PT_triangleFan
Definition: SLGLEnums.h:37
@ PT_triangleStrip
Definition: SLGLEnums.h:36
@ PT_triangles
Definition: SLGLEnums.h:35
@ PT_lineStrip
Definition: SLGLEnums.h:34
@ PT_lineLoop
Definition: SLGLEnums.h:33