diff --git a/engines/stark/gfx/driver.h b/engines/stark/gfx/driver.h index 4a4051b6a2c..43d850bc832 100644 --- a/engines/stark/gfx/driver.h +++ b/engines/stark/gfx/driver.h @@ -44,7 +44,6 @@ public: virtual void init() = 0; - virtual void setGameViewport() = 0; // deprecated virtual void setScreenViewport(bool noScaling) = 0; // deprecated virtual void setViewport(Common::Rect rect, bool noScaling) = 0; @@ -54,8 +53,6 @@ public: Common::Rect gameViewport() const; - virtual void setupCamera(const Math::Matrix4 &projection, const Math::Matrix4 &view) = 0; - virtual void clearScreen() = 0; virtual void flipBuffer() = 0; diff --git a/engines/stark/gfx/opengls.cpp b/engines/stark/gfx/opengls.cpp index 4a6cf473dea..e8bf4f7560d 100644 --- a/engines/stark/gfx/opengls.cpp +++ b/engines/stark/gfx/opengls.cpp @@ -69,14 +69,6 @@ void OpenGLSDriver::init() { _boxShader->enableVertexAttribute("texcoord", _boxVBO, 2, GL_FLOAT, GL_TRUE, 2 * sizeof(float), 0); } -void OpenGLSDriver::setGameViewport() { - _viewport = gameViewport(); - _unscaledViewport = Common::Rect(kGameViewportWidth, kGameViewportHeight); - _unscaledViewport.translate(0, kBottomBorderHeight); - - glViewport(_viewport.left, _viewport.top, _viewport.width(), _viewport.height()); -} - void OpenGLSDriver::setScreenViewport(bool noScaling) { if (noScaling) { _viewport = Common::Rect(g_system->getWidth(), g_system->getHeight()); @@ -114,9 +106,6 @@ Math::Vector2d OpenGLSDriver::scaled(float x, float y) const { return Math::Vector2d(x / (float) _unscaledViewport.width(), y / (float) _unscaledViewport.height()); } -void OpenGLSDriver::setupCamera(const Math::Matrix4 &projection, const Math::Matrix4 &view) { -} - void OpenGLSDriver::clearScreen() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } diff --git a/engines/stark/gfx/opengls.h b/engines/stark/gfx/opengls.h index 538926026ab..15f1e483d72 100644 --- a/engines/stark/gfx/opengls.h +++ b/engines/stark/gfx/opengls.h @@ -47,12 +47,9 @@ public: void init() override; - void setGameViewport() override; void setScreenViewport(bool noScaling) override; void setViewport(Common::Rect rect, bool noScaling) override; - void setupCamera(const Math::Matrix4 &projection, const Math::Matrix4 &view) override; - void clearScreen(); void flipBuffer(); diff --git a/engines/stark/scene.cpp b/engines/stark/scene.cpp index e16783e076a..ea8699f847b 100644 --- a/engines/stark/scene.cpp +++ b/engines/stark/scene.cpp @@ -115,22 +115,4 @@ void Scene::makeRayFromMouse(const Common::Point &mouse, Math::Vector3d &origin, direction.normalize(); } -void Scene::render() { - // setup cam - _gfx->setGameViewport(); - _gfx->setupCamera(_projectionMatrix, _viewMatrix); - - // Draw bg - - // Draw other things - - // Render all the scene elements - - // setup lights - - // draw actors - - // draw overlay -} - } // End of namespace Stark diff --git a/engines/stark/scene.h b/engines/stark/scene.h index 673ee684486..af3f933bc08 100644 --- a/engines/stark/scene.h +++ b/engines/stark/scene.h @@ -47,11 +47,6 @@ public: Scene(Gfx::Driver *gfx); ~Scene(); - /** - * Render the scene - */ - void render(); - void initCamera(const Math::Vector3d &position, const Math::Vector3d &lookAt, float fov, Common::Rect viewSize, float nearClipPlane, float farClipPlane); diff --git a/engines/stark/stark.cpp b/engines/stark/stark.cpp index fdc324a7853..dfd6eda31a2 100644 --- a/engines/stark/stark.cpp +++ b/engines/stark/stark.cpp @@ -228,7 +228,6 @@ void StarkEngine::updateDisplayScene() { // Render the current scene // Update the UI state before displaying the scene _ui->update(); - _scene->render(); } // Tell the UI to render, and update implicitly, if this leads to new mouse-over events. _ui->render(); diff --git a/engines/stark/ui/gamewindow.cpp b/engines/stark/ui/gamewindow.cpp index 9f1ffd8dcec..5fd3f0dc614 100644 --- a/engines/stark/ui/gamewindow.cpp +++ b/engines/stark/ui/gamewindow.cpp @@ -50,8 +50,11 @@ GameWindow::GameWindow(Gfx::Driver *gfx, Cursor *cursor, ActionMenu *actionMenu) void GameWindow::onRender() { Global *global = StarkServices::instance().global; + + // List the items to render _renderEntries = global->getCurrent()->getLocation()->listRenderEntries(); + // Render all the scene items Gfx::RenderEntryArray::iterator element = _renderEntries.begin(); while (element != _renderEntries.end()) { // Draw the current element