Replies: 22 comments 64 replies
-
@raysan5 what can SDL do what GLFW can't? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your work on raylib. I think raylib has quietly put itself into a unique position as a defacto gamedev library for many languages that don't have large gamedev ecosystems - even if this was not your intention. While I think OpenGL provides everything an indie dev needs to be successful from technical point of view, my biggest concern is compatibility. Do I think Apple will remove OpenGL tomorrow? No, but I think it would go a long way for raylib to claim support for these 2 large audiences. |
Beta Was this translation helpful? Give feedback.
-
Side comment: With changes happening on the main trunk now, perhaps it's a good idea to update to a |
Beta Was this translation helpful? Give feedback.
-
@raysan5 I want to challenge the idea of supporting multiple backends, as I don't see the benefits. If the SDL2 support is considered, what's the additional value in supporting and maintaining GLFW and even the rest of the backends? Doesn't SDL2 cover all currently supported platforms plus additional platforms like iOS? And even thought SDL2 provides additional functionality, couldn't link-time optimizer help with that and remove unused functionality? |
Beta Was this translation helpful? Give feedback.
-
I've been looking at ways to put my VCrayApp through its paces once I put up the 0.1.0 (beta) release. I will use it in a VCrayVerify project that uses the raylib\examples and demonstrates their compilation and execution using the Visual Studio Development Tools distribution. The recent discussion of |
Beta Was this translation helpful? Give feedback.
-
There are problems with glfw in OpenBSD and NetBSD (and with raylib for that matter), but SDL there works nice. Also freeglut works nice but probably less features than the other two? The version of raylib (which is in pkgsrc/wip) that works in NetBSD is 4.0 on top of glfw 3.3.8 but it also has problems with the timing... for the 60 fps to look like 60 fps, you have to set the number much lower... Another thing to look at, the releasing of the mouse button causes a crash (it reports division by zero) in OpenBSD for the C and Pascal application, and in NetBSD only for the Pascal binding ... It seems to me that on these two platforms clang has better support... I do not want to report here bugs, my intention is to say that it might be worth to migrate it to SDL2 ... |
Beta Was this translation helpful? Give feedback.
-
Preparing for SDL3 would be a great move for raylib. There is a strong
motivation to port SDL on all operating systems defined by a single word:
games. No such things for glfw... and with freeglut is even worse regarding
PR. But it will take a while until SDL3 propagates on all operating
systems...
As for me (that I thought I finally found the final tool for a cross
platform solution and found out that glfw is no such thing). I will try to
adapt raygui to SDL2 as I need it and not willing to wait... This means of
course to start learning SDL2... freeglut is still an option for me...
…On Wed, Jun 14, 2023 at 8:28 PM Ray ***@***.***> wrote:
About the breaking changes or inter-operatibility, it should be possible
to just replace GLFW with SDL equivalent in a seamless way for raylib, the
main API shouldn't be affected, neither the bindings (that consume the .dll
directly) and only the building could require some tweak. That's not the
main concern.
Main concern is effectively point 3. The redesign and integration cost
could be considerable and also maintenance. I'm afraid at this moment I'm
not in the situation to assume that cost. Also, SDL3 is on the works, maybe
it could be a good moment to consider it again once released.
—
Reply to this email directly, view it on GitHub
<#2952 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGENS3QXBZW73CXC3Y3ISDXLHYEZANCNFSM6AAAAAAVS5EOAM>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Vasi
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately, at first glance (well, a few more and a wip mod, learning as I go), freeGLUT is the "dominant species" here, it does not allow polling as raylib needs... it takes control and dictates the terms. It will require one of the two things:
None of it in advantage of raylib :( ... it might work for private solutions that do not need API compatibility and provides only the end product... |
Beta Was this translation helpful? Give feedback.
-
What do you think about two new functions if(IsKeyDown(KEY_W) cam = MoveCamera(cam, {0.0, +1.0, 0.0});
if(IsKeyDown(KEY_S) cam = MoveCamera(cam, {0.0, -1.0, 0.0});
Vector2 mouse = GetMouseDelta();
cam = TurnCamera(cam, {mouse.x, mouse.y, 0.0}); |
Beta Was this translation helpful? Give feedback.
-
I'd like to see some sort of timing operations to use in games, namely timers that count down (for timed events and triggers) and sequencing of actions (for e.g. cutscenes, animation timing etc.). Example API:
/* (Timers) TimeOut & Interval */
// Timeout executes once
myTimeOut = CreateTimeout(float timeInSeconds, callbackWhenTimeOutCompletes);
StartTimeOut(myTimeOut); // starts the timeout countdown
PauseTimeOut(myTimeOut); // pauses the timeout, useful if your game has a pause screen
ResumeTimeOut(myTimeOut); // resume interval from paused state
FinishTimeOut(myTimeOut); // stops a timeout and executes the callback, also rewinds to be used again with a new StartTimeOut()
StopTimeOut(myTimeOut); // stops/interrupts a timeout without executing the callback, also rewinds to be used again with a new StartTimeOut()
float value = GetTimeOutProgress(); // returns the timeout's current point in time/seconds
DestroyTimeOut(); // clear from memory
// Interval executes over and over looping until cleared
myInterval = CreateInterval(float timeInSeconds, callbackWhenIntervalCompletes);
StartInterval(myInterval); // starts the interval countdown
PauseInterval(myInterval); // pauses the interval, useful if your game has a pause screen
ResumeInterval(myInterval); // resume interval from paused state
FinishInterval(myInterval); // stops an interval and executes the callback, also rewinds to be used again with a new StartInterval()
StopInterval(myInterval); // stops/interrupts an interval without executing the callback, also rewinds to be used again with a new StartInterval()
float value = GetIntervalProgress(); // returns the interval current point in time/seconds
DestroyInterval(myInterval); // clear from memory
/* Note instead of TimeOut and Interval, it could just be "Timer" and have a looping option in the CreateTimer() method to make it loop. TimeOut and Interval just looks more semantic to me. */ /* Sequences */
mySequence = CreateSequence(callbackWhenSequenceCompletes, bool looping = false); // looping set to true will cause sequence to loop after executing callbackWhenSequenceCompletes
AddFrameToSequence(mySequence, float timeInSeconds, callbackWhenTimeIsReached); // adds a callback to be executed when sequence reaches that time, all callbacks would have to be added before using StartSequence()
StartSequence(mySequence); // starts the sequence playback
PauseSequence(mySequence); // pauses the sequence, useful if your game has a pause screen
ResumeSequence(mySequence); // resume sequence from paused state
FinishSequence(mySequence); // stops the sequence, also executing any frame callbacks that remain along with callbackWhenSequenceCompletes
StopSequence(mySequence); // stops/interrupts the sequence without executing any more frame callbacks nor callbackWhenSequenceCompletes, also rewinds to be used again with
SetSequenceTimeScale(float value); // a multiplier for the playback speed of the sequence, useful if you want to speed or slow down the playback of the sequence, default is 1.0
float value = GetSequenceProgress(); // returns the sequence current point in time/seconds
DestroySequence(mySequence); // clear from memory |
Beta Was this translation helpful? Give feedback.
-
Software rendering could be cool, but i do not know how difficult that would be to add |
Beta Was this translation helpful? Give feedback.
-
What about improving Android ecosystem support so we can develop apps more easily? |
Beta Was this translation helpful? Give feedback.
-
Some additions to It would be nice to have functions that return In practice, I have avoided these functions altogether and implemented similar functionality in my own project when needed, but it does feel weird that there is this one section the base raylib library that has a caveat like this. Raylib generally keeps thing simple, so I'm not sure if adding a separate set of functions and needing to convey the idea memory ownership is worth sticking in the core library, but I did want to put it out there. I would volunteer to implement these functions you would like to make them a part of 5.0.
The main thing I get when compiling is a bunch of unused function warnings that produce a lot of noise. I can look into getting at least these cleaned up on Linux with GCC/clang. |
Beta Was this translation helpful? Give feedback.
-
Small question, I recently managed to port the 3 main raylib functions into SDL2 (InitWindow, WindowShouldClose & CloseWindow), would anyone be interested in the code? I’d love to contribute something. |
Beta Was this translation helpful? Give feedback.
-
I just checked the quaternion to euler functions and they appear to be okay to me? The euler2quaternion function is provably correct but there are a total of 12 solutions for quaternion2euler so i'm not too sure about that one since the formula in there doesn't match the one i know. But it seems to be working fine so i presume its just another solution i dont know |
Beta Was this translation helpful? Give feedback.
-
Dear Santa @raysan5, I wish Raylib5.0 will be configurable at runtime, including OpenGL version. PS : if you agree with this idea, I will try to contribute. |
Beta Was this translation helpful? Give feedback.
-
Hello. It seems to me that Raylib is missing a rather simple but important function. Setting a custom cursor image. GLFW has a fairly simple API. |
Beta Was this translation helpful? Give feedback.
-
My suggestion, I'm not sure if anyone already had it, is to improve raygui to be a basic and fully featured graphical library. Maybe improve/add some aspects like windows, docking, if some button is partially over another, don't click both of them, etc. |
Beta Was this translation helpful? Give feedback.
-
imgui does rendering every frame and it works just fine -- it even has docking -- all the menus and popups in these videos were done with imgui https://www.youtube.com/watch?v=V0fx4hBqbhc https://www.youtube.com/watch?v=Y0DE-nulnls you can go here and scroll down and see some projects people are using it for imgui has implementations for sdl, glfw, opengl and others |
Beta Was this translation helpful? Give feedback.
-
As far as I have watched in a dozen of game-engine-editors, most of the times developers prefer to implement their own GUI components in an object oriented style, but then leave the technical details to ImGui , to handle everything behind the scenes. For better or worse, this sort of object-oriented design brings clarity into large scale projects. On the other hand I have seen in other large-scale ImGui projects, that are implemented in a linear and monolithic way, and it makes them really hard to understand and to maintain. If you touch something the entire GUI breaks away. That being said, I think that there is a limit where immediate mode GUI is handy. Within small and isolated contexts is safe and easy to use, but as the scale opens up, there are a lot of more difficulties and dangers that lurk. The most plain and easy widget manager, is exactly the same as DatGUI, because is practical and streamlined. It does not do everything, but it does only a few things exactly as it needs to without troubles. You get the window and all widgets are auto aligned one-below-the-other. Another one that is somehow very interesting and works great as a paradigm, is Blender's GUI as you write Python addons. It certainly has restrictions and limitations, but this means that it brings sanity and a streamlined procedure on how the GUI is generated. (I am very sure that Python developers have a great respect for django framework, somehow they got inspired on this). For many years I write Blender GUIs in my addons and not even once I had troubles, while in ImGui I find it very easy to break everything by doing mistakes etc. So the plan for Raylib should be something like this: |
Beta Was this translation helpful? Give feedback.
-
Hey I am taking a break from professional dev work and spending some time in Mexico and I need a project to work on. I know there has been some talk about converting Raylib to use Vulkan and I am wondering if there has been any progress on this. I have nothing but time on my hands and want start work on something. I know Vulkan support has been on the wishlist, for a while now. What would be the best place to start if someone was going to add Vulkan support? |
Beta Was this translation helpful? Give feedback.
-
I'd would love to have official iOS support |
Beta Was this translation helpful? Give feedback.
-
Here it is a small wishlist with some possible improvements for future
raylib
versions.raylib
has grown A LOT in the last few years and maintenance is getting complicated. For nextraylib
release I'd like to focus efforts on library maintainability and a better testing of available features. I'd like to also focus on extra libraries and tools onraylib
ecosystem.Some numbers to take into consideration:
Here it is a list with several elements to review, divided by modules:
module:
rcore
rcore_desktop.c
-PLATFORM_DESKTOP
(Windows, Linux, macOS)rcore_android.c
-PLATFORM_ANDROID
rcore_native.c
-PLATFORM_DRM
/PLATFORM_RPI
rcore_web.c
-PLATFORM_WEB
rcore_glfw.c
- GLFW library basedrcore_sdl.c
- SDL library basedrcore_native.c
- Native implementationThere are about 45 functions depending on ~100 GLFW functions, those 45 functions should be reproduced separately for the different platforms/technologies and exposed through the same common API.
SDL
library backend:rcore_sdl.c
.SDL
library is an alternative toGLFW
, it's a bit bigger thanGLFW
and provides some additional functionality probably not required by raylib but it could be nice to support it as an alternative backend (only the main library, not the auxiliar ones).PLATFORM_RPI
backend. Raspberry Pi Legacy OS (based on Buster) is kind-of deprecated, it uses Broadcom propietary GPU drivers that have been superseeded by an open KMS (PLATFORM_DRM
) implementation. RemovingPLATFORM_RPI
will simplify code and maintenance.glad
OpenGL extensions library. Use only required expensions per OpenGL version instead of including ALL extensions, it will simplify building times, size and even initialization cost.module:
rlgl
module:
rtextures
Image
API already provides most of the functionality for 2D software rendeing, including basic shapes, text and even colors math transformations. Old related issue with more details: [core][texture][text][shapes] Software renderer for 2D #1370. Related discussion: Image Drawing Module #2865module:
rl_gputex
module:
rtext
stb_truetype
because most of the exposed advance API is not used by raylib.module:
rmodels
module:
raudio
module:
raymath
core_quat_conversion.c
) but it's not clear enough, it should also be reviewed.module:
rcamera
UpdateCameraEx()
/UpdateCameraPro
module:
rgestures
REDESIGN: Review the full module. Current implementation should be completely reviewed, it was originally created +7 year ago and it has many issues. Some of the desired features for the re-implementation would be:
TouchEvents
instead ofGestureEvent
-> More low-level data processingGestures system has been highly improved recently thanks to the contributor @ubkp.
module:
raygui
RAYGUI_STANDALONE
. Current implementation is very coupled to raylib and despite it can be used in standalone mode, implementation is quite difficult. It would be nice to completely decouple it from raylib (in a similar way toDearImGui
orNuklear
) and provide separate implementations depending on the required backend (i.e.raygui-raylib.h
provide binding functions for raylib).Fade()
function, not depending onguiAlpha
, it could be a problem with transparent framebuffers:GuiSliderPro()
. Slider is centered onmouse.x
position when mouse pressed over it, it shouldn't move in that case.GuiScrollPanel()
. For very big content, the scroll-bar slider could be extremely small, a minimum scroll-bar size should be fixed and scroll movement speed should be probably increased to compensate the minimum size of the slider.TEXT_LINE_SPACING
(DEFAULT controls) andTEXT_LINES_SPACING
(TextBox control) should be unified in some way.examples
core_3d_camera_free
. Displayed controls do not match and camera behaves strangely.models_mesh_instancing
. Not working properly on web, issues with the shader but ONLY when uploade to GitHub, it works as expected locally.Isses with several examples on macOS (and maybe other platforms):
custom_frame_control
. Produces a very flickery windowmodels_loading
. It seems to be buggy at selecting the model, needs some reviewskybox_loading
. Doesn't fill the entire window, only the bottom-left quadrantshader_hot_reloading
,shader_spotlight
. Scaling issue between the mouse and circle positionstop_down_lights
. Fully illuminated (no shadows are drawn) until light is movedIssues with several examples not working on
PLATFORM_WEB
:models_skybox
. WebGL: INVALID_VALUE: disableVertexAttribArray: index out of range _glDisableVertexAttribArray.core_custom_frame_control
.core_loading_thread
.core_window_flags
.raylib_opengl_interop
.rlgl_standalone
.Issues with several examples not working on
PLATFORM_DRM
:models_first_person_maze
,core_3d_camera_free
). Camera moving uncontrollably.shapes_draw_circle_sector
,shapes_draw_ring
). Cursor not showing.text_draw_3d
,text_input_box
). Can't type.audio_module_playing
. Crashing the Raspberry Pi after a few seconds.core_custom_frame_control
. Flickering and not working.core_vr_simulator
. Not rendering.models_skybox
. Not rendering.shaders_raymarching
. Not rendering.shaders_mesh_instancing
. Segmentation fault.rlgl_compute_shader
. Not workingraylib_opengl_interop
. Not compiling.rlgl_standalone
. Not compiling.misc
example.html
from the originalminshell.html
. Also, html minification should probably be avoided.There is also a number of open issues and PRs for review.
Those are some possible improvements for next raylib version. It's a long list and it requires lot of work. Note that not all those improvements are expected to be implemented, it's just a reference to follow for future raylib.
As always, contributions are welcome. Feel free to comment.
Beta Was this translation helpful? Give feedback.
All reactions