20#ifndef GLWRAP_HEADER_H
21#define GLWRAP_HEADER_H
23#include "graphics/gl_headers.hpp"
25#include "utils/log.hpp"
26#include "utils/leak_check.hpp"
27#include "utils/no_copy.hpp"
37namespace HardwareStats
65 unsigned elapsedTimeus();
66 const char* getName()
const {
return m_name; }
71 canSubmitQuery =
true;
78 static void bindVertexArrayAttrib(
enum video::E_VERTEX_TYPE tp)
82 case video::EVT_STANDARD:
84 glEnableVertexAttribArray(0);
85 glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), 0);
87 glEnableVertexAttribArray(1);
88 glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)12);
90 glEnableVertexAttribArray(2);
91 glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, getVertexPitchFromType(tp), (GLvoid*)24);
93 glEnableVertexAttribArray(3);
94 glVertexAttribPointer(3, 2, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)28);
96 case video::EVT_2TCOORDS:
98 glEnableVertexAttribArray(0);
99 glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), 0);
101 glEnableVertexAttribArray(1);
102 glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)12);
104 glEnableVertexAttribArray(2);
105 glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, getVertexPitchFromType(tp), (GLvoid*)24);
107 glEnableVertexAttribArray(3);
108 glVertexAttribPointer(3, 2, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)28);
110 glEnableVertexAttribArray(4);
111 glVertexAttribPointer(4, 2, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)36);
113 case video::EVT_TANGENTS:
115 glEnableVertexAttribArray(0);
116 glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), 0);
118 glEnableVertexAttribArray(1);
119 glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)12);
121 glEnableVertexAttribArray(2);
122 glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, getVertexPitchFromType(tp), (GLvoid*)24);
124 glEnableVertexAttribArray(3);
125 glVertexAttribPointer(3, 2, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)28);
127 glEnableVertexAttribArray(5);
128 glVertexAttribPointer(5, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)36);
130 glEnableVertexAttribArray(6);
131 glVertexAttribPointer(6, 4, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)48);
133 case video::EVT_SKINNED_MESH:
134 glEnableVertexAttribArray(0);
135 glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), 0);
136 glEnableVertexAttribArray(1);
137 glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)12);
138 glEnableVertexAttribArray(2);
139 glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, getVertexPitchFromType(tp), (GLvoid*)24);
140 glEnableVertexAttribArray(3);
141 glVertexAttribPointer(3, 2, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)28);
142 glEnableVertexAttribArray(4);
143 glVertexAttribPointer(4, 3, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)36);
144 glEnableVertexAttribArray(11);
145 glVertexAttribPointer(11, 4, GL_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)48);
146 glEnableVertexAttribArray(5);
147 glVertexAttribIPointer(5, 4, GL_SHORT, getVertexPitchFromType(tp), (GLvoid*)64);
148 glEnableVertexAttribArray(6);
149 glVertexAttribPointer(6, 4, GL_HALF_FLOAT, GL_FALSE, getVertexPitchFromType(tp), (GLvoid*)72);
155void draw3DLine(
const core::vector3df& start,
156 const core::vector3df& end, irr::video::SColor color);
158const std::string getGLExtensions();
Definition: glwrap.hpp:56
A class to manage json data.
Definition: hardware_stats.hpp:33
Definition: glwrap.hpp:47
Definition: glwrap.hpp:76