Function has been reviewed to avoid any direct OpenGL call and use rlgl functionality, also, GenDrawCube() has been replaced by the internal batch system with DrawCube().
WARNING: rlEnableTexture() call must be issued after enabling the current framebuffer when using batch mechanism because it includes a set of security checks to avoid batch overflow and push/pop matrix operations.
* fixed wrong error message for input device
* error message without errnofor input device on RPI
to prevent from including additional header
Co-authored-by: kkl <klingenberger@bfmc.de>
This redesign allows more flexibility when creating RenderTexture and a simplification (and hopefully removal) of `GenTexture*()` functions, that should not belong to this model but the user code, due to the use of custom shaders.
Also, this new API opens the door for a possible GBuffers type and advance rendering possibilities...
Some functions of the API have been also simplified or even removed.
rlgl module can be used as an standalone library, so, a version for the library has been added: v3.1.0, matching current raylib version.
Before deleting certain objects, they must be detached from their parents. That's the case for shader objects after linkage to shader program and also for the texture/cubemaps/renderbuffers attached to framebuffers. If objects are deleted before detached, they are kept in memory to avoid accessing deleted data.