Skip to content

Commit 040fd2b

Browse files
authored
Merge pull request #522 from damntourists/issue-521-update_c_sources
Updating to latest release of raylib
2 parents 17d5a83 + ef4434a commit 040fd2b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+22174
-5567
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ package main
8181
import rl "github.com/gen2brain/raylib-go/raylib"
8282

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

87-
rl.SetTargetFPS(60)
87+
rl.SetTargetFPS(60)
8888

89-
for !rl.WindowShouldClose() {
90-
rl.BeginDrawing()
89+
for !rl.WindowShouldClose() {
90+
rl.BeginDrawing()
9191

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

95-
rl.EndDrawing()
96-
}
95+
rl.EndDrawing()
96+
}
9797
}
9898
```
9999

examples/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module examples
22

3-
go 1.21
3+
go 1.22.0
44

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

physics/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/gen2brain/raylib-go/physics
22

3-
go 1.21
3+
go 1.22.0
44

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

raygui/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/gen2brain/raylib-go/raygui
22

3-
go 1.21
3+
go 1.22.0
44

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

raylib/cgo_linux_drm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ package rl
55

66
/*
77
#cgo linux,drm LDFLAGS: -lGLESv2 -lEGL -ldrm -lgbm -lpthread -lrt -lm -ldl
8-
#cgo linux,drm CFLAGS: -DPLATFORM_DRM -DGRAPHICS_API_OPENGL_ES2 -DEGL_NO_X11 -I/usr/include/libdrm
8+
#cgo linux,drm CFLAGS: -DPLATFORM_DRM -DGRAPHICS_API_OPENGL_ES2 -DEGL_NO_X11 -I/usr/include/libdrm -include stdint.h -Duint=uint32_t
99
*/
1010
import "C"

raylib/config.h

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,18 @@
4949
#define SUPPORT_RPRAND_GENERATOR 1
5050
// Mouse gestures are directly mapped like touches and processed by gestures system
5151
#define SUPPORT_MOUSE_GESTURES 1
52-
// Reconfigure standard input to receive key inputs, works with SSH connection.
52+
// Reconfigure standard input to receive key inputs, works with SSH connection
5353
#define SUPPORT_SSH_KEYBOARD_RPI 1
54-
// Setting a higher resolution can improve the accuracy of time-out intervals in wait functions.
55-
// However, it can also reduce overall system performance, because the thread scheduler switches tasks more often.
54+
// Setting a higher resolution can improve the accuracy of time-out intervals in wait functions
55+
// However, it can also reduce overall system performance, because the thread scheduler switches tasks more often
5656
#define SUPPORT_WINMM_HIGHRES_TIMER 1
5757
// Use busy wait loop for timing sync, if not defined, a high-resolution timer is set up and used
5858
//#define SUPPORT_BUSY_WAIT_LOOP 1
5959
// 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
6060
#define SUPPORT_PARTIALBUSY_WAIT_LOOP 1
6161
// Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()
62+
// WARNING: It also requires SUPPORT_IMAGE_EXPORT and SUPPORT_FILEFORMAT_PNG flags
6263
#define SUPPORT_SCREEN_CAPTURE 1
63-
// Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()
64-
#define SUPPORT_GIF_RECORDING 1
6564
// Support CompressData() and DecompressData() functions
6665
#define SUPPORT_COMPRESSION_API 1
6766
// Support automatic generated events, loading and recording of those events when required
@@ -76,7 +75,7 @@
7675
#define SUPPORT_CLIPBOARD_IMAGE 1
7776

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

98-
9997
// rcore: Configuration values
10098
//------------------------------------------------------------------------------------
10199
#define MAX_FILEPATH_CAPACITY 8192 // Maximum file paths capacity
@@ -136,8 +134,8 @@
136134

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

139-
#define RL_CULL_DISTANCE_NEAR 0.001 // Default projection matrix near cull distance
140-
#define RL_CULL_DISTANCE_FAR 10000.0 // Default projection matrix far cull distance
137+
#define RL_CULL_DISTANCE_NEAR 0.05 // Default projection matrix near cull distance
138+
#define RL_CULL_DISTANCE_FAR 4000.0 // Default projection matrix far cull distance
141139

142140
// Default shader vertex attribute locations
143141
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION 0
@@ -153,7 +151,6 @@
153151
#endif
154152
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCE_TX 9
155153

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

176-
177173
//------------------------------------------------------------------------------------
178174
// Module: rshapes - Configuration Flags
179175
//------------------------------------------------------------------------------------
@@ -185,15 +181,14 @@
185181
//------------------------------------------------------------------------------------
186182
#define SPLINE_SEGMENT_DIVISIONS 24 // Spline segments subdivisions
187183

188-
189184
//------------------------------------------------------------------------------------
190185
// Module: rtextures - Configuration Flags
191186
//------------------------------------------------------------------------------------
192-
// Selecte desired fileformats to be supported for image data loading
187+
// Selected desired fileformats to be supported for image data loading
193188
#define SUPPORT_FILEFORMAT_PNG 1
194-
#define SUPPORT_FILEFORMAT_BMP 1
189+
//#define SUPPORT_FILEFORMAT_BMP 1
195190
//#define SUPPORT_FILEFORMAT_TGA 1
196-
#define SUPPORT_FILEFORMAT_JPG 1
191+
//#define SUPPORT_FILEFORMAT_JPG 1
197192
#define SUPPORT_FILEFORMAT_GIF 1
198193
#define SUPPORT_FILEFORMAT_QOI 1
199194
//#define SUPPORT_FILEFORMAT_PSD 1
@@ -213,7 +208,6 @@
213208
// If not defined, still some functions are supported: ImageFormat(), ImageCrop(), ImageToPOT()
214209
#define SUPPORT_IMAGE_MANIPULATION 1
215210

216-
217211
//------------------------------------------------------------------------------------
218212
// Module: rtext - Configuration Flags
219213
//------------------------------------------------------------------------------------
@@ -223,24 +217,26 @@
223217
// Selected desired font fileformats to be supported for loading
224218
#define SUPPORT_FILEFORMAT_TTF 1
225219
#define SUPPORT_FILEFORMAT_FNT 1
226-
#define SUPPORT_FILEFORMAT_BDF 1
220+
//#define SUPPORT_FILEFORMAT_BDF 1
227221

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

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

231+
// Support conservative font atlas size estimation
232+
//#define SUPPORT_FONT_ATLAS_SIZE_CONSERVATIVE 1
233+
237234
// rtext: Configuration values
238235
//------------------------------------------------------------------------------------
239236
#define MAX_TEXT_BUFFER_LENGTH 1024 // Size of internal static buffers used on some functions:
240237
// TextFormat(), TextSubtext(), TextToUpper(), TextToLower(), TextToPascal(), TextSplit()
241238
#define MAX_TEXTSPLIT_COUNT 128 // Maximum number of substrings to split: TextSplit()
242239

243-
244240
//------------------------------------------------------------------------------------
245241
// Module: rmodels - Configuration Flags
246242
//------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)