diff --git a/misc/dreamcast/Makefile b/misc/dreamcast/Makefile index d52976a2c..17b27ac69 100644 --- a/misc/dreamcast/Makefile +++ b/misc/dreamcast/Makefile @@ -4,6 +4,8 @@ SOURCE_DIRS := src third_party/bearssl/src C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c)) OBJS := $(addprefix $(BUILD_DIR)/, $(notdir $(C_FILES:%.c=%.o))) CFLAGS :=-g -O1 -pipe -fno-math-errno -Ithird_party/bearssl/inc +LDFLAGS=-g +LIBS=-lm TARGET := ClassiCube-dc @@ -24,7 +26,7 @@ $(BUILD_DIR)/%.o: third_party/bearssl/src/%.c $(TARGET).elf: $(OBJS) - kos-cc $^ -o $@ + kos-cc $(LDFLAGS) $^ -o $@ $(LIBS) $(TARGET).bin: $(TARGET).elf sh-elf-objcopy -R .stack -O binary $(TARGET).elf $(TARGET).bin diff --git a/misc/dreamcast/boot_logo.png b/misc/dreamcast/boot_logo.png index 7a3ce03ce..eb243c85d 100644 Binary files a/misc/dreamcast/boot_logo.png and b/misc/dreamcast/boot_logo.png differ diff --git a/src/ClassiCube.vcxproj b/src/ClassiCube.vcxproj index 35ca0b84d..bb93b5c20 100644 --- a/src/ClassiCube.vcxproj +++ b/src/ClassiCube.vcxproj @@ -496,7 +496,7 @@ - + diff --git a/src/ClassiCube.vcxproj.filters b/src/ClassiCube.vcxproj.filters index 4e46449fb..f1c86faab 100644 --- a/src/ClassiCube.vcxproj.filters +++ b/src/ClassiCube.vcxproj.filters @@ -596,7 +596,7 @@ Source Files\Platform - + Source Files\Platform diff --git a/src/Game.c b/src/Game.c index 0459b70e2..290f23405 100644 --- a/src/Game.c +++ b/src/Game.c @@ -49,6 +49,7 @@ int Game_MaxViewDistance = DEFAULT_MAX_VIEWDIST; int Game_FpsLimit, Game_Vertices; cc_bool Game_SimpleArmsAnim; +static cc_bool gameRunning; cc_bool Game_ClassicMode, Game_ClassicHacks; cc_bool Game_AllowCustomBlocks; @@ -365,7 +366,7 @@ static void LoadPlugins(void) { } #endif -void Game_Free(void* obj); +static void Game_Free(void* obj); static void Game_Load(void) { struct IGameComponent* comp; Game_UpdateDimensions(); @@ -615,7 +616,7 @@ static void Game_RenderFrame(double delta) { Gfx_EndFrame(); } -void Game_Free(void* obj) { +static void Game_Free(void* obj) { struct IGameComponent* comp; /* Most components will call OnContextLost in their Free functions */ /* Set to false so components will always free managed textures too */ @@ -627,6 +628,7 @@ void Game_Free(void* obj) { if (comp->Free) comp->Free(); } + gameRunning = false; Logger_WarnFunc = Logger_DialogWarn; Gfx_Free(); Options_SaveIfChanged(); @@ -638,7 +640,7 @@ void Game_Free(void* obj) { delta = Stopwatch_ElapsedMicroseconds(Game_FrameStart, render) / (1000.0 * 1000.0);\ \ Window_ProcessEvents(delta);\ - if (!WindowInfo.Exists) return;\ + if (!gameRunning) return;\ \ if (delta > 1.0) delta = 1.0; /* avoid large delta with suspended process */ \ if (delta > 0.0) { Game_FrameStart = render; Game_RenderFrame(delta); } @@ -681,6 +683,7 @@ void Game_Run(int width, int height, const cc_string* title) { Window_Create3D(width, height); Window_SetTitle(title); Window_Show(); + gameRunning = true; Game_Load(); Event_RaiseVoid(&WindowEvents.Resized); diff --git a/src/Graphics_3DS.c b/src/Graphics_3DS.c index beccd585b..6191e3d61 100644 --- a/src/Graphics_3DS.c +++ b/src/Graphics_3DS.c @@ -125,21 +125,37 @@ static void SetDefaultState(void) { Gfx_SetAlphaTest(false); Gfx_SetDepthWrite(true); } - -static GfxResourceID white_square; -void Gfx_Create(void) { - Gfx.MaxTexWidth = 512; - Gfx.MaxTexHeight = 512; - Gfx.Created = true; - gfx_vsync = true; - +static void InitCitro3D(void) { C3D_Init(C3D_DEFAULT_CMDBUF_SIZE); target = C3D_RenderTargetCreate(240, 400, GPU_RB_RGBA8, GPU_RB_DEPTH24_STENCIL8); C3D_RenderTargetSetOutput(target, GFX_TOP, GFX_LEFT, DISPLAY_TRANSFER_FLAGS); SetDefaultState(); - InitDefaultResources(); AllocShaders(); +} + +static GfxResourceID white_square; +void Gfx_Create(void) { + if (!Gfx.Created) InitCitro3D(); + + Gfx.MaxTexWidth = 512; + Gfx.MaxTexHeight = 512; + Gfx.Created = true; + gfx_vsync = true; + + Gfx_RestoreState(); +} + +void Gfx_Free(void) { + Gfx_FreeState(); + // FreeShaders() + // C3D_Fini() +} + +cc_bool Gfx_TryRestoreContext(void) { return true; } + +void Gfx_RestoreState(void) { + InitDefaultResources(); // 8x8 dummy white texture // (textures must be at least 8x8, see C3D_TexInitWithParams source) @@ -150,16 +166,11 @@ void Gfx_Create(void) { white_square = Gfx_CreateTexture(&bmp, 0, false); } -void Gfx_Free(void) { - FreeShaders(); +void Gfx_FreeState(void) { FreeDefaultResources(); Gfx_DeleteTexture(&white_square); } -cc_bool Gfx_TryRestoreContext(void) { return true; } -void Gfx_RestoreState(void) { } -void Gfx_FreeState(void) { } - /*########################################################################################################################* *---------------------------------------------------------Textures--------------------------------------------------------* *#########################################################################################################################*/ diff --git a/src/Graphics_Dreamcast.c b/src/Graphics_Dreamcast.c index cc1465a5c..53b3f2b5d 100644 --- a/src/Graphics_Dreamcast.c +++ b/src/Graphics_Dreamcast.c @@ -19,9 +19,10 @@ static cc_bool renderingDisabled; *---------------------------------------------------------General---------------------------------------------------------* *#########################################################################################################################*/ void Gfx_Create(void) { - glKosInit(); - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &Gfx.MaxTexWidth); - Gfx.MaxTexHeight = Gfx.MaxTexWidth; + if (!Gfx.Created) glKosInit(); + // NOTE: technically 1024 is supported by hardware + Gfx.MaxTexWidth = 512; + Gfx.MaxTexHeight = 512; Gfx.Created = true; Gfx_RestoreState(); } @@ -242,9 +243,10 @@ static unsigned Interleave(unsigned x) { } /*static int CalcTwiddledIndex(int x, int y, int w, int h) { - // Twiddled index looks like this (starting from lowest numbered bits): - // e.g. w > h: yx_yx_xx_xx - // e.g. h > w: yx_yx_yy_yy + // Twiddled index looks like this (lowest numbered bits are leftmost): + // - w = h: yxyx yxyx + // - w > h: yxyx xxxx + // - h > w: yxyx yyyy // And can therefore be broken down into two components: // 1) interleaved lower bits // 2) masked and then shifted higher bits @@ -484,8 +486,6 @@ static CC_NOINLINE void UnshiftTextureCoords(int count) { static void Gfx_FreeState(void) { FreeDefaultResources(); } static void Gfx_RestoreState(void) { InitDefaultResources(); - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_COLOR_ARRAY); gfx_format = -1; glAlphaFunc(GL_GREATER, 0.5f); @@ -519,10 +519,8 @@ void Gfx_SetVertexFormat(VertexFormat fmt) { gfx_stride = strideSizes[fmt]; if (fmt == VERTEX_FORMAT_TEXTURED) { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnable(GL_TEXTURE_2D); } else { - glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisable(GL_TEXTURE_2D); } } diff --git a/src/Graphics_GCWii.c b/src/Graphics_GCWii.c index c34b7f983..ca9b9871d 100644 --- a/src/Graphics_GCWii.c +++ b/src/Graphics_GCWii.c @@ -48,12 +48,13 @@ static void InitGX(void) { } void Gfx_Create(void) { + if (!Gfx.Created) InitGX(); + Gfx.MaxTexWidth = 512; Gfx.MaxTexHeight = 512; Gfx.Created = true; gfx_vsync = true; - InitGX(); Gfx_RestoreState(); } diff --git a/src/Graphics_PSP.c b/src/Graphics_PSP.c index 17f7d1f5f..f3282ae6c 100644 --- a/src/Graphics_PSP.c +++ b/src/Graphics_PSP.c @@ -72,10 +72,23 @@ static void guInit(void) { static GfxResourceID white_square; void Gfx_Create(void) { + if (!Gfx.Created) guInit(); + Gfx.MaxTexWidth = 512; Gfx.MaxTexHeight = 512; Gfx.Created = true; - guInit(); + gfx_vsync = true; + + Gfx_RestoreState(); +} + +void Gfx_Free(void) { + Gfx_FreeState(); +} + +cc_bool Gfx_TryRestoreContext(void) { return true; } + +void Gfx_RestoreState(void) { InitDefaultResources(); // 1x1 dummy white texture @@ -85,14 +98,11 @@ void Gfx_Create(void) { white_square = Gfx_CreateTexture(&bmp, 0, false); } -void Gfx_Free(void) { +void Gfx_FreeState(void) { FreeDefaultResources(); Gfx_DeleteTexture(&white_square); } -cc_bool Gfx_TryRestoreContext(void) { return true; } -void Gfx_RestoreState(void) { } -void Gfx_FreeState(void) { } #define GU_Toggle(cap) if (enabled) { sceGuEnable(cap); } else { sceGuDisable(cap); } /*########################################################################################################################* @@ -424,4 +434,4 @@ void Gfx_DrawIndexedTris_T2fC4b(int verticesCount, int startVertex) { sceGuDrawArray(GU_TRIANGLES, gfx_fields | GU_INDEX_16BIT, ICOUNT(verticesCount), gfx_indices, gfx_vertices + startVertex * SIZEOF_VERTEX_TEXTURED); } -#endif \ No newline at end of file +#endif diff --git a/src/Graphics_PSVita.c b/src/Graphics_PSVita.c index badff855d..a1aaaf2c3 100644 --- a/src/Graphics_PSVita.c +++ b/src/Graphics_PSVita.c @@ -523,11 +523,7 @@ static void SetDefaultStates(void) { sceGxmSetBackDepthFunc(gxm_context, SCE_GXM_DEPTH_FUNC_LESS_EQUAL); } -void Gfx_Create(void) { - Gfx.MaxTexWidth = 512; - Gfx.MaxTexHeight = 512; - Gfx.Created = true; - +static void InitGPU(void) { InitGXM(); AllocRingBuffers(); AllocGXMContext(); @@ -547,13 +543,33 @@ void Gfx_Create(void) { AllocTexturedVertexProgram(1); CreateFragmentPrograms(3, gxm_textured_FP, gxm_textured_VP); CreateFragmentPrograms(9, gxm_textured_alpha_FP, gxm_textured_VP); +} + +void Gfx_Create(void) { + if (!Gfx.Created) InitGPU(); + + Gfx.MaxTexWidth = 512; + Gfx.MaxTexHeight = 512; + Gfx.Created = true; + gfx_vsync = true; Gfx_SetDepthTest(true); - InitDefaultResources(); Gfx_SetVertexFormat(VERTEX_FORMAT_COLOURED); frontBufferIndex = NUM_DISPLAY_BUFFERS - 1; backBufferIndex = 0; + Gfx_RestoreState(); +} + +void Gfx_Free(void) { + Gfx_FreeState(); +} + +cc_bool Gfx_TryRestoreContext(void) { return true; } + +void Gfx_RestoreState(void) { + InitDefaultResources(); + // 1x1 dummy white texture struct Bitmap bmp; BitmapCol pixels[1] = { BITMAPCOLOR_WHITE }; @@ -562,15 +578,11 @@ void Gfx_Create(void) { // TODO } -void Gfx_Free(void) { +void Gfx_FreeState(void) { FreeDefaultResources(); Gfx_DeleteTexture(&white_square); } -cc_bool Gfx_TryRestoreContext(void) { return true; } -void Gfx_RestoreState(void) { } -void Gfx_FreeState(void) { } - /*########################################################################################################################* *--------------------------------------------------------GPU Textures-----------------------------------------------------* diff --git a/src/Platform_WinApi.c b/src/Platform_Windows.c similarity index 100% rename from src/Platform_WinApi.c rename to src/Platform_Windows.c diff --git a/src/Window_3DS.c b/src/Window_3DS.c index 9be979e10..42861ccae 100644 --- a/src/Window_3DS.c +++ b/src/Window_3DS.c @@ -70,7 +70,7 @@ void Window_Show(void) { } void Window_SetSize(int width, int height) { } void Window_Close(void) { - /* TODO implement */ + Event_RaiseVoid(&WindowEvents.Closing); } /*########################################################################################################################* diff --git a/src/Window_Android.c b/src/Window_Android.c index 602061c9c..3bf71a95e 100644 --- a/src/Window_Android.c +++ b/src/Window_Android.c @@ -302,7 +302,7 @@ static void RemakeWindowSurface(void) { /* Loop until window gets created by main UI thread */ /* (i.e. until processSurfaceCreated is received) */ while (!winCreated) { - Window_ProcessEvents(0.0); + Window_ProcessEvents(0.01); Thread_Sleep(10); } diff --git a/src/Window_Dreamcast.c b/src/Window_Dreamcast.c index 3c7b904ed..9bef57ed1 100644 --- a/src/Window_Dreamcast.c +++ b/src/Window_Dreamcast.c @@ -60,7 +60,7 @@ void Window_Show(void) { } void Window_SetSize(int width, int height) { } void Window_Close(void) { - /* TODO implement */ + Event_RaiseVoid(&WindowEvents.Closing); } /*########################################################################################################################* diff --git a/src/Window_GCWii.c b/src/Window_GCWii.c index bd86ed71e..bc74a72c4 100644 --- a/src/Window_GCWii.c +++ b/src/Window_GCWii.c @@ -16,6 +16,7 @@ #include #endif +static cc_bool needsFBUpdate; static cc_bool launcherMode; static void* xfb; static GXRModeObj* rmode; @@ -28,16 +29,10 @@ int Display_ScaleY(int y) { return y; } static void OnPowerOff(void) { - Event_RaiseVoid(&WindowEvents.Closing); WindowInfo.Exists = false; + Window_Close(); } - -void Window_Init(void) { - // TODO: SYS_SetResetCallback(reload); too? not sure how reset differs on GC/WII - #if defined HW_RVL - SYS_SetPowerCallback(OnPowerOff); - #endif - +static void InitVideo(void) { // Initialise the video system VIDEO_Init(); @@ -61,6 +56,14 @@ void Window_Init(void) { VIDEO_Flush(); // Wait for Video setup to complete VIDEO_WaitVSync(); +} + +void Window_Init(void) { + // TODO: SYS_SetResetCallback(reload); too? not sure how reset differs on GC/WII + #if defined HW_RVL + SYS_SetPowerCallback(OnPowerOff); + #endif + InitVideo(); DisplayInfo.Width = rmode->fbWidth; DisplayInfo.Height = rmode->xfbHeight; @@ -81,11 +84,17 @@ void Window_Init(void) { PAD_Init(); } -void Window_Create2D(int width, int height) { launcherMode = true; } -void Window_Create3D(int width, int height) { launcherMode = false; } +void Window_Create2D(int width, int height) { + needsFBUpdate = true; + launcherMode = true; +} + +void Window_Create3D(int width, int height) { + launcherMode = false; +} void Window_Close(void) { - /* TODO implement */ + Event_RaiseVoid(&WindowEvents.Closing); } @@ -465,6 +474,13 @@ static u32 CvtRGB (u8 r1, u8 g1, u8 b1, u8 r2, u8 g2, u8 b2) } void Window_DrawFramebuffer(Rect2D r) { + // When coming back from the 3D game, framebuffer might have changed + if (needsFBUpdate) { + VIDEO_SetNextFramebuffer(xfb); + VIDEO_Flush(); + needsFBUpdate = false; + } + VIDEO_WaitVSync(); r.X &= ~0x01; // round down to nearest even horizontal index diff --git a/src/Window_PS3.c b/src/Window_PS3.c index 8c55e4b90..387a8b43b 100644 --- a/src/Window_PS3.c +++ b/src/Window_PS3.c @@ -79,7 +79,7 @@ void Window_Show(void) { } void Window_SetSize(int width, int height) { } void Window_Close(void) { - /* TODO implement */ + Event_RaiseVoid(&WindowEvents.Closing); } diff --git a/src/Window_PSP.c b/src/Window_PSP.c index 91ffa5662..4d2667803 100644 --- a/src/Window_PSP.c +++ b/src/Window_PSP.c @@ -58,7 +58,7 @@ void Window_Show(void) { } void Window_SetSize(int width, int height) { } void Window_Close(void) { - /* TODO implement */ + Event_RaiseVoid(&WindowEvents.Closing); } diff --git a/src/Window_PSVita.c b/src/Window_PSVita.c index 248fc1e27..a128f186d 100644 --- a/src/Window_PSVita.c +++ b/src/Window_PSVita.c @@ -61,7 +61,7 @@ void Window_Show(void) { } void Window_SetSize(int width, int height) { } void Window_Close(void) { - /* TODO implement */ + Event_RaiseVoid(&WindowEvents.Closing); } diff --git a/src/Window_Xbox.c b/src/Window_Xbox.c index 4f7b65ea4..f1c4126be 100644 --- a/src/Window_Xbox.c +++ b/src/Window_Xbox.c @@ -98,7 +98,7 @@ void Window_Show(void) { } void Window_SetSize(int width, int height) { } void Window_Close(void) { - /* TODO implement */ + Event_RaiseVoid(&WindowEvents.Closing); } diff --git a/third_party/gldc/Makefile b/third_party/gldc/Makefile index 10dcad132..e0949b7b9 100644 --- a/third_party/gldc/Makefile +++ b/third_party/gldc/Makefile @@ -24,5 +24,5 @@ default: $(TARGET) kos-cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -c $< -o $@ $(TARGET): $(OBJS) - kos-ar cr $@ $< + kos-ar cr $@ $^ kos-ranlib $@ diff --git a/third_party/gldc/include/gldc.h b/third_party/gldc/include/gldc.h index 832f22850..2d2993cba 100644 --- a/third_party/gldc/include/gldc.h +++ b/third_party/gldc/include/gldc.h @@ -97,11 +97,6 @@ __BEGIN_DECLS /* Fog */ #define GL_FOG 0x0004 /* capability bit */ -/* Client state caps */ -#define GL_VERTEX_ARRAY 0x8074 -#define GL_COLOR_ARRAY 0x8076 -#define GL_TEXTURE_COORD_ARRAY 0x8078 - #define GL_FRONT_AND_BACK 0x0408 #define GL_FRONT 0x0404 #define GL_BACK 0x0405 @@ -126,9 +121,6 @@ __BEGIN_DECLS #define GL_INVALID_OPERATION 0x0502 #define GL_OUT_OF_MEMORY 0x0505 -/* GetPName */ -#define GL_MAX_TEXTURE_SIZE 0x0D33 - /* StringName */ #define GL_VENDOR 0x1F00 #define GL_RENDERER 0x1F01 @@ -259,9 +251,6 @@ GLAPI void glVertexPointer(GLint size, GLenum type, GLAPI void glDrawArrays(GLenum mode, GLint first, GLsizei count); GLAPI void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -GLAPI void glEnableClientState(GLenum cap); -GLAPI void glDisableClientState(GLenum cap); - /* Transformation / Matrix Functions */ GLAPI void glViewport(GLint x, GLint y, GLsizei width, GLsizei height); diff --git a/third_party/gldc/src/draw.c b/third_party/gldc/src/draw.c index d72f072a5..c5cf11164 100644 --- a/third_party/gldc/src/draw.c +++ b/third_party/gldc/src/draw.c @@ -10,7 +10,6 @@ static void* VERTEX_PTR; static GLsizei VERTEX_STRIDE; -static GLuint ENABLED_VERTEX_ATTRIBUTES; extern GLboolean AUTOSORT_ENABLED; @@ -59,7 +58,7 @@ static void generateQuads(SubmissionTarget* target, const GLsizei first, const G /* Copy the pos, uv and color directly in one go */ const GLubyte* pos = VERTEX_PTR; - const GLubyte* uv = (ENABLED_VERTEX_ATTRIBUTES & UV_ENABLED_FLAG) ? VERTEX_PTR : NULL; + const GLubyte* uv = TEXTURES_ENABLED ? VERTEX_PTR : NULL; const GLubyte* col = VERTEX_PTR; Vertex* dst = start; @@ -332,43 +331,7 @@ void APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count) { submitVertices(mode, first, count); } -void APIENTRY glEnableClientState(GLenum cap) { - TRACE(); - - switch(cap) { - case GL_VERTEX_ARRAY: - ENABLED_VERTEX_ATTRIBUTES |= VERTEX_ENABLED_FLAG; - break; - case GL_COLOR_ARRAY: - ENABLED_VERTEX_ATTRIBUTES |= DIFFUSE_ENABLED_FLAG; - break; - case GL_TEXTURE_COORD_ARRAY: - ENABLED_VERTEX_ATTRIBUTES |= UV_ENABLED_FLAG; - break; - default: - _glKosThrowError(GL_INVALID_ENUM, __func__); - } -} - -void APIENTRY glDisableClientState(GLenum cap) { - TRACE(); - - switch(cap) { - case GL_VERTEX_ARRAY: - ENABLED_VERTEX_ATTRIBUTES &= ~VERTEX_ENABLED_FLAG; - break; - case GL_COLOR_ARRAY: - ENABLED_VERTEX_ATTRIBUTES &= ~DIFFUSE_ENABLED_FLAG; - break; - case GL_TEXTURE_COORD_ARRAY: - ENABLED_VERTEX_ATTRIBUTES &= ~UV_ENABLED_FLAG; - break; - default: - _glKosThrowError(GL_INVALID_ENUM, __func__); - } -} - void APIENTRY glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) { VERTEX_PTR = pointer; VERTEX_STRIDE = stride; -} +} \ No newline at end of file diff --git a/third_party/gldc/src/private.h b/third_party/gldc/src/private.h index 9ebba2332..af37a655d 100644 --- a/third_party/gldc/src/private.h +++ b/third_party/gldc/src/private.h @@ -36,13 +36,6 @@ extern void* memcpy4 (void *dest, const void *src, size_t count); #define TRACE_ENABLED 0 #define TRACE() if(TRACE_ENABLED) {fprintf(stderr, "%s\n", __func__);} (void) 0 -#define VERTEX_ENABLED_FLAG (1 << 0) -#define UV_ENABLED_FLAG (1 << 1) -#define ST_ENABLED_FLAG (1 << 2) -#define DIFFUSE_ENABLED_FLAG (1 << 3) - -#define MAX_TEXTURE_SIZE 1024 - typedef struct { unsigned int flags; /* Constant PVR_CMD_USERCLIP */ unsigned int d1, d2, d3; /* Ignored for this type */ @@ -208,22 +201,6 @@ GLubyte _glInitTextures(); void _glUpdatePVRTextureContext(PolyContext* context, GLshort textureUnit); -typedef struct { - const void* ptr; // 4 - GLenum type; // 4 - GLsizei stride; // 4 - GLint size; // 4 -} AttribPointer; - -typedef struct { - AttribPointer vertex; // 16 - AttribPointer colour; // 32 - AttribPointer uv; // 48 - AttribPointer st; // 64 - AttribPointer normal; // 80 - AttribPointer padding; // 96 -} AttribPointerList; - GLboolean _glCheckValidEnum(GLint param, GLint* values, const char* func); GLenum _glGetShadeModel(); @@ -289,12 +266,6 @@ GL_FORCE_INLINE void _glKosResetError() { sprintf(ERROR_FUNCTION, "\n"); } -typedef struct { - float n[3]; // 12 bytes - float finalColour[4]; //28 bytes - uint32_t padding; // 32 bytes -} EyeSpaceData; - unsigned char _glIsClippingEnabled(); void _glEnableClipping(unsigned char v); diff --git a/third_party/gldc/src/state.c b/third_party/gldc/src/state.c index 0c06ba4fa..5d6f94e8b 100644 --- a/third_party/gldc/src/state.c +++ b/third_party/gldc/src/state.c @@ -467,9 +467,6 @@ void _glApplyScissor(bool force) { void APIENTRY glGetIntegerv(GLenum pname, GLint *params) { switch(pname) { - case GL_MAX_TEXTURE_SIZE: - *params = MAX_TEXTURE_SIZE; - break; case GL_TEXTURE_FREE_MEMORY_ATI: case GL_FREE_TEXTURE_MEMORY_KOS: *params = _glFreeTextureMemory();