Initial commit

This commit is contained in:
Milan Nikolic 2017-01-27 09:35:30 +01:00
commit d7ff68b487
196 changed files with 286314 additions and 0 deletions

View file

@ -0,0 +1,31 @@
package main
import (
"github.com/gen2brain/raylib-go/raylib"
)
func main() {
screenWidth := int32(800)
screenHeight := int32(450)
raylib.InitWindow(screenWidth, screenHeight, "raylib [textures] example - texture loading and drawing")
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
texture := raylib.LoadTexture("raylib_logo.png")
raylib.SetTargetFPS(60)
for !raylib.WindowShouldClose() {
raylib.BeginDrawing()
raylib.ClearBackground(raylib.RayWhite)
raylib.DrawTexture(texture, screenWidth/2-texture.Width/2, screenHeight/2-texture.Height/2, raylib.White)
raylib.DrawText("this IS a texture!", 360, 370, 10, raylib.Gray)
raylib.EndDrawing()
}
raylib.UnloadTexture(texture)
raylib.CloseWindow()
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB