| 115 | } |
| 116 | |
| 117 | void GLArbGpuProgram::bindProgramParameters(GpuProgramParametersSharedPtr params, uint16 mask) |
| 118 | { |
| 119 | GLenum type = getProgramType(); |
| 120 | |
| 121 | // only supports float constants |
| 122 | GpuLogicalBufferStructPtr floatStruct = params->getLogicalBufferStruct(); |
| 123 | |
| 124 | for (const auto& m : floatStruct->map) |
| 125 | { |
| 126 | if (m.second.variability & mask) |
| 127 | { |
| 128 | GLuint logicalIndex = static_cast<GLuint>(m.first); |
| 129 | const float* pFloat = params->getFloatPointer(m.second.physicalIndex); |
| 130 | // Iterate over the params, set in 4-float chunks (low-level) |
| 131 | for (size_t j = 0; j < m.second.currentSize; j+=4) |
| 132 | { |
| 133 | glProgramLocalParameter4fvARB(type, logicalIndex, pFloat); |
| 134 | pFloat += 4; |
| 135 | ++logicalIndex; |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | void GLArbGpuProgram::unloadImpl(void) |
| 142 | { |
no test coverage detected