mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -04:00
Fix mipmaps level not being properly calculated for modern opengl build
This commit is contained in:
parent
b88f114e12
commit
753dff9ffc
@ -72,7 +72,9 @@ typedef void (*GL_SetupVBFunc)(void);
|
|||||||
typedef void (*GL_SetupVBRangeFunc)(int startVertex);
|
typedef void (*GL_SetupVBRangeFunc)(int startVertex);
|
||||||
static GL_SetupVBFunc gfx_setupVBFunc;
|
static GL_SetupVBFunc gfx_setupVBFunc;
|
||||||
static GL_SetupVBRangeFunc gfx_setupVBRangeFunc;
|
static GL_SetupVBRangeFunc gfx_setupVBRangeFunc;
|
||||||
|
|
||||||
#include "_GLShared.h"
|
#include "_GLShared.h"
|
||||||
|
static void GLBackend_Init(void);
|
||||||
|
|
||||||
void Gfx_Create(void) {
|
void Gfx_Create(void) {
|
||||||
GLContext_Create();
|
GLContext_Create();
|
||||||
|
@ -36,6 +36,8 @@ static const struct DynamicLibSym core_funcs[] = {
|
|||||||
#include "../misc/opengl/GL1Macros.h"
|
#include "../misc/opengl/GL1Macros.h"
|
||||||
|
|
||||||
#include "_GLShared.h"
|
#include "_GLShared.h"
|
||||||
|
static void GLBackend_Init(void);
|
||||||
|
|
||||||
static GfxResourceID white_square;
|
static GfxResourceID white_square;
|
||||||
static int postProcess;
|
static int postProcess;
|
||||||
enum PostProcess { POSTPROCESS_NONE, POSTPROCESS_GRAYSCALE };
|
enum PostProcess { POSTPROCESS_NONE, POSTPROCESS_GRAYSCALE };
|
||||||
@ -49,6 +51,7 @@ void Gfx_Create(void) {
|
|||||||
Gfx.BackendType = CC_GFX_BACKEND_GL2;
|
Gfx.BackendType = CC_GFX_BACKEND_GL2;
|
||||||
|
|
||||||
GL_InitCommon();
|
GL_InitCommon();
|
||||||
|
GLBackend_Init();
|
||||||
Gfx_RestoreState();
|
Gfx_RestoreState();
|
||||||
GLContext_SetVSync(gfx_vsync);
|
GLContext_SetVSync(gfx_vsync);
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*---------------------------------------------------------General---------------------------------------------------------*
|
*---------------------------------------------------------General---------------------------------------------------------*
|
||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
static void GLBackend_Init(void);
|
|
||||||
|
|
||||||
static void GLContext_GetAll(const struct DynamicLibSym* syms, int count) {
|
static void GLContext_GetAll(const struct DynamicLibSym* syms, int count) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user