Changeset d8cb15e in opengl-game for game-gui-glfw.cpp


Ignore:
Timestamp:
Aug 30, 2019, 7:30:53 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
5529ab5
Parents:
d5f2b42
Message:

Implement GetError() in game-gui-glfw and start using game-gui-glfw in opengl-game to show a window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game-gui-glfw.cpp

    rd5f2b42 rd8cb15e  
    11#include "game-gui-glfw.hpp"
    22
     3string GameGui_GLFW::s_errorMessage;
     4
     5void glfw_error_callback(int error, const char* description) {
     6   GameGui_GLFW::s_errorMessage = description;
     7}
     8
     9string& GameGui_GLFW::GetError() {
     10   return GameGui_GLFW::s_errorMessage;
     11}
     12
    313bool GameGui_GLFW::Init() {
    4    return glfwInit() == GLFW_TRUE ? RTWO_SUCCESS : RTWO_SUCCESS;
     14   GameGui_GLFW::s_errorMessage = "No error";
     15   glfwSetErrorCallback(glfw_error_callback);
     16
     17   return glfwInit() == GLFW_TRUE ? RTWO_SUCCESS : RTWO_ERROR;
    518}
    619
Note: See TracChangeset for help on using the changeset viewer.