MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / Enable

Method Enable

GTE/Graphics/GL46/GL46RasterizerState.cpp:35–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void GL46RasterizerState::Enable()
36{
37 glPolygonMode(GL_FRONT_AND_BACK, mFillMode);
38
39 if (mCullFace != 0)
40 {
41 glEnable(GL_CULL_FACE);
42 glFrontFace(mFrontFace);
43 glCullFace(mCullFace);
44 }
45 else
46 {
47 glDisable(GL_CULL_FACE);
48 }
49
50 if (mDepthScale != 0.0f && mDepthBias != 0.0f)
51 {
52 glEnable(GL_POLYGON_OFFSET_FILL);
53 glEnable(GL_POLYGON_OFFSET_LINE);
54 glEnable(GL_POLYGON_OFFSET_POINT);
55 glPolygonOffset(mDepthScale, mDepthBias);
56 }
57 else
58 {
59 glDisable(GL_POLYGON_OFFSET_FILL);
60 glDisable(GL_POLYGON_OFFSET_LINE);
61 glDisable(GL_POLYGON_OFFSET_POINT);
62 }
63}
64
65
66GLenum const GL46RasterizerState::msFillMode[] =

Callers

nothing calls this directly

Calls 6

glPolygonModeFunction · 0.85
glEnableFunction · 0.85
glFrontFaceFunction · 0.85
glCullFaceFunction · 0.85
glDisableFunction · 0.85
glPolygonOffsetFunction · 0.85

Tested by

no test coverage detected