Add SurfaceFlags, and more formatting :)
This commit is contained in:
+3
-7
@@ -73,9 +73,7 @@ static float glm_vec3_norm(vec3 v)
|
||||
|
||||
static void glm_vec3_normalize(vec3 v)
|
||||
{
|
||||
float norm;
|
||||
|
||||
norm = glm_vec3_norm(v);
|
||||
float norm = glm_vec3_norm(v);
|
||||
|
||||
if (norm == 0.0f)
|
||||
{
|
||||
@@ -107,12 +105,10 @@ static void glm_perspective(
|
||||
float farVal,
|
||||
mat4 dest)
|
||||
{
|
||||
float f, fn;
|
||||
|
||||
glm_mat4_zero(dest);
|
||||
|
||||
f = 1.0f / tanf(fovy * 0.5f);
|
||||
fn = 1.0f / (nearVal - farVal);
|
||||
float f = 1.0f / tanf(fovy * 0.5f);
|
||||
float fn = 1.0f / (nearVal - farVal);
|
||||
|
||||
dest[0][0] = f / aspect;
|
||||
dest[1][1] = f;
|
||||
|
||||
@@ -238,7 +238,6 @@ static GLuint shader_compile(const char *shaderContents, size_t shaderContentsLe
|
||||
|
||||
static GLuint shader_load(const char *shaderContents)
|
||||
{
|
||||
GLuint result;
|
||||
GLuint vert = shader_compile(shaderContents, strlen(shaderContents), GL_VERTEX_SHADER);
|
||||
GLuint frag = shader_compile(shaderContents, strlen(shaderContents), GL_FRAGMENT_SHADER);
|
||||
|
||||
@@ -249,7 +248,7 @@ static GLuint shader_load(const char *shaderContents)
|
||||
glLinkProgram(ref);
|
||||
glDetachShader(ref, vert);
|
||||
glDetachShader(ref, frag);
|
||||
result = ref;
|
||||
GLuint result = ref;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user