MCPcopy Create free account
hub / github.com/assaultcube/AC / gl_init

Function gl_init

source/src/rendergl.cpp:128–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128void gl_init(int w, int h, int depth, int fsaa)
129{
130 //#define fogvalues 0.5f, 0.6f, 0.7f, 1.0f
131
132 glViewport(0, 0, w, h);
133 glClearDepth(1.0);
134 glDepthFunc(GL_LESS);
135 glEnable(GL_DEPTH_TEST);
136 glShadeModel(GL_SMOOTH);
137
138
139 glEnable(GL_FOG);
140 glFogi(GL_FOG_MODE, GL_LINEAR);
141 glFogf(GL_FOG_DENSITY, 0.25);
142 glHint(GL_FOG_HINT, GL_NICEST);
143
144
145 glEnable(GL_LINE_SMOOTH);
146 glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
147
148 glCullFace(GL_FRONT);
149 glEnable(GL_CULL_FACE);
150
151 inittmus();
152
153 resetcamera();
154}
155
156FVAR(polygonoffsetfactor, -1e4f, -3.0f, 1e4f);
157FVAR(polygonoffsetunits, -1e4f, -3.0f, 1e4f);

Callers 2

resetglFunction · 0.85
main.cppFile · 0.85

Calls 2

inittmusFunction · 0.85
resetcameraFunction · 0.85

Tested by

no test coverage detected