|
|
|
|
@ -6,12 +6,12 @@
|
|
|
|
|
#include <cstring> |
|
|
|
|
#include <fstream> |
|
|
|
|
|
|
|
|
|
#define GLM_FORCE_XYZW_ONLY |
|
|
|
|
#include <glm/gtc/matrix_transform.hpp> |
|
|
|
|
|
|
|
|
|
#include "asset.h" |
|
|
|
|
#include "dumbLog.h" |
|
|
|
|
#include "dummy_shader.h" |
|
|
|
|
#define GL_DEBUG_IMPLEMENTATION |
|
|
|
|
#include "GLDebug.h" |
|
|
|
|
#include "shader.h" |
|
|
|
|
#include "util.h" |
|
|
|
|
@ -135,7 +135,7 @@ getFreeShader(GLContext* gl_ctx)
|
|
|
|
|
ShaderProgram* |
|
|
|
|
getShaderByHash(GLContext* gl_ctx, u64 hash) |
|
|
|
|
{ |
|
|
|
|
for (u32 i = 0; i < gl_ctx->num_shaders; i++) { |
|
|
|
|
for (u32 i; i < gl_ctx->num_shaders; i++) { |
|
|
|
|
if (gl_ctx->shaders[i].hash == hash) |
|
|
|
|
return &gl_ctx->shaders[i]; |
|
|
|
|
} |
|
|
|
|
@ -303,7 +303,7 @@ initGLMesh(MemoryArena* arena,
|
|
|
|
|
GLMesh glm = {0}; |
|
|
|
|
glm.num_indices = m.num_indices; |
|
|
|
|
glm.num_vertex_attrib_buffers = num_mappings; |
|
|
|
|
glm.vertex_attrib_buffers = ARENA_ALLOC(arena, GLBuffer, num_mappings); |
|
|
|
|
glm .vertex_attrib_buffers = ARENA_ALLOC(arena, GLBuffer, num_mappings); |
|
|
|
|
glm.element_buf = ARENA_ALLOC(arena, GLBuffer, 1); |
|
|
|
|
glm.node_xform = ARENA_ALLOC(arena, mat4, 1); |
|
|
|
|
*glm.node_xform = mat4(1); |
|
|
|
|
|