203 const int g = (id.value / 0x100) % 0x100; |
203 const int g = (id.value / 0x100) % 0x100; |
204 const int b = id.value % 0x100; |
204 const int b = id.value % 0x100; |
205 return {r / 255.0f, g / 255.0f, b / 255.0f}; |
205 return {r / 255.0f, g / 255.0f, b / 255.0f}; |
206 } |
206 } |
207 |
207 |
|
208 ldraw::Id gl::Compiler::idFromColor(const std::array<GLbyte, 3>& data) |
|
209 { |
|
210 return {data[0] * std::int32_t{0x10000} + data[1] * std::int32_t{0x100} + data[2]}; |
|
211 } |
|
212 |
208 void gl::Compiler::buildPolygon( |
213 void gl::Compiler::buildPolygon( |
209 gl::Polygon polygon, |
214 gl::Polygon polygon, |
210 std::vector<gl::Vertex>* vboData, |
215 std::vector<gl::Vertex>* vboData, |
211 const gl::RenderPreferences& preferences) |
216 const gl::RenderPreferences& preferences) |
212 { |
217 { |