|
@@ -143,7 +143,7 @@ int Shader::compile(const char* vertex, const char* fragment) {
|
143
|
143
|
GLuint vertexID = glCreateShader(GL_VERTEX_SHADER);
|
144
|
144
|
GLuint fragmentID = glCreateShader(GL_FRAGMENT_SHADER);
|
145
|
145
|
|
146
|
|
- GLint result = GL_FALSE;
|
|
146
|
+ GLint result = GLint(GL_FALSE);
|
147
|
147
|
GLint logLength = 0;
|
148
|
148
|
|
149
|
149
|
// Compile vertex shader
|
|
@@ -153,7 +153,7 @@ int Shader::compile(const char* vertex, const char* fragment) {
|
153
|
153
|
// Check vertex shader
|
154
|
154
|
glGetShaderiv(vertexID, GL_COMPILE_STATUS, &result);
|
155
|
155
|
glGetShaderiv(vertexID, GL_INFO_LOG_LENGTH, &logLength);
|
156
|
|
- if ((logLength > 0) && (result != GL_TRUE)) {
|
|
156
|
+ if ((logLength > 0) && (result != GLint(GL_TRUE))) {
|
157
|
157
|
std::vector<char> message(logLength + 1);
|
158
|
158
|
glGetShaderInfoLog(vertexID, logLength, nullptr, &message[0]);
|
159
|
159
|
Log::get(LOG_ERROR) << "Vertex Shader compilation error:" << Log::endl;
|
|
@@ -170,7 +170,7 @@ int Shader::compile(const char* vertex, const char* fragment) {
|
170
|
170
|
// Check fragment shader
|
171
|
171
|
glGetShaderiv(fragmentID, GL_COMPILE_STATUS, &result);
|
172
|
172
|
glGetShaderiv(fragmentID, GL_INFO_LOG_LENGTH, &logLength);
|
173
|
|
- if ((logLength > 0) && (result != GL_TRUE)) {
|
|
173
|
+ if ((logLength > 0) && (result != GLint(GL_TRUE))) {
|
174
|
174
|
std::vector<char> message(logLength + 1);
|
175
|
175
|
glGetShaderInfoLog(fragmentID, logLength, nullptr, &message[0]);
|
176
|
176
|
Log::get(LOG_ERROR) << "Fragment Shader compilation error:" << Log::endl;
|
|
@@ -189,7 +189,7 @@ int Shader::compile(const char* vertex, const char* fragment) {
|
189
|
189
|
// Check resulting program
|
190
|
190
|
glGetProgramiv(programID, GL_LINK_STATUS, &result);
|
191
|
191
|
glGetProgramiv(programID, GL_INFO_LOG_LENGTH, &logLength);
|
192
|
|
- if ((logLength > 0) && (result != GL_TRUE)) {
|
|
192
|
+ if ((logLength > 0) && (result != GLint(GL_TRUE))) {
|
193
|
193
|
std::vector<char> message(logLength + 1);
|
194
|
194
|
glGetProgramInfoLog(programID, logLength, nullptr, &message[0]);
|
195
|
195
|
Log::get(LOG_ERROR) << "Shader link error:" << Log::endl;
|
|
@@ -273,7 +273,7 @@ void Shader::set2DState(bool on, bool depth) {
|
273
|
273
|
}
|
274
|
274
|
|
275
|
275
|
void Shader::drawGL(ShaderBuffer& vertices, ShaderBuffer& uvs, glm::vec4 color,
|
276
|
|
- unsigned int texture, TextureStorage store, unsigned int mode,
|
|
276
|
+ unsigned int texture, TextureStorage store, GLenum mode,
|
277
|
277
|
ShaderTexture* target, Shader& shader) {
|
278
|
278
|
assert(vertices.getSize() == uvs.getSize());
|
279
|
279
|
if (mode == GL_TRIANGLES) {
|
|
@@ -365,7 +365,7 @@ void Shader::drawGL(ShaderBuffer& vertices, ShaderBuffer& uvs, ShaderBuffer& ind
|
365
|
365
|
}
|
366
|
366
|
|
367
|
367
|
void Shader::drawGL(ShaderBuffer& vertices, ShaderBuffer& colors, glm::mat4 MVP,
|
368
|
|
- unsigned int mode, ShaderTexture* target, Shader& shader) {
|
|
368
|
+ GLenum mode, ShaderTexture* target, Shader& shader) {
|
369
|
369
|
assert(vertices.getSize() == colors.getSize());
|
370
|
370
|
if (mode == GL_TRIANGLES) {
|
371
|
371
|
assert((vertices.getSize() % 3) == 0);
|
|
@@ -388,7 +388,7 @@ void Shader::drawGL(ShaderBuffer& vertices, ShaderBuffer& colors, glm::mat4 MVP,
|
388
|
388
|
}
|
389
|
389
|
|
390
|
390
|
void Shader::drawGL(ShaderBuffer& vertices, ShaderBuffer& colors, ShaderBuffer& indices,
|
391
|
|
- glm::mat4 MVP, unsigned int mode, ShaderTexture* target, Shader& shader) {
|
|
391
|
+ glm::mat4 MVP, GLenum mode, ShaderTexture* target, Shader& shader) {
|
392
|
392
|
assert(vertices.getSize() == colors.getSize());
|
393
|
393
|
if (mode == GL_TRIANGLES) {
|
394
|
394
|
assert((indices.getSize() % 3) == 0);
|