Initial commit
This commit is contained in:
commit
0245a5cb43
22 changed files with 610 additions and 0 deletions
24
engine/render/context.go
Normal file
24
engine/render/context.go
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
package render
|
||||
|
||||
import (
|
||||
gfxfont "tetris/engine/graphics/font"
|
||||
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
var (
|
||||
texture rl.Texture2D
|
||||
font *gfxfont.TileFont = nil
|
||||
)
|
||||
|
||||
func SetTexture(tex rl.Texture2D) {
|
||||
texture = tex
|
||||
}
|
||||
|
||||
func GetTexture() rl.Texture2D {
|
||||
return texture
|
||||
}
|
||||
|
||||
func SetFont(fnt *gfxfont.TileFont) {
|
||||
font = fnt
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue