"Improved"

This commit is contained in:
2026-02-04 15:54:09 -06:00
parent ad13d6c6a1
commit 708c4d0ec3
15 changed files with 150 additions and 154 deletions

View File

@@ -8,11 +8,21 @@
#pragma once
#if DISPLAY_SDL2
#include <SDL2/SDL.h>
#if DOLPHIN
#include "dusk.h"
#include <GL/glu.h>
#include <SDL.h>
#include <SDL_opengl.h>
#define GL_COLOR_INDEX8_EXT GX_RGBA8
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glext.h>
#else
#include <SDL2/SDL.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glext.h>
#endif
#ifndef DISPLAY_SIZE_DYNAMIC
#define DISPLAY_SIZE_DYNAMIC 1

View File

@@ -102,12 +102,16 @@ void frameBufferBind(const framebuffer_t *framebuffer) {
if(framebuffer == &FRAMEBUFFER_BACKBUFFER) {
#if PSP
#elif DOLPHIN
#else
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
#endif
} else {
#if PSP
assertUnreachable("Framebuffers not supported on PSP");
#elif DOLPHIN
assertUnreachable("Framebuffers not supported on DOLPHIN");
#else
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer->id);
#endif
@@ -140,7 +144,11 @@ void frameBufferClear(uint8_t flags, color_t color) {
glFlags |= GL_DEPTH_BUFFER_BIT;
}
glClear(glFlags);
#if DOLPHIN
assertUnreachable("Framebuffers not supported on DOLPHIN");
#else
glClear(glFlags);
#endif
#endif
}

View File

@@ -77,6 +77,8 @@ void textureInit(
#if PSP
havePalTex = true;
#elif DOLPHIN
havePalTex = false;
#else
GLint mask = 0;
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask);
@@ -125,10 +127,14 @@ void textureInit(
GL_UNSIGNED_BYTE, (void*)data.palette.data
);
glColorTableEXT(
GL_TEXTURE_2D, GL_RGBA, pal->colorCount, GL_RGBA,
GL_UNSIGNED_BYTE, (const void*)pal->colors
);
#if DOLPHIN
assertUnreachable("Paletted textures not supported on DOLPHIN");
#else
glColorTableEXT(
GL_TEXTURE_2D, GL_RGBA, pal->colorCount, GL_RGBA,
GL_UNSIGNED_BYTE, (const void*)pal->colors
);
#endif
}
break;

View File

@@ -31,7 +31,6 @@
#if DOLPHIN
#include <gccore.h>
#include <SDL2/SDL.h>
#endif
typedef bool bool_t;