VisLU Flow 0.1

src/renderer/renderer.h

00001 #ifndef RENDERER_H
00002 #define RENDERER_H
00003 
00004 #include <GL/glew.h>
00005 #include <FlowData.h>
00006 
00007 #include <Shader.h>
00008 #include "streamgrid.h"
00009 
00010 #include <vector>
00011 
00012 class Renderer
00013 {
00014 public:
00015     Renderer();
00016     virtual ~Renderer();
00017 
00018     void initialize();
00019     void resize(int w, int h);
00020     void render();
00021     void update();
00022     void setData(int);
00023     void setCurrentChannel(int);
00024     void setColor(int, const QColor&);
00025     void setStepsize(int);
00026     void setDSep(int);
00027     void setDTest(float);
00028     void setShowArrows(bool);
00029     void setShowStreamlines(bool);
00030     void setRenderArrowGlyphs(bool val);
00031     void setUseRungeKutta(bool val);
00032 private:
00033     FlowData* dataset;
00034     int loadedData;
00035     static Renderer* m_instance;
00036     int m_currentChannel;
00037 
00038     int dSep;
00039     int newDSep;
00040     float dTest;
00041     float newDTest;
00042     bool newUseRungeKutta;
00043     bool useRungeKutta;
00044     float stepSize;
00045     float newStepSize;
00046 
00047     bool showArrows;
00048     bool showStreamlines;
00049     bool mustRenderStreamlines;
00050     bool renderArrowGlyphs;
00051 
00052     GLuint fbo_lines, line_tex;
00053 
00054     StreamGrid* streamgrid;
00055 
00056     // Shaders
00057     Shader* colorShader;
00058     Shader* colorLegend;
00059 
00061     GLuint width;
00063     GLuint height;
00064 
00065     void renderStreamlines(void);
00066 
00067     void checkGLFeatures();
00068 };
00069 
00070 #endif // RENDERER_H
 All Classes Functions Variables