mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- second part of texture fix.
This commit is contained in:
parent
ef55386d9f
commit
6a02eaa595
3 changed files with 14 additions and 5 deletions
|
@ -162,6 +162,8 @@ void FGLRenderer::Initialize(int width, int height)
|
|||
mCustomPostProcessShaders = new FCustomPostProcessShaders();
|
||||
m2DDrawer = new F2DDrawer;
|
||||
|
||||
GetSpecialTextures();
|
||||
|
||||
// needed for the core profile, because someone decided it was a good idea to remove the default VAO.
|
||||
if (!gl.legacyMode)
|
||||
{
|
||||
|
@ -171,11 +173,6 @@ void FGLRenderer::Initialize(int width, int height)
|
|||
}
|
||||
else mVAOID = 0;
|
||||
|
||||
if (gl.legacyMode) glLight = TexMan.CheckForTexture("glstuff/gllight.png", FTexture::TEX_MiscPatch);
|
||||
glPart2 = TexMan.CheckForTexture("glstuff/glpart2.png", FTexture::TEX_MiscPatch);
|
||||
glPart = TexMan.CheckForTexture("glstuff/glpart.png", FTexture::TEX_MiscPatch);
|
||||
mirrorTexture = TexMan.CheckForTexture("glstuff/mirror.png", FTexture::TEX_MiscPatch);
|
||||
|
||||
mVBO = new FFlatVertexBuffer(width, height);
|
||||
mSkyVBO = new FSkyVertexBuffer;
|
||||
if (!gl.legacyMode) mLights = new FLightBuffer();
|
||||
|
@ -236,6 +233,16 @@ FGLRenderer::~FGLRenderer()
|
|||
delete mFXAALumaShader;
|
||||
}
|
||||
|
||||
|
||||
void FGLRenderer::GetSpecialTextures()
|
||||
{
|
||||
if (gl.legacyMode) glLight = TexMan.CheckForTexture("glstuff/gllight.png", FTexture::TEX_MiscPatch);
|
||||
glPart2 = TexMan.CheckForTexture("glstuff/glpart2.png", FTexture::TEX_MiscPatch);
|
||||
glPart = TexMan.CheckForTexture("glstuff/glpart.png", FTexture::TEX_MiscPatch);
|
||||
mirrorTexture = TexMan.CheckForTexture("glstuff/mirror.png", FTexture::TEX_MiscPatch);
|
||||
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Calculates the viewport values needed for 2D and 3D operations
|
||||
|
|
|
@ -190,6 +190,7 @@ public:
|
|||
void CopyToBackbuffer(const GL_IRECT *bounds, bool applyGamma);
|
||||
void DrawPresentTexture(const GL_IRECT &box, bool applyGamma);
|
||||
void Flush();
|
||||
void GetSpecialTextures();
|
||||
|
||||
|
||||
bool StartOffscreen();
|
||||
|
|
|
@ -551,6 +551,7 @@ void OpenGLFrameBuffer::GameRestart()
|
|||
UpdatePalette ();
|
||||
ScreenshotBuffer = NULL;
|
||||
gl_GenerateGlobalBrightmapFromColormap();
|
||||
GLRenderer->GetSpecialTextures();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue