mirror of
https://github.com/raysan5/raylib.git
synced 2026-11-25 09:01:47 -05:00
Compare commits
8 Commits
476557af33
...
ecd15c050a
| Author | SHA1 | Date | |
|---|---|---|---|
| ecd15c050a | |||
| bf52446d03 | |||
| 91780fc539 | |||
| 01d3bf67b9 | |||
| 6e4b52f9b2 | |||
| c2874104e8 | |||
| e9ca9f705d | |||
| 41f59af2bb |
@ -69,7 +69,7 @@ This is a set of recommendations and guidelines for binding authors, meant to he
|
|||||||
| [KaylibKit](https://codeberg.org/Kenta/KaylibKit) | 4.5 | [Kotlin/native](https://kotlinlang.org) | Zlib |
|
| [KaylibKit](https://codeberg.org/Kenta/KaylibKit) | 4.5 | [Kotlin/native](https://kotlinlang.org) | Zlib |
|
||||||
| [raylib-lua](https://github.com/TSnake41/raylib-lua) | 5.5 | [Lua](http://www.lua.org) | ISC |
|
| [raylib-lua](https://github.com/TSnake41/raylib-lua) | 5.5 | [Lua](http://www.lua.org) | ISC |
|
||||||
| [raylib-lua-bindings](https://github.com/legendaryredfox/raylib-lua-bindings) | **6.2** | [Lua](http://www.lua.org) | MIT |
|
| [raylib-lua-bindings](https://github.com/legendaryredfox/raylib-lua-bindings) | **6.2** | [Lua](http://www.lua.org) | MIT |
|
||||||
| [ReiLua](https://github.com/nullstare/ReiLua) | **6.0** | [Lua](http://www.lua.org) | MIT |
|
| [ReiLua](https://github.com/nullstare/ReiLua) | **6.2** | [Lua](http://www.lua.org) | MIT |
|
||||||
| [raylib-lua-sol](https://github.com/RobLoach/raylib-lua-sol) | 5.5 | [Lua](http://www.lua.org) | Zlib |
|
| [raylib-lua-sol](https://github.com/RobLoach/raylib-lua-sol) | 5.5 | [Lua](http://www.lua.org) | Zlib |
|
||||||
| [raylib-luajit](https://github.com/homma/raylib-luajit) | 5.5 | [Lua](http://www.lua.org) | MIT |
|
| [raylib-luajit](https://github.com/homma/raylib-luajit) | 5.5 | [Lua](http://www.lua.org) | MIT |
|
||||||
| [raylib-luajit-generated](https://github.com/james2doyle/raylib-luajit-generated) | 5.5 | [Lua](http://www.lua.org) | MIT |
|
| [raylib-luajit-generated](https://github.com/james2doyle/raylib-luajit-generated) | 5.5 | [Lua](http://www.lua.org) | MIT |
|
||||||
|
|||||||
@ -334,7 +334,6 @@ int main(void)
|
|||||||
rlUnloadTexture(gBuffer.positionTextureId);
|
rlUnloadTexture(gBuffer.positionTextureId);
|
||||||
rlUnloadTexture(gBuffer.normalTextureId);
|
rlUnloadTexture(gBuffer.normalTextureId);
|
||||||
rlUnloadTexture(gBuffer.albedoSpecTextureId);
|
rlUnloadTexture(gBuffer.albedoSpecTextureId);
|
||||||
rlUnloadTexture(gBuffer.depthRenderbufferId);
|
|
||||||
|
|
||||||
CloseWindow(); // Close window and OpenGL context
|
CloseWindow(); // Close window and OpenGL context
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -61,8 +61,7 @@ int main(void)
|
|||||||
fontSDF.baseSize = 16;
|
fontSDF.baseSize = 16;
|
||||||
fontSDF.glyphCount = 95;
|
fontSDF.glyphCount = 95;
|
||||||
// Parameters > font size: 16, no glyphs array provided (0), glyphs count: 0 (defaults to 95)
|
// Parameters > font size: 16, no glyphs array provided (0), glyphs count: 0 (defaults to 95)
|
||||||
fontSDF.glyphs = LoadFontData(fileData, fileSize, 16, 0, 0, FONT_SDF, &
|
fontSDF.glyphs = LoadFontData(fileData, fileSize, 16, 0, 0, FONT_SDF, &fontSDF.glyphCount);
|
||||||
fontSDF.glyphCount);
|
|
||||||
// Parameters > glyphs count: 95, font size: 16, glyphs padding in image: 0 px, pack method: 1 (Skyline algorythm)
|
// Parameters > glyphs count: 95, font size: 16, glyphs padding in image: 0 px, pack method: 1 (Skyline algorythm)
|
||||||
atlas = GenImageFontAtlas(fontSDF.glyphs, &fontSDF.recs, 95, 16, 0, 1);
|
atlas = GenImageFontAtlas(fontSDF.glyphs, &fontSDF.recs, 95, 16, 0, 1);
|
||||||
fontSDF.texture = LoadTextureFromImage(atlas);
|
fontSDF.texture = LoadTextureFromImage(atlas);
|
||||||
|
|||||||
@ -1666,6 +1666,30 @@ int InitPlatform(void)
|
|||||||
// Close platform
|
// Close platform
|
||||||
void ClosePlatform(void)
|
void ClosePlatform(void)
|
||||||
{
|
{
|
||||||
|
#if !defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||||
|
// Close surface, context and display
|
||||||
|
// NOTE: EGL must be released before the GBM surface and device it was created on
|
||||||
|
if (platform.device != EGL_NO_DISPLAY)
|
||||||
|
{
|
||||||
|
eglMakeCurrent(platform.device, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||||
|
|
||||||
|
if (platform.surface != EGL_NO_SURFACE)
|
||||||
|
{
|
||||||
|
eglDestroySurface(platform.device, platform.surface);
|
||||||
|
platform.surface = EGL_NO_SURFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (platform.context != EGL_NO_CONTEXT)
|
||||||
|
{
|
||||||
|
eglDestroyContext(platform.device, platform.context);
|
||||||
|
platform.context = EGL_NO_CONTEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
eglTerminate(platform.device);
|
||||||
|
platform.device = EGL_NO_DISPLAY;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (platform.prevFB)
|
if (platform.prevFB)
|
||||||
{
|
{
|
||||||
drmModeRmFB(platform.fd, platform.prevFB);
|
drmModeRmFB(platform.fd, platform.prevFB);
|
||||||
@ -1712,27 +1736,6 @@ void ClosePlatform(void)
|
|||||||
platform.fd = -1;
|
platform.fd = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
|
||||||
// Close surface, context and display
|
|
||||||
if (platform.device != EGL_NO_DISPLAY)
|
|
||||||
{
|
|
||||||
if (platform.surface != EGL_NO_SURFACE)
|
|
||||||
{
|
|
||||||
eglDestroySurface(platform.device, platform.surface);
|
|
||||||
platform.surface = EGL_NO_SURFACE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (platform.context != EGL_NO_CONTEXT)
|
|
||||||
{
|
|
||||||
eglDestroyContext(platform.device, platform.context);
|
|
||||||
platform.context = EGL_NO_CONTEXT;
|
|
||||||
}
|
|
||||||
|
|
||||||
eglTerminate(platform.device);
|
|
||||||
platform.device = EGL_NO_DISPLAY;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CORE.Window.shouldClose = true; // Added to force threads to exit when the close window is called
|
CORE.Window.shouldClose = true; // Added to force threads to exit when the close window is called
|
||||||
|
|
||||||
// Close the evdev devices
|
// Close the evdev devices
|
||||||
@ -1753,6 +1756,12 @@ void ClosePlatform(void)
|
|||||||
close(platform.keyboardFd);
|
close(platform.keyboardFd);
|
||||||
platform.keyboardFd = -1;
|
platform.keyboardFd = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if SUPPORT_SSH_KEYBOARD_RPI
|
||||||
|
// Restore the terminal now, not only at exit: InitKeyboard() of a later InitWindow()
|
||||||
|
// would otherwise save the modified settings as the ones to restore
|
||||||
|
RestoreKeyboard();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SUPPORT_SSH_KEYBOARD_RPI
|
#if SUPPORT_SSH_KEYBOARD_RPI
|
||||||
|
|||||||
@ -820,12 +820,10 @@ Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int
|
|||||||
{
|
{
|
||||||
wave.frameCount = (unsigned int)wav.totalPCMFrameCount;
|
wave.frameCount = (unsigned int)wav.totalPCMFrameCount;
|
||||||
wave.sampleRate = wav.sampleRate;
|
wave.sampleRate = wav.sampleRate;
|
||||||
wave.sampleSize = 16;
|
wave.sampleSize = wav.bitsPerSample;
|
||||||
wave.channels = wav.channels;
|
wave.channels = wav.channels;
|
||||||
wave.data = (short *)RL_CALLOC((size_t)wave.frameCount*wave.channels, sizeof(short));
|
wave.data = RL_CALLOC((size_t)wave.frameCount*wave.channels*wave.sampleSize/8, 1);
|
||||||
|
drwav_read_pcm_frames(&wav, wave.frameCount, (drwav_int16 *)wave.data);
|
||||||
// NOTE: Forcing conversion to 16bit sample size on reading
|
|
||||||
drwav_read_pcm_frames_s16(&wav, wave.frameCount, (drwav_int16 *)wave.data);
|
|
||||||
}
|
}
|
||||||
else TRACELOG(LOG_WARNING, "WAVE: Failed to load WAV data");
|
else TRACELOG(LOG_WARNING, "WAVE: Failed to load WAV data");
|
||||||
|
|
||||||
|
|||||||
@ -3919,7 +3919,7 @@ bool rlFramebufferComplete(unsigned int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Unload framebuffer from GPU memory
|
// Unload framebuffer from GPU memory
|
||||||
// NOTE: All attached textures/cubemaps/renderbuffers are also deleted
|
// WARNING: All attached depth-textures/renderbuffers are also deleted
|
||||||
void rlUnloadFramebuffer(unsigned int id)
|
void rlUnloadFramebuffer(unsigned int id)
|
||||||
{
|
{
|
||||||
#if (defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) || defined(GRAPHICS_API_OPENGL_SOFTWARE))
|
#if (defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) || defined(GRAPHICS_API_OPENGL_SOFTWARE))
|
||||||
|
|||||||
Reference in New Issue
Block a user