Skip to content

Instantly share code, notes, and snippets.

@tonetheman
Created June 16, 2022 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonetheman/a362ad5ac761c0dd354a485d6c4605b9 to your computer and use it in GitHub Desktop.
Save tonetheman/a362ad5ac761c0dd354a485d6c4605b9 to your computer and use it in GitHub Desktop.
#include <iostream>
#include "raylib.h"
int main(void) {
std::cout << "howdy" << std::endl;
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button
{
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
EndDrawing();
}
CloseWindow(); // Close window and OpenGL context
return 0;
}
all : junk junk2
junk : junk.cpp
gcc -o junk junk.cpp -lraylib -lopengl32 -lgdi32 -lwinmm -lstdc++
junk2 : junk.cpp
g++ -o junk2 junk.cpp -lraylib -lopengl32 -lgdi32 -lwinmm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment