mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-28 23:09:32 -05:00
Use rendering helper in Luaconsole and Loading screen (working on #525)
This commit is contained in:
@@ -27,7 +27,10 @@
|
||||
|
||||
#include <ghoul/opengl/uniformcache.h>
|
||||
|
||||
namespace ghoul::opengl { class ProgramObject; }
|
||||
namespace ghoul::opengl {
|
||||
class ProgramObject;
|
||||
class Texture;
|
||||
} // namespace ghoul::opengl
|
||||
|
||||
namespace openspace::rendering::helper {
|
||||
|
||||
@@ -52,6 +55,9 @@ void renderBox(ghoul::opengl::ProgramObject& program, GLint orthoLocation,
|
||||
void renderBox(const glm::vec2& position, const glm::vec2& size, const glm::vec4& color,
|
||||
Anchor anchor = Anchor::NW);
|
||||
|
||||
void renderBox(const glm::vec2& position, const glm::vec2& size, const glm::vec4& color,
|
||||
const ghoul::opengl::Texture& texture, Anchor anchor = Anchor::NW);
|
||||
|
||||
struct Shaders {
|
||||
struct {
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> program;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <ghoul/misc/boolean.h>
|
||||
#include <ghoul/opengl/ghoul_gl.h>
|
||||
#include <ghoul/opengl/uniformcache.h>
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <random>
|
||||
@@ -97,11 +98,8 @@ private:
|
||||
bool _showProgressbar;
|
||||
|
||||
Phase _phase;
|
||||
int _iProgress = 0;
|
||||
int _nItems = 0;
|
||||
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _program;
|
||||
UniformCache(logoTexture, useTexture, color) _uniformCache;
|
||||
std::atomic_int _iProgress = 0;
|
||||
std::atomic_int _nItems = 0;
|
||||
|
||||
std::unique_ptr<ghoul::opengl::Texture> _logoTexture;
|
||||
|
||||
@@ -109,19 +107,6 @@ private:
|
||||
std::shared_ptr<ghoul::fontrendering::Font> _messageFont;
|
||||
std::shared_ptr<ghoul::fontrendering::Font> _itemFont;
|
||||
|
||||
struct {
|
||||
GLuint vao = 0;
|
||||
GLuint vbo = 0;
|
||||
} _logo;
|
||||
|
||||
struct {
|
||||
GLuint vaoFill = 0;
|
||||
GLuint vboFill = 0;
|
||||
|
||||
GLuint vaoBox = 0;
|
||||
GLuint vboBox = 0;
|
||||
} _progressbar;
|
||||
|
||||
bool _hasCatastrophicErrorOccurred = false;
|
||||
std::string _message;
|
||||
std::mutex _messageMutex;
|
||||
|
||||
@@ -67,8 +67,6 @@ private:
|
||||
properties::BoolProperty _remoteScripting;
|
||||
|
||||
properties::Vec4Property _backgroundColor;
|
||||
properties::Vec4Property _highlightColor;
|
||||
properties::Vec4Property _separatorColor;
|
||||
properties::Vec4Property _entryTextColor;
|
||||
properties::Vec4Property _historyTextColor;
|
||||
properties::IntProperty _historyLength;
|
||||
@@ -90,12 +88,6 @@ private:
|
||||
|
||||
std::shared_ptr<ghoul::fontrendering::Font> _font;
|
||||
std::shared_ptr<ghoul::fontrendering::Font> _historyFont;
|
||||
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _program;
|
||||
GLuint _vao = 0;
|
||||
GLuint _vbo = 0;
|
||||
|
||||
UniformCache(res, color, height, ortho) _uniformCache;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user