GetShapesTexture() and GetShapesTextureRectangle() added

This commit is contained in:
JupiterRider 2024-11-23 20:56:02 +01:00
parent 972563ca1f
commit ff18bb497b
2 changed files with 32 additions and 0 deletions

View file

@ -17,6 +17,20 @@ func SetShapesTexture(texture Texture2D, source Rectangle) {
C.SetShapesTexture(*ctexture, *csource)
}
// GetShapesTexture - Get texture that is used for shapes drawing
func GetShapesTexture() Texture2D {
ret := C.GetShapesTexture()
v := newTexture2DFromPointer(unsafe.Pointer(&ret))
return v
}
// GetShapesTextureRectangle - Get texture source rectangle that is used for shapes drawing
func GetShapesTextureRectangle() Rectangle {
ret := C.GetShapesTextureRectangle()
v := newRectangleFromPointer(unsafe.Pointer(&ret))
return v
}
// DrawPixel - Draw a pixel
func DrawPixel(posX, posY int32, col color.RGBA) {
cposX := (C.int)(posX)