source: trunk/packages/vizservers/nanovis/RenderContext.h @ 3464

Last change on this file since 3464 was 3463, checked in by ldelgass, 7 years ago

Begin process of renaming R2 library

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2#ifndef RENDER_CONTEXT_H
3#define RENDER_CONTEXT_H
4
5#include <GL/gl.h>
6
7namespace nv {
8namespace graphics {
9
10class RenderContext
11{
12public:
13    enum ShadingModel {
14        FLAT = GL_FLAT ,        //!< Flat Shading
15        SMOOTH = GL_SMOOTH      //!< Smooth shading (Gouraud shading model)
16    };
17
18    enum PolygonMode {
19        LINE = GL_LINE,
20        FILL = GL_FILL
21    };
22
23    enum CullMode {
24        NO_CULL,                //!< No culling
25        BACK= GL_BACK,          //!< Back face culling
26        FRONT= GL_FRONT         //!< Front face culling
27    };
28
29    RenderContext();
30
31    ~RenderContext();
32
33    /**
34     *@brief Set the shading model such as flat, smooth
35     */
36    void setShadingModel(const ShadingModel shadeModel)
37    {
38        _shadingModel = shadeModel;
39    }
40
41    ShadingModel getShadingModel() const
42    {
43        return _shadingModel;
44    }
45
46    void setCullMode(const CullMode cullMode)
47    {
48        _cullMode = cullMode;
49    }
50
51    CullMode getCullMode() const
52    {
53        return _cullMode;
54    }
55
56    void setPolygonMode(const PolygonMode fillMode)
57    {
58        _fillMode = fillMode;
59    }
60
61    PolygonMode getPolygonMode() const
62    {
63        return _fillMode;
64    }
65
66private :
67    CullMode _cullMode;
68    PolygonMode _fillMode;
69    ShadingModel _shadingModel;
70};
71
72}
73}
74
75#endif
Note: See TracBrowser for help on using the repository browser.