Skip to content

Commit

Permalink
Merge pull request #479 from sugarvoid/master
Browse files Browse the repository at this point in the history
Add return value to `LoadTextureDepth`
  • Loading branch information
gen2brain authored Dec 28, 2024
2 parents 453bad2 + ff0ecd0 commit d58ffe1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions raylib/rlgl_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,11 +621,12 @@ func SetVertexAttributeDivisor(index uint32, divisor int32) {
}

// LoadTextureDepth - Load depth texture/renderbuffer (to be attached to fbo)
func LoadTextureDepth(width, height int32, useRenderBuffer bool) {
func LoadTextureDepth(width, height int32, useRenderBuffer bool) uint32 {
cwidth := C.int(width)
cheight := C.int(height)
cuseRenderBuffer := C.bool(useRenderBuffer)
C.rlLoadTextureDepth(cwidth, cheight, cuseRenderBuffer)
cid := C.rlLoadTextureDepth(cwidth, cheight, cuseRenderBuffer)
return uint32(cid)
}

// LoadFramebuffer - Load an empty framebuffer
Expand Down
4 changes: 2 additions & 2 deletions raylib/rlgl_purego.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,8 @@ func SetVertexAttributeDivisor(index uint32, divisor int32) {
}

// LoadTextureDepth - Load depth texture/renderbuffer (to be attached to fbo)
func LoadTextureDepth(width, height int32, useRenderBuffer bool) {
rlLoadTextureDepth(width, height, useRenderBuffer)
func LoadTextureDepth(width, height int32, useRenderBuffer bool) uint32{
return rlLoadTextureDepth(width, height, useRenderBuffer)
}

// LoadFramebuffer - Load an empty framebuffer
Expand Down

0 comments on commit d58ffe1

Please sign in to comment.