Skip to content

Commit

Permalink
opengl uniform mat2 bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
fabmax committed Jan 12, 2024
1 parent 0a972d1 commit eb3184f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ interface GlApi {
fun uniform2iv(location: Int, values: Int32Buffer)
fun uniform3iv(location: Int, values: Int32Buffer)
fun uniform4iv(location: Int, values: Int32Buffer)
fun uniformMatrix2fv(location: Int, values: Float32Buffer)
fun uniformMatrix3fv(location: Int, values: Float32Buffer)
fun uniformMatrix4fv(location: Int, values: Float32Buffer)
fun vertexAttribDivisor(index: Int, divisor: Int)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ object GlImpl : GlApi {
override fun uniform2iv(location: Int, values: Int32Buffer) = values.useRaw { glUniform2iv(location, it) }
override fun uniform3iv(location: Int, values: Int32Buffer) = values.useRaw { glUniform3iv(location, it) }
override fun uniform4iv(location: Int, values: Int32Buffer) = values.useRaw { glUniform4iv(location, it) }
override fun uniformMatrix2fv(location: Int, values: Float32Buffer) = values.useRaw { glUniformMatrix2fv(location, false, it) }
override fun uniformMatrix3fv(location: Int, values: Float32Buffer) = values.useRaw { glUniformMatrix3fv(location, false, it) }
override fun uniformMatrix4fv(location: Int, values: Float32Buffer) = values.useRaw { glUniformMatrix4fv(location, false, it) }
override fun vertexAttribDivisor(index: Int, divisor: Int) = glVertexAttribDivisor(index, divisor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ object GlImpl : GlApi {
override fun uniform2iv(location: Int, values: Int32Buffer) = gl.uniform2iv(location.webGlUniformLoc, (values as Int32BufferImpl).buffer)
override fun uniform3iv(location: Int, values: Int32Buffer) = gl.uniform3iv(location.webGlUniformLoc, (values as Int32BufferImpl).buffer)
override fun uniform4iv(location: Int, values: Int32Buffer) = gl.uniform4iv(location.webGlUniformLoc, (values as Int32BufferImpl).buffer)
override fun uniformMatrix2fv(location: Int, values: Float32Buffer) = gl.uniformMatrix2fv(location.webGlUniformLoc, false, (values as Float32BufferImpl).buffer)
override fun uniformMatrix3fv(location: Int, values: Float32Buffer) = gl.uniformMatrix3fv(location.webGlUniformLoc, false, (values as Float32BufferImpl).buffer)
override fun uniformMatrix4fv(location: Int, values: Float32Buffer) = gl.uniformMatrix4fv(location.webGlUniformLoc, false, (values as Float32BufferImpl).buffer)
override fun vertexAttribDivisor(index: Int, divisor: Int) = gl.vertexAttribDivisor(index, divisor)
Expand Down

0 comments on commit eb3184f

Please sign in to comment.