1243 QList<float> selfloats; |
1243 QList<float> selfloats; |
1244 selfloats << ((float) pixelptr[0]) / 255.0f; |
1244 selfloats << ((float) pixelptr[0]) / 255.0f; |
1245 selfloats << ((float) pixelptr[1]) / 255.0f; |
1245 selfloats << ((float) pixelptr[1]) / 255.0f; |
1246 selfloats << ((float) pixelptr[2]) / 255.0f; |
1246 selfloats << ((float) pixelptr[2]) / 255.0f; |
1247 selfloats << ((float) pixelptr[3]) / 255.0f; |
1247 selfloats << ((float) pixelptr[3]) / 255.0f; |
1248 print ("selection: %1\n", selfloats); |
|
1249 |
1248 |
1250 qint32 idx = |
1249 qint32 idx = |
1251 (*(pixelptr + 0) * 0x10000) + |
1250 (*(pixelptr + 0) * 0x10000) + |
1252 (*(pixelptr + 1) * 0x100) + |
1251 (*(pixelptr + 1) * 0x100) + |
1253 *(pixelptr + 2); |
1252 *(pixelptr + 2); |
1254 pixelptr += 4; |
1253 pixelptr += 4; |
1255 |
1254 |
1256 if (idx == 0xFFFFFF) |
1255 if (idx == 0xFFFFFF) |
1257 continue; // White is background; skip |
1256 continue; // White is background; skip |
1258 |
1257 |
1259 dvalof (idx); |
|
1260 LDObject* obj = LDObject::fromID (idx); |
1258 LDObject* obj = LDObject::fromID (idx); |
1261 assert (obj != null); |
1259 assert (obj != null); |
1262 |
1260 |
1263 // If this is an additive single pick and the object is currently selected, |
1261 // If this is an additive single pick and the object is currently selected, |
1264 // we remove it from selection instead. |
1262 // we remove it from selection instead. |
1620 // ============================================================================= |
1618 // ============================================================================= |
1621 // |
1619 // |
1622 void GLRenderer::compileObject (LDObject* obj) |
1620 void GLRenderer::compileObject (LDObject* obj) |
1623 { |
1621 { |
1624 compiler()->stageForCompilation (obj); |
1622 compiler()->stageForCompilation (obj); |
1625 |
|
1626 // Mark in known vertices of this object |
|
1627 /* |
|
1628 QList<Vertex> verts = getVertices (obj); |
|
1629 m_knownVerts << verts; |
|
1630 removeDuplicates (m_knownVerts); |
|
1631 */ |
|
1632 |
|
1633 obj->setGLInit (true); |
1623 obj->setGLInit (true); |
1634 } |
1624 } |
1635 |
1625 |
1636 // ============================================================================= |
1626 // ============================================================================= |
1637 // |
1627 // |