Merge branch 'master' of gitlab.com:simulant/GLdc
This commit is contained in:
commit
d79b044b73
10
GL/texture.c
10
GL/texture.c
|
@ -36,6 +36,13 @@ void _glApplyColorTable() {
|
||||||
|
|
||||||
if(_glIsSharedTexturePaletteEnabled()) {
|
if(_glIsSharedTexturePaletteEnabled()) {
|
||||||
src = SHARED_PALETTE;
|
src = SHARED_PALETTE;
|
||||||
|
|
||||||
|
assert(src);
|
||||||
|
|
||||||
|
/* Don't apply a palette if we haven't uploaded one yet */
|
||||||
|
if(!src->data) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
TextureObject* active = _glGetBoundTexture();
|
TextureObject* active = _glGetBoundTexture();
|
||||||
|
|
||||||
|
@ -147,6 +154,9 @@ GLubyte _glInitTextures() {
|
||||||
named_array_reserve(&TEXTURE_OBJECTS, 0);
|
named_array_reserve(&TEXTURE_OBJECTS, 0);
|
||||||
|
|
||||||
SHARED_PALETTE = (TexturePalette*) malloc(sizeof(TexturePalette));
|
SHARED_PALETTE = (TexturePalette*) malloc(sizeof(TexturePalette));
|
||||||
|
SHARED_PALETTE->data = NULL;
|
||||||
|
SHARED_PALETTE->format = 0;
|
||||||
|
SHARED_PALETTE->width = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user