Fix mipmaps level not being properly calculated for modern opengl build

This commit is contained in:
UnknownShadow200 2025-01-26 12:32:35 +11:00
parent b88f114e12
commit 753dff9ffc
3 changed files with 5 additions and 2 deletions

View File

@ -72,7 +72,9 @@ typedef void (*GL_SetupVBFunc)(void);
typedef void (*GL_SetupVBRangeFunc)(int startVertex);
static GL_SetupVBFunc gfx_setupVBFunc;
static GL_SetupVBRangeFunc gfx_setupVBRangeFunc;
#include "_GLShared.h"
static void GLBackend_Init(void);
void Gfx_Create(void) {
GLContext_Create();

View File

@ -36,6 +36,8 @@ static const struct DynamicLibSym core_funcs[] = {
#include "../misc/opengl/GL1Macros.h"
#include "_GLShared.h"
static void GLBackend_Init(void);
static GfxResourceID white_square;
static int postProcess;
enum PostProcess { POSTPROCESS_NONE, POSTPROCESS_GRAYSCALE };
@ -49,6 +51,7 @@ void Gfx_Create(void) {
Gfx.BackendType = CC_GFX_BACKEND_GL2;
GL_InitCommon();
GLBackend_Init();
Gfx_RestoreState();
GLContext_SetVSync(gfx_vsync);
}

View File

@ -25,8 +25,6 @@
/*########################################################################################################################*
*---------------------------------------------------------General---------------------------------------------------------*
*#########################################################################################################################*/
static void GLBackend_Init(void);
static void GLContext_GetAll(const struct DynamicLibSym* syms, int count) {
int i;
for (i = 0; i < count; i++)