mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -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:
@@ -31,6 +31,7 @@
|
||||
#include <openspace/util/updatestructures.h>
|
||||
|
||||
#include <ghoul/opengl/ghoul_gl.h>
|
||||
#include <ghoul/opengl/uniformcache.h>
|
||||
#include <ghoul/glm.h>
|
||||
|
||||
#include <map>
|
||||
@@ -112,6 +113,7 @@ private:
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _hdrBackGroundProgram;
|
||||
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _resolveProgram;
|
||||
UniformCache(mainColorTexture, blackoutFactor, nAaSamples) _uniformCache;
|
||||
|
||||
GLuint _screenQuad;
|
||||
GLuint _vertexPositionBuffer;
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <ghoul/glm.h>
|
||||
#include <ghoul/misc/boolean.h>
|
||||
#include <ghoul/opengl/ghoul_gl.h>
|
||||
#include <ghoul/opengl/uniformcache.h>
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
@@ -95,6 +96,8 @@ private:
|
||||
int _nItems;
|
||||
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _program;
|
||||
UniformCache(logoTexture, useTexture, color) _uniformCache;
|
||||
|
||||
std::unique_ptr<ghoul::opengl::Texture> _logoTexture;
|
||||
|
||||
std::shared_ptr<ghoul::fontrendering::Font> _loadingFont;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <ghoul/opengl/programobject.h>
|
||||
#include <ghoul/opengl/texture.h>
|
||||
#include <ghoul/opengl/textureunit.h>
|
||||
#include <ghoul/opengl/uniformcache.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -112,6 +113,7 @@ protected:
|
||||
GLuint _quad;
|
||||
GLuint _vertexPositionBuffer;
|
||||
std::unique_ptr<ghoul::opengl::Texture> _texture;
|
||||
UniformCache(occlusionDepth, alpha, modelTransform, viewProj, texture) _uniformCache;
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _shader;
|
||||
|
||||
bool _useEuclideanCoordinates;
|
||||
|
||||
Reference in New Issue
Block a user