Skip to content

Commit

Permalink
Shanged signed to unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
LessComplexity committed Mar 8, 2020
1 parent 041dd34 commit 0b966f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions glshift/GLManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ GLShift::GLManager::GLManager() {
}
}

GLShift::GLManager::GLManager(int major, int minor) {
GLShift::GLManager::GLManager(unsigned int major, unsigned int minor) {
if(!glfwInit()) {
std::cerr << "Couldn't initialize glfw context" << std::endl;
delete this;
}
this->setVersion(major, minor);
}

void GLShift::GLManager::setVersion(int major, int minor) {
void GLShift::GLManager::setVersion(unsigned int major, unsigned int minor) {
this->major = major; this->minor = minor;
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, major);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, minor);
}

void GLShift::GLManager::openWindow(int width, int height, const char* title,bool isFullScreen) {
void GLShift::GLManager::openWindow(unsigned int width, unsigned int height, const char* title,bool isFullScreen) {
this->window = glfwCreateWindow(width, height, title, isFullScreen ? glfwGetPrimaryMonitor() : NULL, NULL);
glfwMakeContextCurrent(this->window);
if(GLenum err = glewInit(); err != GLEW_OK) {
Expand Down
8 changes: 4 additions & 4 deletions glshift/GLManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class GLShift::GLManager {
* @param major
* @param minor
*/
GLManager(signed int major, signed int minor);
GLManager(unsigned int major, unsigned int minor);
/**
* Terminated the GLFW environment
*/
Expand All @@ -30,7 +30,7 @@ class GLShift::GLManager {
* @param major
* @param minor
*/
void setVersion(signed int major, signed int minor);
void setVersion(unsigned int major, unsigned int minor);
/**
* Sets the renderer object to use for rendering on the window
* @param renderer
Expand All @@ -43,12 +43,12 @@ class GLShift::GLManager {
* @param title
* @param isFullScreen Set true to make full screen app
*/
void openWindow(signed int width, signed int height, const char* title, bool isFullScreen = false);
void openWindow(unsigned int width, unsigned int height, const char* title, bool isFullScreen = false);
void run();
private:
GLFWwindow *window;
GLRenderer *renderer;
signed int major, minor;
unsigned int major, minor;
};


Expand Down

0 comments on commit 0b966f1

Please sign in to comment.