2023-05-21 20:32:50 +00:00
|
|
|
/*******************************************************************************************
|
|
|
|
*
|
|
|
|
* raylib [shapes] example - Draw raylib logo using basic shapes
|
|
|
|
*
|
|
|
|
* Example originally created with raylib 1.0, last time updated with raylib 1.0
|
|
|
|
*
|
|
|
|
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
|
|
|
* BSD-like license that allows static linking with closed source software
|
|
|
|
*
|
|
|
|
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
|
|
|
*
|
|
|
|
********************************************************************************************/
|
|
|
|
// Initialization
|
|
|
|
//--------------------------------------------------------------------------------------
|
|
|
|
const screenWidth = 800;
|
|
|
|
const screenHeight = 450;
|
|
|
|
|
|
|
|
initWindow(screenWidth, screenHeight, "raylib [shapes] example - raylib logo using shapes");
|
|
|
|
|
|
|
|
setTargetFPS(60); // Set our game to run at 60 frames-per-second
|
|
|
|
//--------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// Main game loop
|
|
|
|
while (!windowShouldClose()) // Detect window close button or ESC key
|
|
|
|
{
|
|
|
|
// Update
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
// TODO: Update your variables here
|
|
|
|
//----------------------------------------------------------------------------------
|
2023-05-22 17:06:19 +00:00
|
|
|
|
2023-05-21 20:32:50 +00:00
|
|
|
// Draw
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
beginDrawing();
|
|
|
|
|
|
|
|
clearBackground(RAYWHITE);
|
|
|
|
|
|
|
|
drawRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256, BLACK);
|
|
|
|
drawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, GOLD);
|
|
|
|
drawText("rayjs", screenWidth/2 - 38, screenHeight/2 + 48, 50, BLACK);
|
|
|
|
|
|
|
|
drawText("this is NOT a texture!", 350, 370, 10, GRAY);
|
|
|
|
|
|
|
|
endDrawing();
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
}
|
|
|
|
|
|
|
|
// De-Initialization
|
|
|
|
//--------------------------------------------------------------------------------------
|
|
|
|
closeWindow(); // Close window and OpenGL context
|
|
|
|
//--------------------------------------------------------------------------------------
|
|
|
|
|