Skip to content

Commit 9c02c2e

Browse files
committed
releases to 4.5
1 parent 3f8210a commit 9c02c2e

File tree

7 files changed

+65
-68
lines changed

7 files changed

+65
-68
lines changed

headers/extras/raygui.h

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
* VERSIONS HISTORY:
114114
* 3.5 (xx-xxx-2022) ADDED: Multiple new icons, useful for code editing tools
115115
* ADDED: GuiTabBar(), based on GuiToggle()
116-
* REMOVED: Unneeded icon editing functions
116+
* REMOVED: Unneeded icon editing functions
117117
* REDESIGNED: GuiDrawText() to divide drawing by lines
118118
* REMOVED: MeasureTextEx() dependency, logic directly implemented
119119
* REMOVED: DrawTextEx() dependency, logic directly implemented
@@ -1726,7 +1726,7 @@ bool GuiButton(Rectangle bounds, const char *text)
17261726
//--------------------------------------------------------------------
17271727
GuiDrawRectangle(bounds, GuiGetStyle(BUTTON, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(BUTTON, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(BUTTON, BASE + (state*3))), guiAlpha));
17281728
GuiDrawText(text, GetTextBounds(BUTTON, bounds), GuiGetStyle(BUTTON, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(BUTTON, TEXT + (state*3))), guiAlpha));
1729-
1729+
17301730
if (state == STATE_FOCUSED) GuiTooltip(bounds);
17311731
//------------------------------------------------------------------
17321732

@@ -2166,7 +2166,7 @@ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
21662166
{
21672167
GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_DISABLED)), guiAlpha));
21682168
}
2169-
else GuiDrawRectangle(bounds, 1, Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), BLANK);
2169+
else GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), BLANK);
21702170

21712171
if (editMode)
21722172
{
@@ -2477,7 +2477,7 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
24772477
{
24782478
GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_DISABLED)), guiAlpha));
24792479
}
2480-
else GuiDrawRectangle(bounds, 1, Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), BLANK);
2480+
else GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), BLANK);
24812481

24822482
int wrapMode = 1; // 0-No wrap, 1-Char wrap, 2-Word wrap
24832483
Vector2 cursorPos = { textAreaBounds.x, textAreaBounds.y };
@@ -2486,7 +2486,7 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
24862486
//int lastSpaceWidth = 0;
24872487
//int lastSpaceCursorPos = 0;
24882488

2489-
for (int i = 0, codepointSize = 0; text[i] != '\0'; i += codepointSize)
2489+
for (int i = 0, codepointSize = 0; (text != NULL) && (text[i] != '\0'); i += codepointSize)
24902490
{
24912491
int codepoint = GetCodepointNext(text + i, &codepointSize);
24922492
int index = GetGlyphIndex(guiFont, codepoint); // If requested codepoint is not found, we get '?' (0x3f)
@@ -3462,9 +3462,9 @@ void GuiLoadStyle(const char *fileName)
34623462
int propertyCount = 0;
34633463

34643464
fread(signature, 1, 4, rgsFile);
3465-
fread(&version, 1, sizeof(short), rgsFile);
3466-
fread(&reserved, 1, sizeof(short), rgsFile);
3467-
fread(&propertyCount, 1, sizeof(int), rgsFile);
3465+
fread(&version, sizeof(short), 1, rgsFile);
3466+
fread(&reserved, sizeof(short), 1, rgsFile);
3467+
fread(&propertyCount, sizeof(int), 1, rgsFile);
34683468

34693469
if ((signature[0] == 'r') &&
34703470
(signature[1] == 'G') &&
@@ -3477,9 +3477,9 @@ void GuiLoadStyle(const char *fileName)
34773477

34783478
for (int i = 0; i < propertyCount; i++)
34793479
{
3480-
fread(&controlId, 1, sizeof(short), rgsFile);
3481-
fread(&propertyId, 1, sizeof(short), rgsFile);
3482-
fread(&propertyValue, 1, sizeof(unsigned int), rgsFile);
3480+
fread(&controlId, sizeof(short), 1, rgsFile);
3481+
fread(&propertyId, sizeof(short), 1, rgsFile);
3482+
fread(&propertyValue, sizeof(unsigned int), 1, rgsFile);
34833483

34843484
if (controlId == 0) // DEFAULT control
34853485
{
@@ -3496,32 +3496,32 @@ void GuiLoadStyle(const char *fileName)
34963496
#if !defined(RAYGUI_STANDALONE)
34973497
// Load custom font if available
34983498
int fontDataSize = 0;
3499-
fread(&fontDataSize, 1, sizeof(int), rgsFile);
3499+
fread(&fontDataSize, sizeof(int), 1, rgsFile);
35003500

35013501
if (fontDataSize > 0)
35023502
{
35033503
Font font = { 0 };
35043504
int fontType = 0; // 0-Normal, 1-SDF
35053505
Rectangle whiteRec = { 0 };
35063506

3507-
fread(&font.baseSize, 1, sizeof(int), rgsFile);
3508-
fread(&font.glyphCount, 1, sizeof(int), rgsFile);
3509-
fread(&fontType, 1, sizeof(int), rgsFile);
3507+
fread(&font.baseSize, sizeof(int), 1, rgsFile);
3508+
fread(&font.glyphCount, sizeof(int), 1, rgsFile);
3509+
fread(&fontType, sizeof(int), 1, rgsFile);
35103510

35113511
// Load font white rectangle
3512-
fread(&whiteRec, 1, sizeof(Rectangle), rgsFile);
3512+
fread(&whiteRec, sizeof(Rectangle), 1, rgsFile);
35133513

35143514
// Load font image parameters
35153515
int fontImageUncompSize = 0;
35163516
int fontImageCompSize = 0;
3517-
fread(&fontImageUncompSize, 1, sizeof(int), rgsFile);
3518-
fread(&fontImageCompSize, 1, sizeof(int), rgsFile);
3517+
fread(&fontImageUncompSize, sizeof(int), 1, rgsFile);
3518+
fread(&fontImageCompSize, sizeof(int), 1, rgsFile);
35193519

35203520
Image imFont = { 0 };
35213521
imFont.mipmaps = 1;
3522-
fread(&imFont.width, 1, sizeof(int), rgsFile);
3523-
fread(&imFont.height, 1, sizeof(int), rgsFile);
3524-
fread(&imFont.format, 1, sizeof(int), rgsFile);
3522+
fread(&imFont.width, sizeof(int), 1, rgsFile);
3523+
fread(&imFont.height, sizeof(int), 1, rgsFile);
3524+
fread(&imFont.format, sizeof(int), 1, rgsFile);
35253525

35263526
if (fontImageCompSize < fontImageUncompSize)
35273527
{
@@ -3551,16 +3551,16 @@ void GuiLoadStyle(const char *fileName)
35513551

35523552
// Load font recs data
35533553
font.recs = (Rectangle *)RAYGUI_CALLOC(font.glyphCount, sizeof(Rectangle));
3554-
for (int i = 0; i < font.glyphCount; i++) fread(&font.recs[i], 1, sizeof(Rectangle), rgsFile);
3554+
for (int i = 0; i < font.glyphCount; i++) fread(&font.recs[i], sizeof(Rectangle), 1, rgsFile);
35553555

35563556
// Load font chars info data
35573557
font.glyphs = (GlyphInfo *)RAYGUI_CALLOC(font.glyphCount, sizeof(GlyphInfo));
35583558
for (int i = 0; i < font.glyphCount; i++)
35593559
{
3560-
fread(&font.glyphs[i].value, 1, sizeof(int), rgsFile);
3561-
fread(&font.glyphs[i].offsetX, 1, sizeof(int), rgsFile);
3562-
fread(&font.glyphs[i].offsetY, 1, sizeof(int), rgsFile);
3563-
fread(&font.glyphs[i].advanceX, 1, sizeof(int), rgsFile);
3560+
fread(&font.glyphs[i].value, sizeof(int), 1, rgsFile);
3561+
fread(&font.glyphs[i].offsetX, sizeof(int), 1, rgsFile);
3562+
fread(&font.glyphs[i].offsetY, sizeof(int), 1, rgsFile);
3563+
fread(&font.glyphs[i].advanceX, sizeof(int), 1, rgsFile);
35643564
}
35653565

35663566
GuiSetFont(font);
@@ -3746,10 +3746,10 @@ char **GuiLoadIcons(const char *fileName, bool loadIconsName)
37463746
short iconSize = 0;
37473747

37483748
fread(signature, 1, 4, rgiFile);
3749-
fread(&version, 1, sizeof(short), rgiFile);
3750-
fread(&reserved, 1, sizeof(short), rgiFile);
3751-
fread(&iconCount, 1, sizeof(short), rgiFile);
3752-
fread(&iconSize, 1, sizeof(short), rgiFile);
3749+
fread(&version, sizeof(short), 1, rgiFile);
3750+
fread(&reserved, sizeof(short), 1, rgiFile);
3751+
fread(&iconCount, sizeof(short), 1, rgiFile);
3752+
fread(&iconSize, sizeof(short), 1, rgiFile);
37533753

37543754
if ((signature[0] == 'r') &&
37553755
(signature[1] == 'G') &&
@@ -3762,13 +3762,13 @@ char **GuiLoadIcons(const char *fileName, bool loadIconsName)
37623762
for (int i = 0; i < iconCount; i++)
37633763
{
37643764
guiIconsName[i] = (char *)RAYGUI_MALLOC(RAYGUI_ICON_MAX_NAME_LENGTH);
3765-
fread(guiIconsName[i], RAYGUI_ICON_MAX_NAME_LENGTH, 1, rgiFile);
3765+
fread(guiIconsName[i], 1, RAYGUI_ICON_MAX_NAME_LENGTH, rgiFile);
37663766
}
37673767
}
37683768
else fseek(rgiFile, iconCount*RAYGUI_ICON_MAX_NAME_LENGTH, SEEK_CUR);
37693769

37703770
// Read icons data directly over internal icons array
3771-
fread(guiIconsPtr, iconCount*(iconSize*iconSize/32), sizeof(unsigned int), rgiFile);
3771+
fread(guiIconsPtr, sizeof(unsigned int), iconCount*(iconSize*iconSize/32), rgiFile);
37723772
}
37733773

37743774
fclose(rgiFile);
@@ -4048,7 +4048,7 @@ static void GuiDrawText(const char *text, Rectangle bounds, int alignment, Color
40484048
#endif
40494049
//DrawTextEx(guiFont, text, position, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), (float)GuiGetStyle(DEFAULT, TEXT_SPACING), tint);
40504050

4051-
// Get size in bytes of text,
4051+
// Get size in bytes of text,
40524052
// considering end of line and line break
40534053
int size = 0;
40544054
for (int c = 0; (lines[i][c] != '\0') && (lines[i][c] != '\n'); c++, size++){ }
@@ -4116,13 +4116,13 @@ static void GuiTooltip(Rectangle controlRec)
41164116

41174117
if ((controlRec.x + textSize.x + 16) > GetScreenWidth()) controlRec.x -= (textSize.x + 16 - controlRec.width);
41184118

4119-
GuiPanel((Rectangle){ controlRec.x, controlRec.y + controlRec.height + 4, textSize.x + 16, GuiGetStyle(DEFAULT, TEXT_SIZE) + 8.f }, NULL);
4119+
GuiPanel(RAYGUI_CLITERAL(Rectangle){ controlRec.x, controlRec.y + controlRec.height + 4, textSize.x + 16, GuiGetStyle(DEFAULT, TEXT_SIZE) + 8.f }, NULL);
41204120

41214121
int textPadding = GuiGetStyle(LABEL, TEXT_PADDING);
41224122
int textAlignment = GuiGetStyle(LABEL, TEXT_ALIGNMENT);
41234123
GuiSetStyle(LABEL, TEXT_PADDING, 0);
41244124
GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
4125-
GuiLabel((Rectangle){ controlRec.x, controlRec.y + controlRec.height + 4, textSize.x + 16, GuiGetStyle(DEFAULT, TEXT_SIZE) + 8.f }, guiTooltipPtr);
4125+
GuiLabel(RAYGUI_CLITERAL(Rectangle){ controlRec.x, controlRec.y + controlRec.height + 4, textSize.x + 16, GuiGetStyle(DEFAULT, TEXT_SIZE) + 8.f }, guiTooltipPtr);
41264126
GuiSetStyle(LABEL, TEXT_ALIGNMENT, textAlignment);
41274127
GuiSetStyle(LABEL, TEXT_PADDING, textPadding);
41284128
}
@@ -4318,8 +4318,8 @@ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue)
43184318
bool isVertical = (bounds.width > bounds.height)? false : true;
43194319

43204320
// The size (width or height depending on scrollbar type) of the spinner buttons
4321-
const int spinnerSize = GuiGetStyle(SCROLLBAR, ARROWS_VISIBLE)?
4322-
(isVertical? (int)bounds.width - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH) :
4321+
const int spinnerSize = GuiGetStyle(SCROLLBAR, ARROWS_VISIBLE)?
4322+
(isVertical? (int)bounds.width - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH) :
43234323
(int)bounds.height - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH)) : 0;
43244324

43254325
// Arrow buttons [<] [>] [∧] [∨]
@@ -4340,9 +4340,9 @@ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue)
43404340
int sliderSize = GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_SIZE);
43414341

43424342
// Calculate rectangles for all of the components
4343-
arrowUpLeft = RAYGUI_CLITERAL(Rectangle){
4344-
(float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH),
4345-
(float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH),
4343+
arrowUpLeft = RAYGUI_CLITERAL(Rectangle){
4344+
(float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH),
4345+
(float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH),
43464346
(float)spinnerSize, (float)spinnerSize };
43474347

43484348
if (isVertical)
@@ -4413,17 +4413,17 @@ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue)
44134413
if (GuiGetStyle(SCROLLBAR, ARROWS_VISIBLE))
44144414
{
44154415
#if defined(RAYGUI_NO_ICONS)
4416-
GuiDrawText(isVertical? "^" : "<",
4416+
GuiDrawText(isVertical? "^" : "<",
44174417
RAYGUI_CLITERAL(Rectangle){ arrowUpLeft.x, arrowUpLeft.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height },
44184418
TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha));
4419-
GuiDrawText(isVertical? "v" : ">",
4419+
GuiDrawText(isVertical? "v" : ">",
44204420
RAYGUI_CLITERAL(Rectangle){ arrowDownRight.x, arrowDownRight.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height },
44214421
TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha));
44224422
#else
4423-
GuiDrawText(isVertical? "#121#" : "#118#",
4423+
GuiDrawText(isVertical? "#121#" : "#118#",
44244424
RAYGUI_CLITERAL(Rectangle){ arrowUpLeft.x, arrowUpLeft.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height },
44254425
TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(SCROLLBAR, TEXT + state*3)), guiAlpha)); // ICON_ARROW_UP_FILL / ICON_ARROW_LEFT_FILL
4426-
GuiDrawText(isVertical? "#120#" : "#119#",
4426+
GuiDrawText(isVertical? "#120#" : "#119#",
44274427
RAYGUI_CLITERAL(Rectangle){ arrowDownRight.x, arrowDownRight.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height },
44284428
TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(SCROLLBAR, TEXT + state*3)), guiAlpha)); // ICON_ARROW_DOWN_FILL / ICON_ARROW_RIGHT_FILL
44294429
#endif

headers/raylib.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**********************************************************************************************
22
*
3-
* raylib v4.5-dev - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
3+
* raylib v4.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
44
*
55
* FEATURES:
66
* - NO external dependencies, all required libraries included with raylib
@@ -84,7 +84,7 @@
8484
#define RAYLIB_VERSION_MAJOR 4
8585
#define RAYLIB_VERSION_MINOR 5
8686
#define RAYLIB_VERSION_PATCH 0
87-
#define RAYLIB_VERSION "4.5-dev"
87+
#define RAYLIB_VERSION "4.5"
8888

8989
// Function specifiers in case library is build/used as a shared library (Windows)
9090
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
@@ -941,7 +941,8 @@ RLAPI void ToggleFullscreen(void); // Toggle wind
941941
RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
942942
RLAPI void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
943943
RLAPI void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
944-
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
944+
RLAPI void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
945+
RLAPI void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
945946
RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
946947
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
947948
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
@@ -1157,6 +1158,7 @@ RLAPI float GetGesturePinchAngle(void); // Get gesture pinch ang
11571158
// Camera System Functions (Module: rcamera)
11581159
//------------------------------------------------------------------------------------
11591160
RLAPI void UpdateCamera(Camera *camera, int mode); // Update camera position for selected mode
1161+
RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); // Update camera movement/rotation
11601162

11611163
//------------------------------------------------------------------------------------
11621164
// Basic Shapes Drawing Functions (Module: shapes)
@@ -1439,7 +1441,6 @@ RLAPI Model LoadModel(const char *fileName);
14391441
RLAPI Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
14401442
RLAPI bool IsModelReady(Model model); // Check if a model is ready
14411443
RLAPI void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
1442-
RLAPI void UnloadModelKeepMeshes(Model model); // Unload model (but not meshes) from memory (RAM and/or VRAM)
14431444
RLAPI BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
14441445

14451446
// Model drawing functions
@@ -1529,9 +1530,6 @@ RLAPI void PlaySound(Sound sound); // Play a
15291530
RLAPI void StopSound(Sound sound); // Stop playing a sound
15301531
RLAPI void PauseSound(Sound sound); // Pause a sound
15311532
RLAPI void ResumeSound(Sound sound); // Resume a paused sound
1532-
RLAPI void PlaySoundMulti(Sound sound); // Play a sound (using multichannel buffer pool)
1533-
RLAPI void StopSoundMulti(void); // Stop any sound playing (using multichannel buffer pool)
1534-
RLAPI int GetSoundsPlaying(void); // Get number of sounds playing in the multichannel
15351533
RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
15361534
RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
15371535
RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)

headers/rlgl.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**********************************************************************************************
22
*
3-
* rlgl v4.2 - A multi-OpenGL abstraction layer with an immediate-mode style API
3+
* rlgl v4.5 - A multi-OpenGL abstraction layer with an immediate-mode style API
44
*
55
* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0)
66
* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...)
@@ -106,7 +106,7 @@
106106
#ifndef RLGL_H
107107
#define RLGL_H
108108

109-
#define RLGL_VERSION "4.2"
109+
#define RLGL_VERSION "4.5"
110110

111111
// Function specifiers in case library is build/used as a shared library (Windows)
112112
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
@@ -298,6 +298,8 @@
298298

299299
// GL blending functions/equations
300300
#define RL_FUNC_ADD 0x8006 // GL_FUNC_ADD
301+
#define RL_MIN 0x8007 // GL_MIN
302+
#define RL_MAX 0x8008 // GL_MAX
301303
#define RL_FUNC_SUBTRACT 0x800A // GL_FUNC_SUBTRACT
302304
#define RL_FUNC_REVERSE_SUBTRACT 0x800B // GL_FUNC_REVERSE_SUBTRACT
303305
#define RL_BLEND_EQUATION 0x8009 // GL_BLEND_EQUATION
@@ -3473,7 +3475,7 @@ void rlUnloadFramebuffer(unsigned int id)
34733475

34743476
unsigned int depthIdU = (unsigned int)depthId;
34753477
if (depthType == GL_RENDERBUFFER) glDeleteRenderbuffers(1, &depthIdU);
3476-
else if (depthType == GL_RENDERBUFFER) glDeleteTextures(1, &depthIdU);
3478+
else if (depthType == GL_TEXTURE) glDeleteTextures(1, &depthIdU);
34773479

34783480
// NOTE: If a texture object is deleted while its image is attached to the *currently bound* framebuffer,
34793481
// the texture image is automatically detached from the currently bound framebuffer.

0 commit comments

Comments
 (0)