History

Working on render bits.

Andrzej Kapolka committed 12 years ago

Commit 605b3281 parent d0c5fec4 files · +46 −9Browse files

Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 4 files). Show all

Unified · Split

interface/src/MetavoxelSystem.cpp+28−0
@@ -140,7 +140,32 @@ bool SpannerRenderVisitor::visit(Spanner* spanner, const glm::vec3& clipMinimum, · 139 unmodified lines
140140 return true;
141141 }
142142
143+class RenderVisitor : public MetavoxelVisitor {
144+public:
145+
146+ RenderVisitor(const MetavoxelLOD& lod);
147+
148+ virtual int visit(MetavoxelInfo& info);
149+};
150+
151+RenderVisitor::RenderVisitor(const MetavoxelLOD& lod) :
152+ MetavoxelVisitor(QVector<AttributePointer>() << AttributeRegistry::getInstance()->getRendererAttribute(),
153+ QVector<AttributePointer>(), lod) {
154+}
155+
156+int RenderVisitor::visit(MetavoxelInfo& info) {
157+ if (!info.isLeaf) {
158+ return DEFAULT_ORDER;
159+ }
160+ static_cast<MetavoxelRenderer*>(info.inputValues.at(0).getInlineValue<
161+ SharedObjectPointer>().data())->getImplementation()->render(info);
162+ return STOP_RECURSION;
163+}
164+
143165 void MetavoxelSystem::render() {
166+ RenderVisitor renderVisitor(getLOD());
167+ guide(renderVisitor);
168+
144169 int viewport[4];
145170 glGetIntegerv(GL_VIEWPORT, viewport);
146171 const int VIEWPORT_WIDTH_INDEX = 2;
@@ -480,6 +505,9 @@ AttributeValue PointBufferAttribute::inherit(const AttributeValue& parentValue) · 333 unmodified lines
480505 PointMetavoxelRendererImplementation::PointMetavoxelRendererImplementation() {
481506 }
482507
508+void PointMetavoxelRendererImplementation::render(MetavoxelInfo& info) {
509+}
510+
483511 static void enableClipPlane(GLenum plane, float x, float y, float z, float w) {
484512 GLdouble coefficients[] = { x, y, z, w };
485513 glClipPlane(plane, coefficients);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t