Skip to content

Commit

Permalink
Re-add functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2brain committed Nov 10, 2023
1 parent e5c1864 commit 61e85d2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions raylib/rcore.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,28 @@ func IsShaderReady(shader Shader) bool {
return v
}

// GetShaderLocation - Get shader uniform location
func GetShaderLocation(shader Shader, uniformName string) int32 {
cshader := shader.cptr()
cuniformName := C.CString(uniformName)
defer C.free(unsafe.Pointer(cuniformName))

ret := C.GetShaderLocation(*cshader, cuniformName)
v := (int32)(ret)
return v
}

// GetShaderLocationAttrib - Get shader attribute location
func GetShaderLocationAttrib(shader Shader, attribName string) int32 {
cshader := shader.cptr()
cuniformName := C.CString(attribName)
defer C.free(unsafe.Pointer(cuniformName))

ret := C.GetShaderLocationAttrib(*cshader, cuniformName)
v := (int32)(ret)
return v
}

// SetShaderValue - Set shader uniform value (float)
func SetShaderValue(shader Shader, locIndex int32, value []float32, uniformType ShaderUniformDataType) {
cshader := shader.cptr()
Expand Down

0 comments on commit 61e85d2

Please sign in to comment.