medfall

A super great game engine
Log | Files | Refs

commit 8d92ad0f208dcc7a6c53daae84b2cbd41b62c069
parent 9dc9cde0a54aad9af7cffbbad65fd02a44744e63
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Fri,  2 Aug 2019 15:46:22 +0300

Forgot to commit this, kinda hacky

Diffstat:
Mrenderer.cc | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/renderer.cc b/renderer.cc @@ -1043,11 +1043,13 @@ static void setup_vertex_attrib( GLuint index, VertexFormat format, u32 stride = int components; vertexfmt_to_glenum( format, &type, &components ); + GLboolean normalized = index == ATTR_WEIGHTS; + glEnableVertexAttribArray( index ); if( index == ATTR_JOINTS ) glVertexAttribIPointer( index, components, type, stride, gl_offset ); else - glVertexAttribPointer( index, components, type, GL_FALSE, stride, gl_offset ); + glVertexAttribPointer( index, components, type, normalized, stride, gl_offset ); } Mesh renderer_new_mesh( MeshConfig config ) {