| 431 | } |
| 432 | }; |
| 433 | class 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 | |
| 452 | class UnpackAlignment |
| 453 | { |