(v5.0)
raylib for QB64-PE is a QB64-PE binding library for raylib. raylib is a simple and easy-to-use library to enjoy videogames programming.
raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's specially well suited for prototyping, tooling, graphical applications, embedded systems and education.
API | Windows (x86-64) | Linux (x86-64) | macOS (x86-64) |
---|---|---|---|
core | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
reasings | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
physac | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
raymath | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
raygui | :x: | :x: | :x: |
' raylib [core] example - Basic window
'$INCLUDE:'include/raylib.bi'
Const screenWidth = 800
Const screenHeight = 450
InitWindow screenWidth, screenHeight, "raylib [core] example - basic window"
SetTargetFPS 60
Do Until WindowShouldClose
BeginDrawing
ClearBackground RAYWHITE
DrawText "Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY
EndDrawing
Loop
CloseWindow
System
'$INCLUDE:'include/raylib.bas'
More examples are available in the repository.
Why are you loading the shared library using C/C++? Why not use QB64's built-in DECLARE DYNAMIC LIBRARY
?
DECLARE DYNAMIC LIBRARY
to keep things simple. However, some QB64 language limitations got in the way. For example, you cannot return UTDs from functions and subs and functions cannot take UDT variables by value (yet). raylib does a lot of both. So, I had to make a hard choice of wrapping these functions in C/C++ in a QB64-friendly way. Also, I used a custom autogen program to do the heavy lifting and it made a lot of sense to do the autogen to C/C++.Why does some raylib TYPEs like Camera, Texture2D, Sound etc. generate an error?
R
is prefixed to the raylib identifier. Hence, Font become RFont, Sound becomes RSound and so on.Why have you changed a lot of raylib functions like LoadTexture
, GetMousePosition
, GetMonitorPosition
etc. to QB64 SUB
s? Should't these be FUNCTIONS
s?
FUNCTION
s (yet) and many raylib functions return UDTs. So, to work around this limitation, I changed many raylib functions to SUB
s that would otherwise be a FUNCTION
. The return value is returned to the caller via a SUB parameter. This is usually the last parameter and has the name retVal
.What QB64 statements and functions should I avoid while using raylib?
Does all of raylib work with QB64?
Which version of QB64 should I use with raylib-64?
I found a bug. How can I help?
Made with ❤️ by a740g