Ticket #14357: TeRendererOpenGL-init-warning-debug-diff.txt

File TeRendererOpenGL-init-warning-debug-diff.txt, 1.7 KB (added by dwatteau, 18 months ago)

@raziel-: The idea is to (locally) trigger a warning line after each call inside TeRendererOpenGL::init(), so that we can deduce which line is having a problem without a debugger; see this diff as a reference

Line 
1diff --git a/engines/tetraedge/te/te_renderer_opengl.cpp b/engines/tetraedge/te/te_renderer_opengl.cpp
2index 0f373b24120..7a06e6993e0 100644
3--- a/engines/tetraedge/te/te_renderer_opengl.cpp
4+++ b/engines/tetraedge/te/te_renderer_opengl.cpp
5@@ -106,25 +106,41 @@ void TeRendererOpenGL::enableZBuffer() {
6 }
7
8 void TeRendererOpenGL::init(uint width, uint height) {
9+ warning("init: hit warning 1");
10 initGraphics3d(width, height);
11+ warning("init: hit warning 2");
12 glDisable(GL_CULL_FACE);
13+ warning("init: hit warning 3");
14 TeLightOpenGL::disableAll();
15+ warning("init: hit warning 4");
16 glDisable(GL_COLOR_MATERIAL);
17+ warning("init: hit warning 5");
18 glEnable(GL_DEPTH_TEST);
19+ warning("init: hit warning 6");
20 glDepthMask(GL_TRUE);
21+ warning("init: hit warning 7");
22 glShadeModel(GL_SMOOTH);
23+ warning("init: hit warning 8");
24 glEnable(GL_BLEND);
25+ warning("init: hit warning 9");
26 // Note: original doesn't separate but blends are nicer that way.
27 glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
28+ warning("init: hit warning 10");
29 glDepthFunc(GL_LEQUAL);
30+ warning("init: hit warning 11");
31 // Original does this, probably not needed?
32 //glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_DONT_CARE);
33 glClearDepth(1.0);
34+ warning("init: hit warning 12");
35 glClearStencil(0);
36+ warning("init: hit warning 13");
37 _clearColor = TeColor(0, 0, 0, 255);
38+ warning("init: hit warning 14");
39 glClearColor(0, 0, 0, 1.0);
40+ warning("init: hit warning 15");
41 //TeOpenGLExtensions::loadExtensions(); // this does nothing in the game?
42 _currentColor = TeColor(255, 255, 255, 255);
43+ warning("init: hit warning 16");
44 _scissorEnabled = false;
45 _scissorX = _scissorY = _scissorWidth = _scissorHeight = 0;
46 }