Fixing all other macros by adding RL_ prefix.
This commit is contained in:
parent
8579d1386d
commit
b6cb51e3e8
5 changed files with 1821 additions and 1821 deletions
|
|
@ -88,33 +88,33 @@ int main()
|
|||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
ClearBackground(RL_RAYWHITE);
|
||||
|
||||
BeginTextureMode(target); // Enable drawing to texture
|
||||
|
||||
ClearBackground(RAYWHITE); // Clear texture background
|
||||
ClearBackground(RL_RAYWHITE); // Clear texture background
|
||||
|
||||
BeginMode3D(camera); // Begin 3d mode drawing
|
||||
|
||||
DrawModel(model, position, 0.5f, WHITE); // Draw 3d model with texture
|
||||
DrawModel(model, position, 0.5f, RL_WHITE); // Draw 3d model with texture
|
||||
|
||||
DrawGrid(10, 1.0f); // Draw a grid
|
||||
|
||||
EndMode3D(); // End 3d mode drawing, returns to orthographic 2d mode
|
||||
|
||||
DrawText("TEXT DRAWN IN RENDER TEXTURE", 200, 10, 30, RED);
|
||||
DrawText("TEXT DRAWN IN RENDER TEXTURE", 200, 10, 30, RL_RED);
|
||||
|
||||
EndTextureMode(); // End drawing to texture (now we have a texture available for next passes)
|
||||
|
||||
BeginShaderMode(shader);
|
||||
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, target.texture.width, -target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, target.texture.width, -target.texture.height }, (Vector2){ 0, 0 }, RL_WHITE);
|
||||
|
||||
EndShaderMode();
|
||||
|
||||
// Draw some 2d text over drawn texture
|
||||
DrawText("(c) Barracks 3D model by Alberto Cano", screenWidth - 220, screenHeight - 20, 10, GRAY);
|
||||
DrawText("(c) Barracks 3D model by Alberto Cano", screenWidth - 220, screenHeight - 20, 10, RL_GRAY);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
|
|
|
|||
|
|
@ -72,20 +72,20 @@ int main()
|
|||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
ClearBackground(RL_RAYWHITE);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
DrawModel(model, position, 0.2f, WHITE); // Draw 3d model with texture
|
||||
DrawModel(model, position, 0.2f, RL_WHITE); // Draw 3d model with texture
|
||||
|
||||
DrawGrid(10, 1.0f); // Draw a grid
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawText("(c) Watermill 3D model by Alberto Cano", screenWidth - 210, screenHeight - 20, 10, GRAY);
|
||||
DrawText("(c) Watermill 3D model by Alberto Cano", screenWidth - 210, screenHeight - 20, 10, RL_GRAY);
|
||||
|
||||
DrawText(FormatText("Camera position: (%.2f, %.2f, %.2f)", camera.position.x, camera.position.y, camera.position.z), 600, 20, 10, BLACK);
|
||||
DrawText(FormatText("Camera target: (%.2f, %.2f, %.2f)", camera.target.x, camera.target.y, camera.target.z), 600, 40, 10, GRAY);
|
||||
DrawText(FormatText("Camera position: (%.2f, %.2f, %.2f)", camera.position.x, camera.position.y, camera.position.z), 600, 20, 10, RL_BLACK);
|
||||
DrawText(FormatText("Camera target: (%.2f, %.2f, %.2f)", camera.target.x, camera.target.y, camera.target.z), 600, 40, 10, RL_GRAY);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
|
|
|
|||
|
|
@ -126,15 +126,15 @@ int main()
|
|||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
ClearBackground(RL_RAYWHITE);
|
||||
|
||||
BeginTextureMode(target); // Enable drawing to texture
|
||||
|
||||
ClearBackground(RAYWHITE); // Clear texture background
|
||||
ClearBackground(RL_RAYWHITE); // Clear texture background
|
||||
|
||||
BeginMode3D(camera); // Begin 3d mode drawing
|
||||
|
||||
DrawModel(model, position, 0.1f, WHITE); // Draw 3d model with texture
|
||||
DrawModel(model, position, 0.1f, RL_WHITE); // Draw 3d model with texture
|
||||
|
||||
DrawGrid(10, 1.0f); // Draw a grid
|
||||
|
||||
|
|
@ -146,18 +146,18 @@ int main()
|
|||
BeginShaderMode(shaders[currentShader]);
|
||||
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, target.texture.width, -target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, target.texture.width, -target.texture.height }, (Vector2){ 0, 0 }, RL_WHITE);
|
||||
|
||||
EndShaderMode();
|
||||
|
||||
// Draw 2d shapes and text over drawn texture
|
||||
DrawRectangle(0, 9, 580, 30, Fade(LIGHTGRAY, 0.7f));
|
||||
DrawRectangle(0, 9, 580, 30, Fade(RL_LIGHTGRAY, 0.7f));
|
||||
|
||||
DrawText("(c) Church 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY);
|
||||
DrawText("(c) Church 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, RL_GRAY);
|
||||
|
||||
DrawText("CURRENT POSTPRO SHADER:", 10, 15, 20, BLACK);
|
||||
DrawText(postproShaderText[currentShader], 330, 15, 20, RED);
|
||||
DrawText("< >", 540, 10, 30, DARKBLUE);
|
||||
DrawText("CURRENT POSTPRO SHADER:", 10, 15, 20, RL_BLACK);
|
||||
DrawText(postproShaderText[currentShader], 330, 15, 20, RL_RED);
|
||||
DrawText("< >", 540, 10, 30, RL_DARKBLUE);
|
||||
|
||||
DrawFPS(700, 15);
|
||||
|
||||
|
|
|
|||
|
|
@ -81,15 +81,15 @@ int main()
|
|||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
ClearBackground(RL_RAYWHITE);
|
||||
|
||||
// We only draw a white full-screen rectangle,
|
||||
// frame is generated in shader using raymarching
|
||||
BeginShaderMode(shader);
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, RL_WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
DrawText("(c) Raymarching shader by Iñigo Quilez. MIT License.", screenWidth - 280, screenHeight - 20, 10, GRAY);
|
||||
DrawText("(c) Raymarching shader by Iñigo Quilez. MIT License.", screenWidth - 280, screenHeight - 20, 10, RL_GRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -55,50 +55,50 @@ int main()
|
|||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
ClearBackground(RL_RAYWHITE);
|
||||
|
||||
// Start drawing with default shader
|
||||
|
||||
DrawText("USING DEFAULT SHADER", 20, 40, 10, RED);
|
||||
DrawText("USING DEFAULT SHADER", 20, 40, 10, RL_RED);
|
||||
|
||||
DrawCircle(80, 120, 35, DARKBLUE);
|
||||
DrawCircleGradient(80, 220, 60, GREEN, SKYBLUE);
|
||||
DrawCircleLines(80, 340, 80, DARKBLUE);
|
||||
DrawCircle(80, 120, 35, RL_DARKBLUE);
|
||||
DrawCircleGradient(80, 220, 60, RL_GREEN, RL_SKYBLUE);
|
||||
DrawCircleLines(80, 340, 80, RL_DARKBLUE);
|
||||
|
||||
|
||||
// Activate our custom shader to be applied on next shapes/textures drawings
|
||||
BeginShaderMode(shader);
|
||||
|
||||
DrawText("USING CUSTOM SHADER", 190, 40, 10, RED);
|
||||
DrawText("USING CUSTOM SHADER", 190, 40, 10, RL_RED);
|
||||
|
||||
DrawRectangle(250 - 60, 90, 120, 60, RED);
|
||||
DrawRectangleGradientH(250 - 90, 170, 180, 130, MAROON, GOLD);
|
||||
DrawRectangleLines(250 - 40, 320, 80, 60, ORANGE);
|
||||
DrawRectangle(250 - 60, 90, 120, 60, RL_RED);
|
||||
DrawRectangleGradientH(250 - 90, 170, 180, 130, RL_MAROON, RL_GOLD);
|
||||
DrawRectangleLines(250 - 40, 320, 80, 60, RL_ORANGE);
|
||||
|
||||
// Activate our default shader for next drawings
|
||||
EndShaderMode();
|
||||
|
||||
DrawText("USING DEFAULT SHADER", 370, 40, 10, RED);
|
||||
DrawText("USING DEFAULT SHADER", 370, 40, 10, RL_RED);
|
||||
|
||||
DrawTriangle((Vector2){430, 80},
|
||||
(Vector2){430 - 60, 150},
|
||||
(Vector2){430 + 60, 150}, VIOLET);
|
||||
(Vector2){430 + 60, 150}, RL_VIOLET);
|
||||
|
||||
DrawTriangleLines((Vector2){430, 160},
|
||||
(Vector2){430 - 20, 230},
|
||||
(Vector2){430 + 20, 230}, DARKBLUE);
|
||||
(Vector2){430 + 20, 230}, RL_DARKBLUE);
|
||||
|
||||
DrawPoly((Vector2){430, 320}, 6, 80, 0, BROWN);
|
||||
DrawPoly((Vector2){430, 320}, 6, 80, 0, RL_BROWN);
|
||||
|
||||
// Activate our custom shader to be applied on next shapes/textures drawings
|
||||
BeginShaderMode(shader);
|
||||
|
||||
DrawTexture(fudesumi, 500, -30, WHITE); // Using custom shader
|
||||
DrawTexture(fudesumi, 500, -30, RL_WHITE); // Using custom shader
|
||||
|
||||
// Activate our default shader for next drawings
|
||||
EndShaderMode();
|
||||
|
||||
DrawText("(c) Fudesumi sprite by Eiden Marsal", 380, screenHeight - 20, 10, GRAY);
|
||||
DrawText("(c) Fudesumi sprite by Eiden Marsal", 380, screenHeight - 20, 10, RL_GRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue