| 67 | } |
| 68 | |
| 69 | void ApplyComputeProgramConstants(dmRender::HRenderContext render_context, HComputeProgram compute_program) |
| 70 | { |
| 71 | dmGraphics::HContext graphics_context = dmRender::GetGraphicsContext(render_context); |
| 72 | const dmArray<RenderConstant>& render_constants = compute_program->m_Constants; |
| 73 | |
| 74 | dmVMath::Matrix4 world_matrix; |
| 75 | dmVMath::Matrix4 texture_matrix; |
| 76 | |
| 77 | for (int i = 0; i < render_constants.Size(); ++i) |
| 78 | { |
| 79 | const RenderConstant& material_constant = render_constants[i]; |
| 80 | const HConstant constant = material_constant.m_Constant; |
| 81 | dmGraphics::HUniformLocation location = GetConstantLocation(constant); |
| 82 | dmRenderDDF::MaterialDesc::ConstantType type = GetConstantType(constant); |
| 83 | SetProgramConstant(render_context, graphics_context, world_matrix, texture_matrix, type, location, constant); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | void SetComputeProgramConstant(HComputeProgram compute_program, dmhash_t name_hash, Vector4* values, uint32_t count) |
| 88 | { |
no test coverage detected