- more texture cleanup.
It is now in a state where FTexture really needs to be separated from FGameTexture.
This commit is contained in:
parent
31035a6cea
commit
83817080bb
21 changed files with 91 additions and 103 deletions
|
|
@ -297,12 +297,13 @@ sector_t *FGLRenderer::RenderView(player_t* player)
|
|||
|
||||
void FGLRenderer::BindToFrameBuffer(FMaterial *mat)
|
||||
{
|
||||
auto BaseLayer = static_cast<FHardwareTexture*>(mat->GetLayer(0, 0));
|
||||
FTexture* layer;
|
||||
auto BaseLayer = static_cast<FHardwareTexture*>(mat->GetLayer(0, 0, &layer));
|
||||
|
||||
if (BaseLayer == nullptr)
|
||||
{
|
||||
// must create the hardware texture first
|
||||
BaseLayer->BindOrCreate(mat->sourcetex, 0, 0, 0, 0);
|
||||
BaseLayer->BindOrCreate(layer, 0, 0, 0, 0);
|
||||
FHardwareTexture::Unbind(0);
|
||||
gl_RenderState.ClearLastMaterial();
|
||||
}
|
||||
|
|
@ -318,7 +319,7 @@ void FGLRenderer::BindToFrameBuffer(FMaterial *mat)
|
|||
void FGLRenderer::RenderTextureView(FCanvasTexture *tex, AActor *Viewpoint, double FOV)
|
||||
{
|
||||
// This doesn't need to clear the fake flat cache. It can be shared between camera textures and the main view of a scene.
|
||||
FMaterial * gltex = FMaterial::ValidateTexture(tex, false);
|
||||
FMaterial * gltex = FMaterial::ValidateTexture(reinterpret_cast<FGameTexture*>(tex), false);
|
||||
|
||||
float ratio = (float)tex->GetDisplayWidthDouble() / (float)tex->GetDisplayHeightDouble();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue