Merge pull request #332 from Gamerfiend/master
feat: update rtextures.go to have the func LoadTextureCubemap.
This commit is contained in:
commit
17ce081452
2 changed files with 11 additions and 2 deletions
|
@ -2637,9 +2637,9 @@ func LoadTextureFromImage(image *Image) Texture2D {
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadTextureCubemap - Load cubemap from image, multiple image cubemap layouts supported
|
// LoadTextureCubemap - Load cubemap from image, multiple image cubemap layouts supported
|
||||||
func LoadTextureCubemap(image Image, layout int32) Texture2D {
|
func LoadTextureCubemap(image *Image, layout int32) Texture2D {
|
||||||
var texture Texture2D
|
var texture Texture2D
|
||||||
loadTextureCubemap(uintptr(unsafe.Pointer(&texture)), uintptr(unsafe.Pointer(&image)), layout)
|
loadTextureCubemap(uintptr(unsafe.Pointer(&texture)), uintptr(unsafe.Pointer(image)), layout)
|
||||||
return texture
|
return texture
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,6 +184,15 @@ func LoadRenderTexture(width, height int32) RenderTexture2D {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LoadTextureCubemap - Loads a texture for a cubemap using given layout
|
||||||
|
func LoadTextureCubemap(image *Image, layout int32) Texture2D {
|
||||||
|
cimage := image.cptr()
|
||||||
|
clayout := (C.int)(layout)
|
||||||
|
ret := C.LoadTextureCubemap(*cimage, clayout)
|
||||||
|
v := newTexture2DFromPointer(unsafe.Pointer(&ret))
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
// UnloadImage - Unload image from CPU memory (RAM)
|
// UnloadImage - Unload image from CPU memory (RAM)
|
||||||
func UnloadImage(image *Image) {
|
func UnloadImage(image *Image) {
|
||||||
cimage := image.cptr()
|
cimage := image.cptr()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue