mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-21 10:28:44 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user