- moved the texture binding code back to the OpenGL specific parts.
turns out that this cannot be consolidated with Vulkan because the semantics are far too different here.
This commit is contained in:
parent
69a3271440
commit
7817e6a7b2
12 changed files with 129 additions and 118 deletions
|
|
@ -73,7 +73,6 @@ OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, int width, int height, int
|
|||
|
||||
// Make sure all global variables tracking OpenGL context state are reset..
|
||||
FHardwareTexture::InitGlobalState();
|
||||
FMaterial::InitGlobalState();
|
||||
gl_RenderState.Reset();
|
||||
|
||||
GLRenderer = new FGLRenderer(this);
|
||||
|
|
@ -355,6 +354,11 @@ IHardwareTexture *OpenGLFrameBuffer::CreateHardwareTexture(FTexture *tex)
|
|||
return new FHardwareTexture(tex->bNoCompress);
|
||||
}
|
||||
|
||||
void OpenGLFrameBuffer::PrecacheMaterial(FMaterial *mat, int translation)
|
||||
{
|
||||
gl_RenderState.SetMaterial(mat, CLAMP_NONE, translation, false, false);
|
||||
}
|
||||
|
||||
FModelRenderer *OpenGLFrameBuffer::CreateModelRenderer(int mli)
|
||||
{
|
||||
return new FGLModelRenderer(mli);
|
||||
|
|
@ -371,11 +375,6 @@ IShaderProgram *OpenGLFrameBuffer::CreateShaderProgram()
|
|||
}
|
||||
|
||||
|
||||
void OpenGLFrameBuffer::UnbindTexUnit(int no)
|
||||
{
|
||||
FHardwareTexture::Unbind(no);
|
||||
}
|
||||
|
||||
void OpenGLFrameBuffer::FlushTextures()
|
||||
{
|
||||
if (GLRenderer) GLRenderer->FlushTextures();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue