@@ -47,17 +47,17 @@ void Texture::load(const uint8_t* bgraPixels, Extent size)
4747
4848 glGenTextures (1 , &texture_);
4949 glBindTexture (GL_TEXTURE_2D , texture_);
50- glTexParameteri (GL_TEXTURE_2D , GL_TEXTURE_MIN_FILTER , filterLinear ? GL_LINEAR : GL_NEAREST );
51- glTexParameteri (GL_TEXTURE_2D , GL_TEXTURE_MAG_FILTER , filterLinear ? GL_LINEAR : GL_NEAREST );
50+ glTexParameteri (GL_TEXTURE_2D , GL_TEXTURE_MIN_FILTER , GL_NEAREST );
51+ glTexParameteri (GL_TEXTURE_2D , GL_TEXTURE_MAG_FILTER , GL_NEAREST );
5252 glTexParameteri (GL_TEXTURE_2D , GL_TEXTURE_WRAP_S , GL_CLAMP_TO_EDGE );
5353 glTexParameteri (GL_TEXTURE_2D , GL_TEXTURE_WRAP_T , GL_CLAMP_TO_EDGE );
5454 glTexImage2D (GL_TEXTURE_2D , 0 , GL_RGBA , size.x , size.y , 0 , GL_BGRA , GL_UNSIGNED_BYTE , bgraPixels);
5555 size_ = size;
5656}
5757
58- void Texture::createEmpty (Extent size, bool filterLinear )
58+ void Texture::createEmpty (Extent size)
5959{
60- load (nullptr , size, filterLinear );
60+ load (nullptr , size);
6161}
6262
6363void Texture::upload (const void * bgraPixels)
@@ -68,7 +68,7 @@ void Texture::upload(const void* bgraPixels)
6868 glTexSubImage2D (GL_TEXTURE_2D , 0 , 0 , 0 , size_.x , size_.y , GL_BGRA , GL_UNSIGNED_BYTE , bgraPixels);
6969}
7070
71- bool Texture::load (const libsiedler2::baseArchivItem_Bitmap& bitmap, bool filterLinear )
71+ bool Texture::load (const libsiedler2::baseArchivItem_Bitmap& bitmap)
7272{
7373 const auto w = bitmap.getWidth ();
7474 const auto h = bitmap.getHeight ();
@@ -103,7 +103,7 @@ bool Texture::load(const libsiedler2::baseArchivItem_Bitmap& bitmap, bool filter
103103 return false ;
104104 }
105105
106- load (bgra.data (), Extent (w, h), filterLinear );
106+ load (bgra.data (), Extent (w, h));
107107 return true ;
108108}
109109
@@ -224,9 +224,9 @@ void drawRect(const Rect& rect, unsigned color)
224224 glColor4f (1 , 1 , 1 , 1 );
225225}
226226
227- Texture& getTexture (ArchiveID archive, int index, bool filterLinear )
227+ Texture& getTexture (ArchiveID archive, int index)
228228{
229- return Texture::getTexture (archive, index, filterLinear );
229+ return Texture::getTexture (archive, index);
230230}
231231
232232void drawButtonBox (const Rect& area, bool pressed, unsigned baseTex, unsigned faceTex)
@@ -256,7 +256,7 @@ void drawButtonBox(const Rect& area, bool pressed, unsigned baseTex, unsigned fa
256256// Cache for typed-archive textures: (archive, index) → Texture
257257static std::map<std::pair<ArchiveID, int >, std::unique_ptr<Texture>> s_typedTexCache;
258258
259- Texture& Texture::getTexture (ArchiveID archive, int index, bool filterLinear )
259+ Texture& Texture::getTexture (ArchiveID archive, int index)
260260{
261261 auto & archiv = global::typedArchives[archive];
262262 if (index < 0 || static_cast <unsigned >(index) >= archiv.size ())
@@ -272,7 +272,7 @@ Texture& Texture::getTexture(ArchiveID archive, int index, bool filterLinear)
272272 const auto * bmp = dynamic_cast <const libsiedler2::baseArchivItem_Bitmap*>(archiv.get (index));
273273 if (bmp)
274274 {
275- tex->load (*bmp, filterLinear );
275+ tex->load (*bmp);
276276 tex->anchor_ = {bmp->getNx (), bmp->getNy ()};
277277 }
278278 it = s_typedTexCache.emplace (key, std::move (tex)).first ;
0 commit comments