Skip to content

Commit

Permalink
Add support for double precision uniforms
Browse files Browse the repository at this point in the history
  • Loading branch information
jepebe committed Oct 24, 2020
1 parent 23fa8ac commit 5c7b102
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pxng/shader.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ def _get_gl_function_for_type(data_type):
def fn(loc, value):
gl.glUniformMatrix4fv(loc, 1, False, glm.value_ptr(value))
return fn
elif data_type == glm.dvec4:
def fn(loc, value):
gl.glUniform4dv(loc, 1, glm.value_ptr(value))
return fn
elif data_type == glm.vec4:
def fn(loc, value):
gl.glUniform4fv(loc, 1, glm.value_ptr(value))
Expand Down

0 comments on commit 5c7b102

Please sign in to comment.