mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Make use of the new uniform cache method that uses the variable names as uniform names (#3217)
This commit is contained in:
@@ -40,11 +40,6 @@
|
||||
#include <optional>
|
||||
|
||||
namespace {
|
||||
constexpr std::array<const char*, 6> UniformNames = {
|
||||
"opacity", "modelViewProjection", "modelViewTransform", "modelViewRotation",
|
||||
"colorTexture", "mirrorTexture"
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo SizeInfo = {
|
||||
"Size",
|
||||
"Size (in meters)",
|
||||
@@ -215,7 +210,7 @@ void RenderableSphere::initializeGL() {
|
||||
}
|
||||
);
|
||||
|
||||
ghoul::opengl::updateUniformLocations(*_shader, _uniformCache, UniformNames);
|
||||
ghoul::opengl::updateUniformLocations(*_shader, _uniformCache);
|
||||
}
|
||||
|
||||
void RenderableSphere::deinitializeGL() {
|
||||
@@ -363,7 +358,7 @@ void RenderableSphere::render(const RenderData& data, RendererTasks&) {
|
||||
void RenderableSphere::update(const UpdateData&) {
|
||||
if (_shader->isDirty()) {
|
||||
_shader->rebuildFromFile();
|
||||
ghoul::opengl::updateUniformLocations(*_shader, _uniformCache, UniformNames);
|
||||
ghoul::opengl::updateUniformLocations(*_shader, _uniformCache);
|
||||
}
|
||||
|
||||
if (_sphereIsDirty) {
|
||||
|
||||
Reference in New Issue
Block a user