9#ifndef WIREFRAMERENDERER_H
10#define WIREFRAMERENDERER_H
49 GLuint _VAO, _VBO, _EBO;
50 unsigned int _nIndices;
77 DrawList(GLuint maxEntries,
size_t maxLinesPerVertex)
78 : _drawList(maxEntries * maxLinesPerVertex, (std::numeric_limits<GLuint>::max)()), _maxEntries(maxEntries), _maxLinesPerVertex(maxLinesPerVertex)
82 bool InList(GLuint idx0, GLuint idx1)
87 if (idx1 < idx0) { std::swap(idx1, idx0); }
89 for (
int i = 0; i < _maxLinesPerVertex; i++) {
90 if (_drawList[idx0 * _maxLinesPerVertex + i] == idx1) {
return (
true); }
91 if (_drawList[idx0 * _maxLinesPerVertex + i] == (std::numeric_limits<GLuint>::max)()) {
92 _drawList[idx0 * _maxLinesPerVertex + i] = idx1;
100 vector<GLuint> _drawList;
101 const size_t _maxEntries;
102 const size_t _maxLinesPerVertex;
105 void _buildCacheVertices(
const Grid *grid,
const Grid *heightGrid, vector<GLuint> &nodeMap,
bool *GPUOutOfMemory)
const;
107 size_t _buildCacheConnectivity(
const Grid *grid,
const vector<GLuint> &nodeMap,
bool *GPUOutOfMemory)
const;
110 bool _isCacheDirty()
const;
111 void _saveCacheParams();
112 void _drawCell(
const GLuint *cellNodeIndices,
int n,
bool layered,
const std::vector<GLuint> &nodeMap, GLuint invalidIndex, std::vector<unsigned int> &indices, DrawList &drawList)
const;
114 void _clearCache() { _cacheParams.varName.clear(); }
A cache based data reader.
A singleton class for managing Params instances.
A class that performs rendering in a Visualizer.
WireFrameRenderer(const ParamsMgr *pm, string winName, string dataSetName, string instName, DataMgr *dataMgr)
static string GetClassType()
virtual int _initializeGL()
virtual ~WireFrameRenderer()
Destructor.
std::vector< double > boxMax
virtual int _paintGL(bool fast)
All OpenGL rendering is performed in the pure virtual paintGL method.