mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- fixed a few warnings and changed the return type of FGLTexture::Bind, because no caller needs the hardware texture.
This commit is contained in:
parent
0affc119fd
commit
59a08ce0df
3 changed files with 12 additions and 13 deletions
|
@ -157,7 +157,7 @@ FHardwareTexture *FGLTexture::CreateHwTexture()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
const FHardwareTexture *FGLTexture::Bind(int texunit, int clampmode, int translation, int flags)
|
||||
bool FGLTexture::Bind(int texunit, int clampmode, int translation, int flags)
|
||||
{
|
||||
int usebright = false;
|
||||
|
||||
|
@ -216,7 +216,7 @@ const FHardwareTexture *FGLTexture::Bind(int texunit, int clampmode, int transla
|
|||
{
|
||||
// could not create texture
|
||||
delete[] buffer;
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
delete[] buffer;
|
||||
}
|
||||
|
@ -225,9 +225,9 @@ const FHardwareTexture *FGLTexture::Bind(int texunit, int clampmode, int transla
|
|||
if (lastSampler != clampmode)
|
||||
lastSampler = GLRenderer->mSamplerManager->Bind(texunit, clampmode, lastSampler);
|
||||
lastTranslation = translation;
|
||||
return hwtex;
|
||||
return true;
|
||||
}
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -636,8 +636,7 @@ void FMaterial::Bind(int clampmode, int translation)
|
|||
// Textures that are already scaled in the texture lump will not get replaced by hires textures.
|
||||
int flags = mExpanded? CTF_Expand : (gl_texture_usehires && tex->Scale.X == 1 && tex->Scale.Y == 1 && clampmode <= CLAMP_XY)? CTF_CheckHires : 0;
|
||||
|
||||
const FHardwareTexture *gltexture = mBaseLayer->Bind(0, clampmode, translation, flags);
|
||||
if (gltexture != NULL)
|
||||
if (mBaseLayer->Bind(0, clampmode, translation, flags))
|
||||
{
|
||||
for(unsigned i=0;i<mTextureLayers.Size();i++)
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ private:
|
|||
|
||||
FHardwareTexture *CreateHwTexture();
|
||||
|
||||
const FHardwareTexture *Bind(int texunit, int clamp, int translation, int flags);
|
||||
bool Bind(int texunit, int clamp, int translation, int flags);
|
||||
|
||||
public:
|
||||
FGLTexture(FTexture * tx, bool expandpatches);
|
||||
|
|
|
@ -90,11 +90,11 @@ void FFlatVertexGenerator::OutputResized(int width, int height)
|
|||
|
||||
void FFlatVertex::SetFlatVertex(vertex_t *vt, const secplane_t & plane)
|
||||
{
|
||||
x = vt->fX();
|
||||
y = vt->fY();
|
||||
z = plane.ZatPoint(vt);
|
||||
u = vt->fX()/64.f;
|
||||
v = -vt->fY()/64.f;
|
||||
x = (float)vt->fX();
|
||||
y = (float)vt->fY();
|
||||
z = (float)plane.ZatPoint(vt);
|
||||
u = (float)vt->fX()/64.f;
|
||||
v = -(float)vt->fY()/64.f;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -243,7 +243,7 @@ void FFlatVertexGenerator::UpdatePlaneVertices(sector_t *sec, int plane, FFlatVe
|
|||
FFlatVertex *mapvt = &map[startvt];
|
||||
for(int i=0; i<countvt; i++, vt++, mapvt++)
|
||||
{
|
||||
vt->z = splane.ZatPoint(vt->x, vt->y);
|
||||
vt->z = (float)splane.ZatPoint(vt->x, vt->y);
|
||||
if (plane == sector_t::floor && sec->transdoor) vt->z -= 1;
|
||||
mapvt->z = vt->z;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue