Chunk loading example

This commit is contained in:
2025-11-09 12:50:15 -06:00
parent eff5fc3d9a
commit 307f3a9dec
12 changed files with 169 additions and 21 deletions

View File

@@ -68,7 +68,7 @@ void textureInit(
const palette_t *pal = PALETTE_LIST[data.palette.palette];
assertNotNull(pal, "Palette cannot be NULL");
GLenum err = glGetError();
if (err != GL_NO_ERROR) {
if(err != GL_NO_ERROR) {
assertUnreachable("GL Error before setting color table");
}
@@ -82,9 +82,9 @@ void textureInit(
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask);
if(mask & GL_CONTEXT_CORE_PROFILE_BIT) {
GLint n=0; glGetIntegerv(GL_NUM_EXTENSIONS, &n);
for (GLint i=0; i<n; ++i) {
for(GLint i=0; i<n; ++i) {
const char* e = (const char*)glGetStringi(GL_EXTENSIONS, i);
if (e && strcmp(e, "GL_EXT_paletted_texture")==0) { havePalTex = true; break; }
if(e && strcmp(e, "GL_EXT_paletted_texture")==0) { havePalTex = true; break; }
}
} else {
const char* ext = (const char*)glGetString(GL_EXTENSIONS);