Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ba7081f
Updating to latest release of raylib.
damntourists Dec 10, 2025
5071923
Merge branch 'gen2brain:master' into issue-521-update_c_sources
damntourists Dec 10, 2025
2d7d6c5
remove external glfw deps and rglfw.c file which are not present in g…
damntourists Dec 10, 2025
4ef5360
Added SDL2 and SDL3 separation for build and test. Added macos and wi…
damntourists Dec 11, 2025
b2119fc
Update test-sdl to call sdl2 build tag instead of sdl.
damntourists Dec 11, 2025
87105f2
Update sdl build tag name to sdl2 to avoid confusion.
damntourists Dec 11, 2025
88b0599
Add -DSDL_UNIX_CONSOLE_BUILD=ON to test-sdl3 github action job.
damntourists Dec 11, 2025
adfd0df
Fix test-sdl3 for windows. should be all lowercase: mingw-w64-x86_64-…
damntourists Dec 11, 2025
ede7ac2
Fix test-sdl3 for windows. Need to include PATH variable.
damntourists Dec 11, 2025
348201e
Fix test-sdl3 for windows. Path variable empty. Try another method.
damntourists Dec 11, 2025
a511810
Reverting build.yml and sdl2 build tag reverted to original name of sdl.
damntourists Dec 11, 2025
facd944
Add shim for sdl2 builds.
damntourists Dec 11, 2025
93bfc5a
Add sdl_shim.h for sdl2 builds.
damntourists Dec 11, 2025
a81f458
Revert README.md changes.
damntourists Dec 11, 2025
9c2e574
Revert README.md changes.
damntourists Dec 11, 2025
7a6149d
Merge remote-tracking branch 'origin/issue-521-update_c_sources' into…
damntourists Dec 11, 2025
7b368d3
Adding fixes from https://github.com/raysan5/raylib/issues/5403
damntourists Dec 19, 2025
d6a36ca
Reverting build.yml
damntourists Dec 24, 2025
59071ed
Removing previously added files for sdl3 workaround. Reverting cgo_pl…
damntourists Dec 24, 2025
1ca8e31
Fix for cgo_linux_drm.go compilation issues regarding uint type.
damntourists Dec 24, 2025
da2700f
Merge branch 'gen2brain:master' into issue-521-update_c_sources
damntourists Dec 24, 2025
4a8505c
Add undefine ALIGN if defined for jar_mx.h and updated android_main e…
damntourists Dec 28, 2025
ef4434a
Add !noaudio build tag to raudio.c
damntourists Dec 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ package main
import rl "github.com/gen2brain/raylib-go/raylib"

func main() {
rl.InitWindow(800, 450, "raylib [core] example - basic window")
defer rl.CloseWindow()
rl.InitWindow(800, 450, "raylib [core] example - basic window")
defer rl.CloseWindow()

rl.SetTargetFPS(60)
rl.SetTargetFPS(60)

for !rl.WindowShouldClose() {
rl.BeginDrawing()
for !rl.WindowShouldClose() {
rl.BeginDrawing()

rl.ClearBackground(rl.RayWhite)
rl.DrawText("Congrats! You created your first window!", 190, 200, 20, rl.LightGray)
rl.ClearBackground(rl.RayWhite)
rl.DrawText("Congrats! You created your first window!", 190, 200, 20, rl.LightGray)

rl.EndDrawing()
}
rl.EndDrawing()
}
}
```

Expand Down
2 changes: 1 addition & 1 deletion examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module examples

go 1.21
go 1.22.0

replace github.com/gen2brain/raylib-go/raylib => ../raylib

Expand Down
2 changes: 1 addition & 1 deletion physics/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gen2brain/raylib-go/physics

go 1.21
go 1.22.0

require github.com/gen2brain/raylib-go/raylib v0.0.0-20241202103652-5d50abe7c65b

Expand Down
2 changes: 1 addition & 1 deletion raygui/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gen2brain/raylib-go/raygui

go 1.21
go 1.22.0

require github.com/gen2brain/raylib-go/raylib v0.0.0-20241202103652-5d50abe7c65b

Expand Down
2 changes: 1 addition & 1 deletion raylib/cgo_linux_drm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ package rl

/*
#cgo linux,drm LDFLAGS: -lGLESv2 -lEGL -ldrm -lgbm -lpthread -lrt -lm -ldl
#cgo linux,drm CFLAGS: -DPLATFORM_DRM -DGRAPHICS_API_OPENGL_ES2 -DEGL_NO_X11 -I/usr/include/libdrm
#cgo linux,drm CFLAGS: -DPLATFORM_DRM -DGRAPHICS_API_OPENGL_ES2 -DEGL_NO_X11 -I/usr/include/libdrm -include stdint.h -Duint=uint32_t
*/
import "C"
34 changes: 15 additions & 19 deletions raylib/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,18 @@
#define SUPPORT_RPRAND_GENERATOR 1
// Mouse gestures are directly mapped like touches and processed by gestures system
#define SUPPORT_MOUSE_GESTURES 1
// Reconfigure standard input to receive key inputs, works with SSH connection.
// Reconfigure standard input to receive key inputs, works with SSH connection
#define SUPPORT_SSH_KEYBOARD_RPI 1
// Setting a higher resolution can improve the accuracy of time-out intervals in wait functions.
// However, it can also reduce overall system performance, because the thread scheduler switches tasks more often.
// Setting a higher resolution can improve the accuracy of time-out intervals in wait functions
// However, it can also reduce overall system performance, because the thread scheduler switches tasks more often
#define SUPPORT_WINMM_HIGHRES_TIMER 1
// Use busy wait loop for timing sync, if not defined, a high-resolution timer is set up and used
//#define SUPPORT_BUSY_WAIT_LOOP 1
// Use a partial-busy wait loop, in this case frame sleeps for most of the time, but then runs a busy loop at the end for accuracy
#define SUPPORT_PARTIALBUSY_WAIT_LOOP 1
// Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()
// WARNING: It also requires SUPPORT_IMAGE_EXPORT and SUPPORT_FILEFORMAT_PNG flags
#define SUPPORT_SCREEN_CAPTURE 1
// Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()
#define SUPPORT_GIF_RECORDING 1
// Support CompressData() and DecompressData() functions
#define SUPPORT_COMPRESSION_API 1
// Support automatic generated events, loading and recording of those events when required
Expand All @@ -76,7 +75,7 @@
#define SUPPORT_CLIPBOARD_IMAGE 1

// NOTE: Clipboard image loading requires support for some image file formats
// TODO: Those defines should probably be removed from here, I prefer to let the user manage them
// TODO: Those defines should probably be removed from here, letting the user manage them
#if defined(SUPPORT_CLIPBOARD_IMAGE)
#ifndef SUPPORT_MODULE_RTEXTURES
#define SUPPORT_MODULE_RTEXTURES 1
Expand All @@ -95,7 +94,6 @@
#endif
#endif


// rcore: Configuration values
//------------------------------------------------------------------------------------
#define MAX_FILEPATH_CAPACITY 8192 // Maximum file paths capacity
Expand Down Expand Up @@ -136,8 +134,8 @@

#define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported

#define RL_CULL_DISTANCE_NEAR 0.001 // Default projection matrix near cull distance
#define RL_CULL_DISTANCE_FAR 10000.0 // Default projection matrix far cull distance
#define RL_CULL_DISTANCE_NEAR 0.05 // Default projection matrix near cull distance
#define RL_CULL_DISTANCE_FAR 4000.0 // Default projection matrix far cull distance

// Default shader vertex attribute locations
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION 0
Expand All @@ -153,7 +151,6 @@
#endif
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCE_TX 9


// Default shader vertex attribute names to set location points
// NOTE: When a new shader is loaded, the following locations are tried to be set for convenience
#define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION
Expand All @@ -173,7 +170,6 @@
#define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1)
#define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)


//------------------------------------------------------------------------------------
// Module: rshapes - Configuration Flags
//------------------------------------------------------------------------------------
Expand All @@ -185,15 +181,14 @@
//------------------------------------------------------------------------------------
#define SPLINE_SEGMENT_DIVISIONS 24 // Spline segments subdivisions


//------------------------------------------------------------------------------------
// Module: rtextures - Configuration Flags
//------------------------------------------------------------------------------------
// Selecte desired fileformats to be supported for image data loading
// Selected desired fileformats to be supported for image data loading
#define SUPPORT_FILEFORMAT_PNG 1
#define SUPPORT_FILEFORMAT_BMP 1
//#define SUPPORT_FILEFORMAT_BMP 1
//#define SUPPORT_FILEFORMAT_TGA 1
#define SUPPORT_FILEFORMAT_JPG 1
//#define SUPPORT_FILEFORMAT_JPG 1
#define SUPPORT_FILEFORMAT_GIF 1
#define SUPPORT_FILEFORMAT_QOI 1
//#define SUPPORT_FILEFORMAT_PSD 1
Expand All @@ -213,7 +208,6 @@
// If not defined, still some functions are supported: ImageFormat(), ImageCrop(), ImageToPOT()
#define SUPPORT_IMAGE_MANIPULATION 1


//------------------------------------------------------------------------------------
// Module: rtext - Configuration Flags
//------------------------------------------------------------------------------------
Expand All @@ -223,24 +217,26 @@
// Selected desired font fileformats to be supported for loading
#define SUPPORT_FILEFORMAT_TTF 1
#define SUPPORT_FILEFORMAT_FNT 1
#define SUPPORT_FILEFORMAT_BDF 1
//#define SUPPORT_FILEFORMAT_BDF 1

// Support text management functions
// If not defined, still some functions are supported: TextLength(), TextFormat()
#define SUPPORT_TEXT_MANIPULATION 1

// On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rectangle
// at the bottom-right corner of the atlas. It can be useful to for shapes drawing, to allow
// drawing text and shapes with a single draw call [SetShapesTexture()].
// drawing text and shapes with a single draw call [SetShapesTexture()]
#define SUPPORT_FONT_ATLAS_WHITE_REC 1

// Support conservative font atlas size estimation
//#define SUPPORT_FONT_ATLAS_SIZE_CONSERVATIVE 1

// rtext: Configuration values
//------------------------------------------------------------------------------------
#define MAX_TEXT_BUFFER_LENGTH 1024 // Size of internal static buffers used on some functions:
// TextFormat(), TextSubtext(), TextToUpper(), TextToLower(), TextToPascal(), TextSplit()
#define MAX_TEXTSPLIT_COUNT 128 // Maximum number of substrings to split: TextSplit()


//------------------------------------------------------------------------------------
// Module: rmodels - Configuration Flags
//------------------------------------------------------------------------------------
Expand Down
Loading