Ignore:
Timestamp:
Jan 3, 2008, 9:20:48 AM (17 years ago)
Author:
vrinside
Message:

Put rendering modes such as toggling wireframe, toggling culling mode. For this, RenderContext? class is added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/vizservers/nanovis/HeightMap.cpp

    r837 r838  
    1313#include <unistd.h>
    1414#include <fcntl.h>
     15#include <RenderContext.h>
    1516
    1617HeightMap::HeightMap()
     
    4041}
    4142
    42 void HeightMap::render()
    43 {
     43void HeightMap::render(graphics::RenderContext* renderContext)
     44{
     45    if (renderContext->getCullMode() == graphics::RenderContext::NO_CULL)
     46    {
     47        glDisable(GL_CULL_FACE);
     48    }
     49    else
     50    {
     51        glEnable(GL_CULL_FACE);
     52        glCullFace((GLuint) renderContext->getCullMode());
     53    }
     54
     55    glPolygonMode(GL_FRONT_AND_BACK, (GLuint) renderContext->getPolygonMode());
     56    glShadeModel((GLuint) renderContext->getShadingModel());
     57
    4458    glPushMatrix();
    4559
     
    105119
    106120        glShadeModel(GL_FLAT);
     121    glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
    107122
    108123        if (_contour && _contourVisible)
Note: See TracChangeset for help on using the changeset viewer.