Changeset 98f06d9 in opengl-game for new-game.cpp
- Timestamp:
- May 24, 2019, 8:01:34 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- a23fc08
- Parents:
- d9b6a1c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
new-game.cpp
rd9b6a1c r98f06d9 346 346 gl_log("starting GLFW\n%s", glfwGetVersionString()); 347 347 348 open_log(); 349 get_log() << "starting GLFW" << endl; 350 get_log() << glfwGetVersionString() << endl; 351 348 352 glfwSetErrorCallback(glfw_error_callback); 349 353 if (!glfwInit()) { 350 354 gl_log_err("ERROR: could not start GLFW3"); 355 cerr << "ERROR: could not start GLFW3" << endl; 356 get_log() << "ERROR: could not start GLFW3" << endl; 351 357 return 1; 352 358 } … … 380 386 if (!window) { 381 387 gl_log_err("ERROR: could not open window with GLFW3"); 388 cerr << "ERROR: could not open window with GLFW3" << endl; 389 get_log() << "ERROR: could not open window with GLFW3" << endl; 382 390 glfwTerminate(); 383 391 return 1; … … 449 457 gl_log("Renderer: %s", renderer); 450 458 gl_log("Supported OpenGL version: %s", version); 459 460 get_log() << "Renderer: " << renderer << endl; 461 get_log() << "Supported OpenGL version: " << version << endl; 451 462 452 463 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); … … 1011 1022 glfwTerminate(); 1012 1023 1024 close_log(); 1025 1013 1026 // free memory 1014 1027 … … 1034 1047 void glfw_error_callback(int error, const char* description) { 1035 1048 gl_log_err("GLFW ERROR: code %i msg: %s", error, description); 1049 cerr << "GLFW ERROR: code " << error << " msg: " << description << endl; 1050 get_log() << "GLFW ERROR: code " << error << " msg: " << description << endl; 1036 1051 } 1037 1052 … … 1275 1290 if (!image_data) { 1276 1291 gl_log_err("ERROR: could not load %s", file_name.c_str()); 1292 cerr << "ERROR: could not load " << file_name << endl; 1293 get_log() << "ERROR: could not load " << file_name << endl; 1277 1294 } 1278 1295 … … 1280 1297 if ((*x & (*x - 1)) != 0 || (*y & (*y - 1)) != 0) { 1281 1298 gl_log_err("WARNING: texture %s is not power-of-2 dimensions", file_name.c_str()); 1299 cerr << "WARNING: texture " << file_name << " is not power-of-2 dimensions" << endl; 1300 get_log() << "WARNING: texture " << file_name << " is not power-of-2 dimensions" << endl; 1282 1301 } 1283 1302
Note:
See TracChangeset
for help on using the changeset viewer.