MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / ActiveTexture

Class ActiveTexture

framework/render/gl20/ogl_2_0_renderer.cpp:433–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431 }
432};
433class ActiveTexture
434{
435 ActiveTexture(const ActiveTexture &) = delete;
436
437 public:
438 static GLenum getUnitEnum(int unit) { return gl20::TEXTURE0 + unit; }
439
440 ActiveTexture(int unit)
441 {
442 GLenum prevUnit;
443 gl20::GetIntegerv(gl20::ACTIVE_TEXTURE, reinterpret_cast<GLint *>(&prevUnit));
444 if (prevUnit == getUnitEnum(unit))
445 {
446 return;
447 }
448 gl20::ActiveTexture(getUnitEnum(unit));
449 }
450};
451
452class UnpackAlignment
453{

Callers 1

ActiveTextureMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected