Shaders adapted for Legacy GL
Build Dusk / run-tests (pull_request) Failing after 24s
Build Dusk / build-linux (pull_request) Failing after 18s
Build Dusk / build-psp (pull_request) Failing after 18s
Build Dusk / build-gamecube (pull_request) Failing after 15s
Build Dusk / build-wii (pull_request) Failing after 16s
Build Dusk / run-tests (pull_request) Failing after 24s
Build Dusk / build-linux (pull_request) Failing after 18s
Build Dusk / build-psp (pull_request) Failing after 18s
Build Dusk / build-gamecube (pull_request) Failing after 15s
Build Dusk / build-wii (pull_request) Failing after 16s
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "display/mesh/mesh.h"
|
||||
#include "assert/assertgl.h"
|
||||
#include "error/errorgl.h"
|
||||
#include "display/shader/shadergl.h"
|
||||
|
||||
errorret_t meshInitGL(
|
||||
meshgl_t *mesh,
|
||||
@@ -25,6 +26,10 @@ errorret_t meshInitGL(
|
||||
|
||||
#ifdef DUSK_OPENGL_LEGACY
|
||||
// Nothing needed.
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
errorChain(errorGLCheck());
|
||||
#else
|
||||
// Generate Vertex Buffer Object
|
||||
glGenBuffers(1, &mesh->vboId);
|
||||
@@ -143,6 +148,11 @@ errorret_t meshDrawGL(
|
||||
(const GLvoid*)&mesh->vertices[offset].pos
|
||||
);
|
||||
|
||||
// Shader may have model matrix here
|
||||
#ifdef DUSK_OPENGL_LEGACY
|
||||
errorChain(shaderLegacyMatrixUpdate());
|
||||
#endif
|
||||
|
||||
glDrawArrays(mesh->primitiveType, offset, count);
|
||||
errorChain(errorGLCheck());
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user