Shader first pass
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
*/
|
||||
|
||||
#include "display/mesh/mesh.h"
|
||||
#include "assert/assert.h"
|
||||
#include "assert/assertgl.h"
|
||||
#include "error/errorgl.h"
|
||||
|
||||
errorret_t meshInitGL(
|
||||
meshgl_t *mesh,
|
||||
@@ -33,26 +34,27 @@ errorret_t meshDrawGL(
|
||||
// PSP style pointer legacy OpenGL
|
||||
const GLsizei stride = sizeof(meshvertex_t);
|
||||
|
||||
glColorPointer(
|
||||
sizeof(color4b_t),
|
||||
GL_UNSIGNED_BYTE,
|
||||
stride,
|
||||
(const GLvoid*)&mesh->vertices[offset].color
|
||||
);
|
||||
glTexCoordPointer(
|
||||
MESH_VERTEX_UV_SIZE,
|
||||
GL_FLOAT,
|
||||
stride,
|
||||
(const GLvoid*)&mesh->vertices[offset].uv
|
||||
);
|
||||
glVertexPointer(
|
||||
MESH_VERTEX_POS_SIZE,
|
||||
GL_FLOAT,
|
||||
stride,
|
||||
(const GLvoid*)&mesh->vertices[offset].pos
|
||||
);
|
||||
// glColorPointer(
|
||||
// sizeof(color4b_t),
|
||||
// GL_UNSIGNED_BYTE,
|
||||
// stride,
|
||||
// (const GLvoid*)&mesh->vertices[offset].color
|
||||
// );
|
||||
// glTexCoordPointer(
|
||||
// MESH_VERTEX_UV_SIZE,
|
||||
// GL_FLOAT,
|
||||
// stride,
|
||||
// (const GLvoid*)&mesh->vertices[offset].uv
|
||||
// );
|
||||
// glVertexPointer(
|
||||
// MESH_VERTEX_POS_SIZE,
|
||||
// GL_FLOAT,
|
||||
// stride,
|
||||
// (const GLvoid*)&mesh->vertices[offset].pos
|
||||
// );
|
||||
|
||||
glDrawArrays(mesh->primitiveType, offset, count);
|
||||
// glDrawArrays(mesh->primitiveType, offset, count);
|
||||
// errorChain(errorGLCheck());
|
||||
|
||||
errorOk();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user