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
140 return true;140 return true;
141}141}
142 142
143class RenderVisitor : public MetavoxelVisitor {
144public:
145
146 RenderVisitor(const MetavoxelLOD& lod);
147
148 virtual int visit(MetavoxelInfo& info);
149};
150
151RenderVisitor::RenderVisitor(const MetavoxelLOD& lod) :
152 MetavoxelVisitor(QVector<AttributePointer>() << AttributeRegistry::getInstance()->getRendererAttribute(),
153 QVector<AttributePointer>(), lod) {
154}
155
156int 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
143void MetavoxelSystem::render() {165void MetavoxelSystem::render() {
166 RenderVisitor renderVisitor(getLOD());
167 guide(renderVisitor);
168
144 int viewport[4];169 int viewport[4];
145 glGetIntegerv(GL_VIEWPORT, viewport);170 glGetIntegerv(GL_VIEWPORT, viewport);
146 const int VIEWPORT_WIDTH_INDEX = 2;171 const int VIEWPORT_WIDTH_INDEX = 2;
@@ -480,6 +505,9 @@ AttributeValue PointBufferAttribute::inherit(const AttributeValue& parentValue) · 333 unmodified lines
480PointMetavoxelRendererImplementation::PointMetavoxelRendererImplementation() {505PointMetavoxelRendererImplementation::PointMetavoxelRendererImplementation() {
481}506}
482 507
508void PointMetavoxelRendererImplementation::render(MetavoxelInfo& info) {
509}
510
483static void enableClipPlane(GLenum plane, float x, float y, float z, float w) {511static void enableClipPlane(GLenum plane, float x, float y, float z, float w) {
484 GLdouble coefficients[] = { x, y, z, w };512 GLdouble coefficients[] = { x, y, z, w };
485 glClipPlane(plane, coefficients);513 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