terrain

Real-time terrain generation using marching cubes
git clone git://git.christianermann.dev/terrain
Log | Files | Refs | README | LICENSE

commit f168ef2f73f14164c68ff7ca3ad0455b699a8e6f
parent 4e5cf13c287f2e9f607fcde9aeb97fed8ec922db
Author: Christian Ermann <christianermann@gmail.com>
Date:   Fri, 29 Jul 2022 18:55:50 -0700

Fixed memory allocation calls

Diffstat:
Msrc/shader.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shader.c b/src/shader.c @@ -20,7 +20,7 @@ static char* stringFromFile(const char* filename) rewind(fp); // Read file to string. - char* string = (char*)malloc(size + 1); + char *string = (char *)s_alloc(size + 1, MEMORY_TAG_STRING); if (string) { fread(string, 1, size, fp); @@ -48,7 +48,7 @@ static GLuint createAndCompileShader(const char* shader_string, { GLint size; glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &size); - char *string = (char *)s_alloc(size, MEMORY_TAG_RENDER); + char *string = (char *)s_alloc(size, MEMORY_TAG_STRING); glGetShaderInfoLog(shader, size, &size, string); LOGE("Failed to compile shader: %s", string); glDeleteShader(shader);