Browse Source

remove window global

master
Odilitime 5 years ago
parent
commit
45094be882
  1. 4
      src/graphics/components/MultiComponent.cpp
  2. 7
      src/graphics/components/MultiComponent.h

4
src/graphics/components/MultiComponent.cpp

@ -217,13 +217,13 @@ void MultiComponent::resize(const int passedWindowWidth, const int passedWindowH @@ -217,13 +217,13 @@ void MultiComponent::resize(const int passedWindowWidth, const int passedWindowH
void MultiComponent::render() {
//std::cout << "MultiComponent::render" << std::endl;
Shader *fontShader = window->shaderLoader.getShader(VertexShader("FontShader.vert"),
Shader *fontShader = this->win->shaderLoader.getShader(VertexShader("FontShader.vert"),
FragmentShader("FontShader.frag"));
fontShader->bind();
renderDocumentComponents(rootComponent);
fontShader->release();
Shader *textureShader = window->shaderLoader.getShader(VertexShader("TextureShader.vert"),
Shader *textureShader = this->win->shaderLoader.getShader(VertexShader("TextureShader.vert"),
FragmentShader("TextureShader.frag"));
textureShader->bind();
renderBoxComponents(rootComponent);

7
src/graphics/components/MultiComponent.h

@ -32,10 +32,7 @@ public: @@ -32,10 +32,7 @@ public:
// layers will replace rootComponent
std::vector<std::shared_ptr<Component>> layers; // each layer's root component
std::shared_ptr<Component> rootComponent = std::make_shared<Component>();
// handle to signal that a redraw is needed, and access to shader programs
Window *win;
// tabbed coordinate system?
bool tabbed = false;
@ -50,6 +47,4 @@ public: @@ -50,6 +47,4 @@ public:
double cursorY = 0;
};
//extern const std::unique_ptr<Window> window;
#endif

Loading…
Cancel
Save