Zzz...
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
This commit is contained in:
1 parent
0373b19269
commit
dc190be6b3
1 file changed
+12
-12
@@ -1307,12 +1307,6 @@ void InitPalette(int flashnum, boolean skiplut)
|
||||
{
|
||||
int i, r, g, b;
|
||||
|
||||
if (!pglTexImage3D){
|
||||
GL_MSG_Error("pglTexImage3D is NULL!");
|
||||
CV_Set(&cv_grpaletteshader, "Off"); // turn that thing off if you cant use it
|
||||
return;
|
||||
}
|
||||
|
||||
//Hudler: 16/10/99: added for OpenGL gamma correction
|
||||
RGBA_t gamma_correction = {0x7F7F7F7F};
|
||||
|
||||
@@ -1380,6 +1374,13 @@ void InitPalette(int flashnum, boolean skiplut)
|
||||
pglBindTexture(GL_TEXTURE_3D, palette_tex_num);
|
||||
pglTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
pglTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
if (!pglTexImage3D){
|
||||
GL_MSG_Error("pglTexImage3D is NULL!");
|
||||
CV_Set(&cv_grpaletteshader, "Off"); // turn that thing off if you cant use it
|
||||
return;
|
||||
}
|
||||
|
||||
pglTexImage3D(GL_TEXTURE_3D, 0, internalFormat, LUT_SIZE, LUT_SIZE, LUT_SIZE, 0, GL_RED, GL_UNSIGNED_BYTE, pal_lookup_tex);
|
||||
free(pal_lookup_tex);
|
||||
}
|
||||
@@ -1588,12 +1589,6 @@ EXPORT void HWRAPI(ClearMipMapCache) (void)
|
||||
|
||||
EXPORT UINT32 HWRAPI(AddLightTable) (UINT8 *lighttable)
|
||||
{
|
||||
if (!ltcachetail->id){
|
||||
GL_MSG_Error("HWR Lighttable cache entry id is zero");
|
||||
CV_Set(&cv_grpaletteshader, "Off"); // turn that thing off if you cant use it
|
||||
return;
|
||||
}
|
||||
|
||||
LightTableCacheEntry_t *cache_entry = malloc(sizeof(LightTableCacheEntry_t));
|
||||
if (!ltcachetail)
|
||||
{
|
||||
@@ -1606,6 +1601,11 @@ EXPORT UINT32 HWRAPI(AddLightTable) (UINT8 *lighttable)
|
||||
}
|
||||
ltcachetail->next = NULL;
|
||||
pglGenTextures(1, <cachetail->id);
|
||||
if (!ltcachetail->id){
|
||||
GL_MSG_Error("HWR Lighttable cache entry id is zero");
|
||||
CV_Set(&cv_grpaletteshader, "Off"); // turn that thing off if you cant use it
|
||||
return;
|
||||
}
|
||||
pglBindTexture(GL_TEXTURE_2D, ltcachetail->id);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
Reference in new issue
Block a user