mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-29 07:02:03 +00:00
- GL code adjustments for reworked precaching.
This commit is contained in:
parent
60d9f38084
commit
1e9a6e667e
4 changed files with 4 additions and 22 deletions
|
@ -332,7 +332,7 @@ void OpenGLFrameBuffer::GetHitlist(BYTE *hitlist)
|
||||||
// check skybox textures and mark the separate faces as used
|
// check skybox textures and mark the separate faces as used
|
||||||
for(int i=0;i<TexMan.NumTextures(); i++)
|
for(int i=0;i<TexMan.NumTextures(); i++)
|
||||||
{
|
{
|
||||||
if (hitlist[i])
|
if (hitlist[i] & FTextureManager::HIT_Sky)
|
||||||
{
|
{
|
||||||
FTexture *tex = TexMan.ByIndex(i);
|
FTexture *tex = TexMan.ByIndex(i);
|
||||||
if (tex->gl_info.bSkybox)
|
if (tex->gl_info.bSkybox)
|
||||||
|
@ -343,7 +343,7 @@ void OpenGLFrameBuffer::GetHitlist(BYTE *hitlist)
|
||||||
if (sb->faces[i])
|
if (sb->faces[i])
|
||||||
{
|
{
|
||||||
int index = sb->faces[i]->id.GetIndex();
|
int index = sb->faces[i]->id.GetIndex();
|
||||||
hitlist[index] |= 1;
|
hitlist[index] |= FTextureManager::HIT_Flat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,23 +132,6 @@ void FSkyBox::Unload ()
|
||||||
//
|
//
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void FSkyBox::PrecacheGL(int cache)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 6; i++)
|
|
||||||
{
|
|
||||||
if (faces[i])
|
|
||||||
{
|
|
||||||
faces[i]->PrecacheGL(cache);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void gl_ParseSkybox(FScanner &sc)
|
void gl_ParseSkybox(FScanner &sc)
|
||||||
{
|
{
|
||||||
int facecount=0;
|
int facecount=0;
|
||||||
|
|
|
@ -21,7 +21,6 @@ public:
|
||||||
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate, FCopyInfo *inf);
|
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate, FCopyInfo *inf);
|
||||||
bool UseBasePalette();
|
bool UseBasePalette();
|
||||||
void Unload ();
|
void Unload ();
|
||||||
void PrecacheGL(int cache);
|
|
||||||
|
|
||||||
void SetSize()
|
void SetSize()
|
||||||
{
|
{
|
||||||
|
|
|
@ -320,12 +320,12 @@ void FTexture::PrecacheGL(int cache)
|
||||||
{
|
{
|
||||||
if (gl_precache)
|
if (gl_precache)
|
||||||
{
|
{
|
||||||
if (cache & 2)
|
if (cache & (FTextureManager::HIT_Wall | FTextureManager::HIT_Flat | FTextureManager::HIT_Sky))
|
||||||
{
|
{
|
||||||
FMaterial * gltex = FMaterial::ValidateTexture(this, false);
|
FMaterial * gltex = FMaterial::ValidateTexture(this, false);
|
||||||
if (gltex) gltex->Precache();
|
if (gltex) gltex->Precache();
|
||||||
}
|
}
|
||||||
if (cache & 4)
|
if (cache & FTextureManager::HIT_Sprite)
|
||||||
{
|
{
|
||||||
FMaterial * gltex = FMaterial::ValidateTexture(this, true);
|
FMaterial * gltex = FMaterial::ValidateTexture(this, true);
|
||||||
if (gltex) gltex->Precache();
|
if (gltex) gltex->Precache();
|
||||||
|
|
Loading…
Reference in a new issue