Comments (9)
Another promising implementation is PortableGL from @rswinkle.
from raylib.
I'm currently working on verifying that all the necessary features for rlgl are implemented and reviewing the API to facilitate its integration.
Firstly, we should therefore think about how to update the window framebuffer in a simple and efficient way.
The first idea that comes to mind would be, roughly, to add a #ifdef SOFTWARE_RENDERING
case in the EndDrawing()
function and proceed with the update here, but this goes beyond the "framework of rlgl."
And there are also other points that may require consideration, such as the fact that "textures" are not managed via identifiers by PixelForge but are full-fledged structures.
from raylib.
is that replacing OpenGL?
from raylib.
is that replacing OpenGL?
For software rendering; Yes
Entirely: No
@raysan5 Otherwise, if the fact that textures are managed via structs and not by identifiers with PixelForge is an issue for its integration into raylib, there is TinyGL by Fabrice Bellard, and another repository that has taken it up: https://github.com/C-Chads/tinygl/tree/main
I don't plan to change the fact that textures are managed by structs to do like TinyGL, my library is intended to be inspired by the OpenGL 1 API but not entirely copied.
Perhaps TinyGL would be much simpler to integrate than PixelForge in this regard.
On the other hand, the fact that glOrtho
is missing in TinyGL can also be problematic for raylib...
I have almost implemented everything necessary compared to TinyGL, and plan to implement the missing functions, some of which have already been done like glOrtho
or glPointSize
for example.
from raylib.
Also, one thing I've considered is that mesh uploading to the GPU happens automatically in most cases, which might need to be reviewed, perhaps with definition checks.
And UploadMesh
should be removed, no ? (or rather that the function does nothing)
The Material
structure would also need to be reconsidered in the case of software rendering support.
It's quite tight since raylib uses glfw by default, we'll have to deal with OpenGL directly.
With SDL, it's simpler because we can easily access a window's surface and update it directly, SDL handles everything in the background.
Edit: For the issue of textures not being managed by ID in PixelForge, we could perhaps do something like typedef pfTexture Texture2D;
for its integration into raylib?
But this suggestion clearly falls outside the scope of RLGL.
After checking, I realize that if we intend to make this addition to raylib from rlgl, it would require modifying a certain number of function signatures, which is not feasible.
PixelForge therefore does not seem to be the most suitable choice unfortunately for doing it this way.
TinyGL would be much simpler to implement, but it would require a version that adds at least support for 'glOrtho'.
I would be happy to do it if it's for raylib!
from raylib.
One thing I'm thinking about all this...
The basic idea would be to enable software rendering via rlgl, but that would remove OpenGL support from rlgl (for software rendering), while it would still be needed with glfw in the context of raylib, so using OpenGL outside of rlgl seems odd to me.
If you say rlgl can, for example, handle texture updates via OpenGL itself while being compiled in "software" mode, I would find that even stranger.
The ideal solution would therefore be to allow the use of both rendering modes, via a switch between the two modes for example.
Well, it's easy to say, but much harder to do properly, it's just an idea.
from raylib.
Another promising implementation is PortableGL from @rswinkle.
I am look at like the pook. Impressive.
from raylib.
Another promising implementation is PortableGL from @rswinkle.
I am look at like the pook. Impressive.
Really yes, we really need to look into this further, it would be great at first glance for raylib
from raylib.
It sounds promising. A software renderer may enable more use cases of Raylib, such as image rendering on servers without OpenGL context.
from raylib.
Related Issues (20)
- [rcore] Replay record finish can't stop move (always keydown) HOT 2
- [rcore] The content can't be rendered correctly in fullscreen mode. HOT 3
- [rcore] `ToggleFullscreen()` not working as expected with HighDPI mode enabled HOT 2
- [rshape] Line drawing functions are no longer pixel-perfect HOT 1
- [rcore] Render issue when window is partially move outside of the monitor HOT 2
- [rcore] uncapped framerate not working properly with SDL platform HOT 3
- [rcore] Get keys that are pressed again, like chars HOT 1
- [rtextures.c] ColorToInt(RED) is UB HOT 12
- [raudio] WaveCrop() is broken HOT 1
- [rmodels] Read uninitialized values in `GenMeshTangents()` HOT 1
- [rmodels] "matModel" shader uniform is not multiplied with the push/pop matrix stack HOT 3
- [raylib-cs] WARNING: GLFW: Failed to find selected monitor HOT 1
- [rcore] Inconsistency in the API between `GetGamepadButtonPressed` and `GetKeyPressed` HOT 3
- [rcore] Allow opening wayland layer surfaces with raylib HOT 13
- [build] Zig emscripten build broken? HOT 5
- [rtext] Issues about font loading HOT 4
- [rcore] KeyboardKey only supports American keyboard HOT 3
- Cheatsheet Needs updated HOT 1
- DrawCylinder() draws overlapping geometry in certain cases HOT 2
- [build] CMake error trying to build examples HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raylib.