Make use of UniformCache in many Renderables and switch from setUniform(const std::string&, ...) to setUniform(GLint, ...) in those cases

This commit is contained in:
Alexander Bock
2017-12-31 17:31:10 -05:00
parent 8ea5837f00
commit 47233b8e6f
41 changed files with 1329 additions and 855 deletions
+18 -16
View File
@@ -37,6 +37,7 @@
#include <openspace/properties/vector/vec3property.h>
#include <ghoul/glm.h>
#include <ghoul/opengl/uniformcache.h>
#include <memory>
#include <vector>
@@ -46,28 +47,29 @@ namespace ghoul::opengl { class ProgramObject; }
namespace openspace {
class TouchMarker : public properties::PropertyOwner {
public:
TouchMarker();
public:
TouchMarker();
bool initialize();
bool deinitialize();
void initialize();
void deinitialize();
void render(const std::vector<TUIO::TuioCursor>& list);
void render(const std::vector<TUIO::TuioCursor>& list);
private:
void createVertexList(const std::vector<TUIO::TuioCursor>& list);
private:
void createVertexList(const std::vector<TUIO::TuioCursor>& list);
properties::BoolProperty _visible;
properties::FloatProperty _radiusSize;
properties::FloatProperty _transparency;
properties::FloatProperty _thickness;
properties::Vec3Property _color;
properties::BoolProperty _visible;
properties::FloatProperty _radiusSize;
properties::FloatProperty _transparency;
properties::FloatProperty _thickness;
properties::Vec3Property _color;
std::unique_ptr<ghoul::opengl::ProgramObject> _shader;
std::unique_ptr<ghoul::opengl::ProgramObject> _shader;
UniformCache(radius, transparency, thickness, color) _uniformCache;
GLuint _quad = 0;
GLuint _vertexPositionBuffer = 0;
int _numFingers = 0;
GLuint _quad = 0;
GLuint _vertexPositionBuffer = 0;
int _numFingers = 0;
};
} // openspace namespace