MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / SetMagFiltering

Method SetMagFiltering

Sources/nCine/Graphics/Texture.cpp:278–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276 }
277
278 void Texture::SetMagFiltering(SamplerFilter filter)
279 {
280 if (magFiltering_ == filter) {
281 return;
282 }
283
284 GLenum glFilter = GL_NEAREST;
285 // clang-format off
286 switch (filter) {
287 case SamplerFilter::Nearest: glFilter = GL_NEAREST; break;
288 case SamplerFilter::Linear: glFilter = GL_LINEAR; break;
289 default: glFilter = GL_NEAREST; break;
290 }
291 // clang-format on
292
293 glTexture_->Bind();
294 glTexture_->TexParameteri(GL_TEXTURE_MAG_FILTER, glFilter);
295 magFiltering_ = filter;
296 }
297
298 void Texture::SetWrap(SamplerWrapping wrapMode)
299 {

Callers 12

RequestGraphicsMethod · 0.80
RequestGraphicsAuraMethod · 0.80
RequestTileSetMethod · 0.80
GetEpisodeByPathMethod · 0.80
GetNoiseTextureMethod · 0.80
InitializeMethod · 0.80
InitializeMethod · 0.80
InitializeMethod · 0.80
FontMethod · 0.80
InitializeMethod · 0.80
InitializeMethod · 0.80

Calls 2

TexParameteriMethod · 0.80
BindMethod · 0.45

Tested by

no test coverage detected