Changeset bae0911 in opengl-game for new-game.cpp
- Timestamp:
- May 10, 2019, 9:09:49 PM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- caa2359
- Parents:
- 155a7cf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
new-game.cpp
r155a7cf rbae0911 301 301 cout << "New OpenGL Game" << endl; 302 302 303 if (!restart_gl_log()) {}304 gl_log("starting GLFW\n%s \n", glfwGetVersionString());303 restart_gl_log(); 304 gl_log("starting GLFW\n%s", glfwGetVersionString()); 305 305 306 306 glfwSetErrorCallback(glfw_error_callback); 307 307 if (!glfwInit()) { 308 cerr << "ERROR: could not start GLFW3" << endl;308 gl_log_err("ERROR: could not start GLFW3"); 309 309 return 1; 310 310 } … … 337 337 338 338 if (!window) { 339 cerr << "ERROR: could not open window with GLFW3" << endl;;339 gl_log_err("ERROR: could not open window with GLFW3"); 340 340 glfwTerminate(); 341 341 return 1; … … 403 403 const GLubyte* version = glGetString(GL_VERSION); 404 404 cout << "Renderer: " << renderer << endl; 405 cout << "OpenGL version supported " << version << endl; 405 cout << "Supported OpenGL version: " << version << endl; 406 407 gl_log("Renderer: %s", renderer); 408 gl_log("Supported OpenGL version: %s", version); 406 409 407 410 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); … … 976 979 977 980 void glfw_error_callback(int error, const char* description) { 978 gl_log_err("GLFW ERROR: code %i msg: %s \n", error, description);981 gl_log_err("GLFW ERROR: code %i msg: %s", error, description); 979 982 } 980 983 … … 1217 1220 1218 1221 if (!image_data) { 1219 cerr << "ERROR: could not load " << file_name << endl;1222 gl_log_err("ERROR: could not load %s", file_name.c_str()); 1220 1223 } 1221 1224 1222 1225 // Not Power-of-2 check 1223 1226 if ((*x & (*x - 1)) != 0 || (*y & (*y - 1)) != 0) { 1224 cerr << "WARNING: texture " << file_name << " is not power-of-2 dimensions" << endl;1227 gl_log_err("WARNING: texture %s is not power-of-2 dimensions", file_name.c_str()); 1225 1228 } 1226 1229
Note:
See TracChangeset
for help on using the changeset viewer.