Skip to content

Commit

Permalink
GRAPHICS: Remove unused methods from GraphicsManager
Browse files Browse the repository at this point in the history
  • Loading branch information
farmboy0 committed Aug 19, 2016
1 parent a1951ff commit 574e02a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 124 deletions.
86 changes: 0 additions & 86 deletions src/graphics/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ size_t GraphicsManager::getMultipleTextureCount() const {
return _multipleTextureCount;
}

int GraphicsManager::getMaxFSAA() const {
return WindowMan.getMaxFSAA();
}

int GraphicsManager::getCurrentFSAA() const {
return _fsaa;
}
Expand Down Expand Up @@ -361,18 +357,6 @@ void GraphicsManager::checkGLExtensions() {
}
}

void GraphicsManager::setWindowTitle(const Common::UString &title) {
WindowMan.setWindowTitle(title);
}

float GraphicsManager::getGamma() const {
return WindowMan.getGamma();
}

void GraphicsManager::setGamma(float gamma) {
WindowMan.setGamma(gamma);
}

void GraphicsManager::setupScene() {
glClearColor(0, 0, 0, 0);
glMatrixMode(GL_PROJECTION);
Expand Down Expand Up @@ -764,10 +748,6 @@ void GraphicsManager::setCursor(Cursor *cursor) {
unlockFrame();
}

void GraphicsManager::setCursorPosition(int x, int y) {
WindowMan.setCursorPosition(x, y);
}

void GraphicsManager::takeScreenshot() {
lockFrame();

Expand Down Expand Up @@ -1133,26 +1113,6 @@ const Common::TransformationMatrix &GraphicsManager::getModelviewInverseMatrix()
return _modelviewInv;
}

int GraphicsManager::getScreenWidth() const {
return WindowMan.getWindowWidth();
}

int GraphicsManager::getScreenHeight() const {
return WindowMan.getWindowHeight();
}

int GraphicsManager::getSystemWidth() const {
return WindowMan.getSystemWidth();
}

int GraphicsManager::getSystemHeight() const {
return WindowMan.getSystemHeight();
}

bool GraphicsManager::isFullScreen() const {
return WindowMan.isFullScreen();
}

bool GraphicsManager::isGL3() const {
return _renderType == WindowManager::kOpenGL32Compat;
}
Expand Down Expand Up @@ -1217,52 +1177,6 @@ void GraphicsManager::cleanupAbandoned() {
_hasAbandoned = false;
}

void GraphicsManager::toggleFullScreen() {
WindowMan.toggleFullScreen();
}

void GraphicsManager::setFullScreen(bool fullScreen) {
if (WindowMan.isFullScreen() == fullScreen)
// Nothing to do
return;

// Force calling it from the main thread
if (!Common::isMainThread()) {
Events::MainThreadFunctor<void> functor(boost::bind(&GraphicsManager::setFullScreen, this, fullScreen));

return RequestMan.callInMainThread(functor);
}

destroyContext();

WindowMan.setFullScreen(fullScreen);

rebuildContext();
}

void GraphicsManager::toggleMouseGrab() {
WindowMan.toggleMouseGrab();
}

void GraphicsManager::setScreenSize(int width, int height) {
// Force calling it from the main thread
if (!Common::isMainThread()) {
Events::MainThreadFunctor<void> functor(boost::bind(&GraphicsManager::setScreenSize, this, width, height));

return RequestMan.callInMainThread(functor);
}

destroyContext();

WindowMan.setWindowSize(width, height);

rebuildContext();
}

void GraphicsManager::showCursor(bool show) {
WindowMan.showCursor(show);
}

void GraphicsManager::notifyResized(int UNUSED(oldWidth), int UNUSED(oldHeight),
int UNUSED(newWidth), int UNUSED(newHeight)) {

Expand Down
38 changes: 0 additions & 38 deletions src/graphics/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,52 +69,18 @@ class GraphicsManager : public Common::Singleton<GraphicsManager>, public Events
/** Return the number of texture units for multiple textures. */
size_t getMultipleTextureCount() const;

/** Set the screen size. */
void setScreenSize(int width, int height);
/** Set full screen/windowed mode. */
void setFullScreen(bool fullScreen);
/** Toggle between full screen and windowed mode. */
void toggleFullScreen();

/** Return the current screen width. */
int getScreenWidth() const;
/** Return the current screen height. */
int getScreenHeight() const;

/** Return the system's screen width. */
int getSystemWidth() const;
/** Return the system's screen height. */
int getSystemHeight() const;

/** Are we currently in full screen mode? */
bool isFullScreen() const;

/** Are we currently running an OpenGL 3.x context? */
bool isGL3() const;

/** Set the FSAA settings. */
bool setFSAA(int level);

/** Return the max supported FSAA level. */
int getMaxFSAA() const;

/** Return the current FSAA level. */
int getCurrentFSAA() const;

/** Toggle mouse grab */
void toggleMouseGrab();

/** How many frames per second to we render at the moments? */
uint32 getFPS() const;

/** Set the window's title. */
void setWindowTitle(const Common::UString &title = "");

/** Get the overall gamma correction. */
float getGamma() const;
/** Set the overall gamma correction. */
void setGamma(float gamma);

/** Enable/Disable face culling. */
void setCullFace(bool enabled, GLenum mode = GL_BACK);

Expand All @@ -123,12 +89,8 @@ class GraphicsManager : public Common::Singleton<GraphicsManager>, public Events
/** Change the projection matrix to be orthogonal. */
void setOrthogonal(float clipNear, float clipFar);

/** Show/Hide the cursor. */
void showCursor(bool show);
/** Set the current cursor. */
void setCursor(Cursor *cursor = 0);
/** Set position to the cursor. */
void setCursorPosition(int x, int y);

/** Take a screenshot. */
void takeScreenshot();
Expand Down

0 comments on commit 574e02a

Please sign in to comment.