src/gl/compiler.cpp

changeset 73
97df974b5ed5
parent 53
3af627f7a40f
child 78
97c3ce5aa498
equal deleted inserted replaced
72:7c27cda03747 73:97df974b5ed5
235 return gl::ArrayClass::ConditionalLines; 235 return gl::ArrayClass::ConditionalLines;
236 } 236 }
237 return gl::ArrayClass::Lines; 237 return gl::ArrayClass::Lines;
238 } 238 }
239 239
240 ldraw::Id gl::Compiler::idFromColor(const std::array<GLbyte, 3>& data) 240 ldraw::id_t gl::Compiler::idFromColor(const std::array<GLbyte, 3>& data)
241 { 241 {
242 return {data[0] * std::int32_t{0x10000} + data[1] * std::int32_t{0x100} + data[2]}; 242 return {data[0] * std::int32_t{0x10000} + data[1] * std::int32_t{0x100} + data[2]};
243 } 243 }
244 244
245 void gl::Compiler::buildPolygon( 245 void gl::Compiler::buildPolygon(
309 auto& object = this->glObjects[static_cast<int>(arrayClass)]; 309 auto& object = this->glObjects[static_cast<int>(arrayClass)];
310 object.program->release(); 310 object.program->release();
311 object.vertexArray.release(); 311 object.vertexArray.release();
312 } 312 }
313 313
314 void gl::Compiler::setSelectedObjects(const QSet<ldraw::Id> ids) 314 void gl::Compiler::setSelectedObjects(const QSet<ldraw::id_t> ids)
315 { 315 {
316 for (int i = 0; i < gl::NUM_ARRAY_CLASSES; i += 1) 316 for (int i = 0; i < gl::NUM_ARRAY_CLASSES; i += 1)
317 { 317 {
318 auto& vector = this->glObjects[i].cachedData; 318 auto& vector = this->glObjects[i].cachedData;
319 for (gl::Vertex& vertex : vector) 319 for (gl::Vertex& vertex : vector)

mercurial