Update C sources and examples
This commit is contained in:
parent
3b28d17b95
commit
8f1ad11c49
100 changed files with 2081 additions and 1686 deletions
|
@ -10,7 +10,7 @@ func main() {
|
|||
|
||||
raylib.InitWindow(screenWidth, screenHeight, "raylib [shaders] example - shapes and texture shaders")
|
||||
|
||||
sonic := raylib.LoadTexture("sonic.png")
|
||||
fudesumi := raylib.LoadTexture("fudesumi.png")
|
||||
|
||||
// NOTE: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version
|
||||
shader := raylib.LoadShader("glsl330/base.vs", "glsl330/grayscale.fs")
|
||||
|
@ -57,16 +57,18 @@ func main() {
|
|||
// Activate our custom shader to be applied on next shapes/textures drawings
|
||||
raylib.BeginShaderMode(shader)
|
||||
|
||||
raylib.DrawTexture(sonic, 380, -10, raylib.White) // Using custom shader
|
||||
raylib.DrawTexture(fudesumi, 500, -30, raylib.White) // Using custom shader
|
||||
|
||||
// Activate our default shader for next drawings
|
||||
raylib.EndShaderMode()
|
||||
|
||||
raylib.DrawText("(c) Fudesumi sprite by Eiden Marsal", 380, screenHeight-20, 10, raylib.Gray)
|
||||
|
||||
raylib.EndDrawing()
|
||||
}
|
||||
|
||||
raylib.UnloadShader(shader) // Unload shader
|
||||
raylib.UnloadTexture(sonic) // Unload texture
|
||||
raylib.UnloadShader(shader) // Unload shader
|
||||
raylib.UnloadTexture(fudesumi) // Unload texture
|
||||
|
||||
raylib.CloseWindow() // Close window and OpenGL context
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue