| 770 | } |
| 771 | |
| 772 | void GL46Engine::DisableSamplers(Shader const* shader, GLuint program) |
| 773 | { |
| 774 | int32_t const index = SamplerState::shaderDataLookup; |
| 775 | for (auto const& ts : shader->GetData(index)) |
| 776 | { |
| 777 | if (ts.object) |
| 778 | { |
| 779 | auto gl4Sampler = static_cast<GL46SamplerState*>(Get(ts.object)); |
| 780 | |
| 781 | if (gl4Sampler) |
| 782 | { |
| 783 | auto const location = ts.bindPoint; |
| 784 | auto const unit = mTextureSamplerUnitMap.GetUnit(program, location); |
| 785 | glBindSampler(unit, 0); |
| 786 | mTextureSamplerUnitMap.ReleaseUnit(unit); |
| 787 | } |
| 788 | else |
| 789 | { |
| 790 | LogError("Failed to get sampler."); |
| 791 | } |
| 792 | } |
| 793 | else |
| 794 | { |
| 795 | LogError(ts.name + " is null sampler."); |
| 796 | } |
| 797 | } |
| 798 | } |
| 799 | |
| 800 | int32_t GL46Engine::ProgramIndexUnitMap::AcquireUnit(GLint program, GLint index) |
| 801 | { |
nothing calls this directly
no test coverage detected