- made the translation container a class.
This also splits off some Doom-specific implementation details into higher level headers.
This commit is contained in:
parent
520a96033b
commit
cf757ba834
32 changed files with 293 additions and 375 deletions
|
|
@ -85,7 +85,7 @@ unsigned int FHardwareTexture::lastbound[FHardwareTexture::MAX_TEXTURES];
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
unsigned int FHardwareTexture::CreateTexture(unsigned char * buffer, int w, int h, int texunit, bool mipmap, int translation, const char *name)
|
||||
unsigned int FHardwareTexture::CreateTexture(unsigned char * buffer, int w, int h, int texunit, bool mipmap, const char *name)
|
||||
{
|
||||
int rh,rw;
|
||||
int texformat = GL_RGBA8;// TexFormat[gl_texture_format];
|
||||
|
|
@ -317,9 +317,6 @@ bool FHardwareTexture::BindOrCreate(FTexture *tex, int texunit, int clampmode, i
|
|||
{
|
||||
int usebright = false;
|
||||
|
||||
auto remap = TranslationToTable(translation);
|
||||
translation = remap == nullptr ? 0 : remap->GetUniqueIndex();
|
||||
|
||||
bool needmipmap = (clampmode <= CLAMP_XY);
|
||||
|
||||
// Bind it to the system.
|
||||
|
|
@ -343,7 +340,7 @@ bool FHardwareTexture::BindOrCreate(FTexture *tex, int texunit, int clampmode, i
|
|||
w = tex->GetWidth();
|
||||
h = tex->GetHeight();
|
||||
}
|
||||
if (!CreateTexture(texbuffer.mBuffer, w, h, texunit, needmipmap, translation, "FHardwareTexture.BindOrCreate"))
|
||||
if (!CreateTexture(texbuffer.mBuffer, w, h, texunit, needmipmap, "FHardwareTexture.BindOrCreate"))
|
||||
{
|
||||
// could not create texture
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue