Skip to content

Commit

Permalink
Small fixes for the perface and picking examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
vilya committed Oct 19, 2010
1 parent 8ab699b commit b0a5f7e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
10 changes: 0 additions & 10 deletions example/perface.cpp
Expand Up @@ -60,11 +60,6 @@ void PerFaceRenderer::setup()
{
glEnable(GL_DEPTH_TEST);

GLint vp[4];
glGetIntegerv(GL_VIEWPORT, vp);
unsigned int width = vp[2];
unsigned int height = vp[3];

// Load and link the shaders.
GLuint vertexShader = vgl::loadShader(GL_VERTEX_SHADER, kVertexShader);
GLuint geometryShader = vgl::loadShader(GL_GEOMETRY_SHADER_EXT, kGeometryShader);
Expand Down Expand Up @@ -92,11 +87,6 @@ void PerFaceRenderer::setup()

void PerFaceRenderer::render()
{
GLint vp[4];
glGetIntegerv(GL_VIEWPORT, vp);
unsigned int width = vp[2];
unsigned int height = vp[3];

glUseProgram(_prog);
glBindBuffer(GL_ARRAY_BUFFER, _buffers[0]);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffers[1]);
Expand Down
3 changes: 0 additions & 3 deletions example/picking.cpp
Expand Up @@ -165,8 +165,6 @@ void PickingRenderer::render()
unsigned int width = vp[2];
unsigned int height = vp[3];

fprintf(stderr, "width = %u, height = %u\n", width, height);

unsigned int newBufSize = width * height * 3;
if (newBufSize != _pickData.size()) {
_pickData.resize(newBufSize);
Expand Down Expand Up @@ -475,7 +473,6 @@ void PickingViewer::actionHandler(int action)

int main(int argc, char** argv)
{
PickingRenderer renderer;
PickingViewer viewer;
viewer.run();
}
Expand Down

0 comments on commit b0a5f7e

Please sign in to comment.