Customised example executable for project

This commit is contained in:
Jonathan Moallem 2020-11-24 19:34:28 +11:00
parent ea8aca10d3
commit f2a478ddab
2 changed files with 11 additions and 25 deletions

View File

@ -14,11 +14,11 @@ I guess we just don't want the added headache. CMake is complex and sometimes fe
So that being said, we hope that this repository finds you well and wholeheartedly enjoying the *simple things in life* (i.e. video games programming).
### Current Compatibility
| OS | Default Compiler | Last Built On | Status |
| ----------- | ---------------- | ------------------ | -------- |
| **macOS** | Clang++ | `Big Sur 11.0.1` | ![macOS Status](https://github.com/CapsCollective/raylib-cpp-starter/workflows/macOS/badge.svg) |
| **Linux** | G++ | `Ubuntu 20.04 LTS` | ![Linux Status](https://github.com/CapsCollective/raylib-cpp-starter/workflows/Ubuntu/badge.svg) |
| **Windows** | MinGW (G++) | `Windows 10 19041` | ![Windows Status](https://github.com/CapsCollective/raylib-cpp-starter/workflows/Windows/badge.svg) |
| OS | Default Compiler | Last Manual Build | Compile Status |
| ----------- | ---------------- | ------------------- | ---------------- |
| **macOS** | Clang++ | `Big Sur 11.0.1` | ![macOS Status](https://github.com/CapsCollective/raylib-cpp-starter/workflows/macOS/badge.svg) |
| **Linux** | G++ | `Ubuntu 20.04 LTS` | ![Linux Status](https://github.com/CapsCollective/raylib-cpp-starter/workflows/Ubuntu/badge.svg) |
| **Windows** | MinGW (G++) | `Windows 10 19041` | ![Windows Status](https://github.com/CapsCollective/raylib-cpp-starter/workflows/Windows/badge.svg) |
## Getting Started
@ -70,14 +70,6 @@ Unfortunately **we do not yet have automated project setup configured for Window
- It is recommended that your code should go into the `/src` directory, which is automatically included in the compile process when you run `make`.
- If you wish to change the program entry point from `/src/main.cpp`, add more libraries, or really anything about your project, all build instructions are specified in the `Makefile` no smoke and mirrors!
## Todo
- [x] Get static linking to work with C++ bindings
- [x] Setup for at least one compiler on each platform
- [x] Add raylib-cpp as vendor for procedural builds and auto-updating
- [x] Set up CI/CD with GitHub Actions and Make
- [ ] Test with multiple compilers on each platform
- [ ] Add compiler specification options
## Contributing
### How do I contribute?

View File

@ -1,34 +1,28 @@
#include <raylib-cpp.hpp>
int main() {
// Initialization
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
raylib::Color textColor(LIGHTGRAY);
raylib::Window w(screenWidth, screenHeight, "raylib [core] example - basic window");
raylib::Color textColor(LIGHTGRAY);
raylib::Window w(screenWidth, screenHeight, "Raylib C++ Starter Kit Example");
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!w.ShouldClose()) // Detect window close button or ESC key
while (!w.ShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
// TODO: Update your variables here
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
textColor.DrawText("Congrats! You created your first window!", 190, 200, 20);
EndDrawing();
//----------------------------------------------------------------------------------
}
return 0;