MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / GFXDevice

Method GFXDevice

Engine/source/gfx/gfxDevice.cpp:92–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92GFXDevice::GFXDevice()
93{
94 VECTOR_SET_ASSOCIATION( mVideoModes );
95 VECTOR_SET_ASSOCIATION( mRTStack );
96
97 mWorldStackSize = 0;
98
99 mViewMatrix.identity();
100 mProjectionMatrix.identity();
101
102 for( S32 i = 0; i < GFX_WORLD_STACK_MAX; i++ )
103 mWorldMatrix[i].identity();
104
105 AssertFatal(smGFXDevice == NULL, "Already a GFXDevice created! Bad!");
106 smGFXDevice = this;
107
108 // Vertex buffer cache
109 mCurrVertexDecl = NULL;
110 mVertexDeclDirty = false;
111 for ( U32 i=0; i < VERTEX_STREAM_COUNT; i++ )
112 {
113 mVertexBufferDirty[i] = false;
114 mVertexBufferFrequency[i] = 0;
115 mVertexBufferFrequencyDirty[i] = false;
116 }
117
118 // Primitive buffer cache
119 mPrimitiveBufferDirty = false;
120 mTexturesDirty = false;
121
122 // Use of GFX_TEXTURE_STAGE_COUNT in initialization is okay [7/2/2007 Pat]
123 for(U32 i = 0; i < GFX_TEXTURE_STAGE_COUNT; i++)
124 {
125 mTextureDirty[i] = false;
126 mCurrentTexture[i] = NULL;
127 mNewTexture[i] = NULL;
128 mCurrentCubemap[i] = NULL;
129 mNewCubemap[i] = NULL;
130 mCurrentCubemapArray[i] = NULL;
131 mNewTextureArray[i] = NULL;
132 mCurrentTextureArray[i] = NULL;
133 mNewCubemapArray[i] = NULL;
134 mTexType[i] = GFXTDT_Normal;
135 }
136
137 // State block
138 mStateBlockDirty = false;
139 mCurrentStateBlock = NULL;
140 mNewStateBlock = NULL;
141
142 mCurrentShaderConstBuffer = NULL;
143
144 // misc
145 mAllowRender = true;
146 mCurrentRenderStyle = RS_Standard;
147 mCurrentStereoTarget = -1;
148 mStereoHeadTransform = MatrixF(1);
149 mCanCurrentlyRender = false;

Callers

nothing calls this directly

Calls 3

getVersionNumberFunction · 0.85
MatrixFClass · 0.70
identityMethod · 0.45

Tested by

no test coverage detected