| 182 | } |
| 183 | |
| 184 | void ApplyProgramSampler(dmRender::HRenderContext render_context, HSampler sampler, uint8_t unit, dmGraphics::HTexture texture) |
| 185 | { |
| 186 | if (!sampler) |
| 187 | { |
| 188 | return; |
| 189 | } |
| 190 | |
| 191 | Sampler* s = (Sampler*) sampler; |
| 192 | dmGraphics::HContext graphics_context = dmRender::GetGraphicsContext(render_context); |
| 193 | |
| 194 | if (s->m_Location != -1) |
| 195 | { |
| 196 | dmGraphics::SetSampler(graphics_context, s->m_Location, unit); |
| 197 | dmGraphics::SetTextureParams(graphics_context, texture, s->m_MinFilter, s->m_MagFilter, s->m_UWrap, s->m_VWrap, s->m_MaxAnisotropy); |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | void GetProgramUniformCount(dmGraphics::HProgram program, uint32_t total_constants_count, uint32_t* constant_count_out, uint32_t* samplers_count_out) |
| 202 | { |
no test coverage detected