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

Method Terminate

GTE/Graphics/GL46/GL46Engine.cpp:128–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128void GL46Engine::Terminate()
129{
130 // The render state objects (and fonts) are destroyed first so that the
131 // render state objects are removed from the bridges before they are
132 // cleared later in the destructor.
133 DestroyDefaultFont();
134 DestroyDefaultGlobalState();
135
136 // Need to remove all the RawBuffer objects used to manage atomic
137 // counter buffers.
138 mAtomicCounterRawBuffers.clear();
139
140 GraphicsObject::UnsubscribeForDestruction(mGOListener);
141 mGOListener = nullptr;
142
143 DrawTarget::UnsubscribeForDestruction(mDTListener);
144 mDTListener = nullptr;
145
146 mGOMapMutex.lock();
147 if (mGOMap.size() > 0)
148 {
149 // Bridge map is nonempty on destruction.
150 // TODO: In GTL, handle differently. The condition should not occur.
151 mGOMap.clear();
152 }
153 mGOMapMutex.unlock();
154
155 mDTMapMutex.lock();
156 if (mDTMap.size() > 0)
157 {
158 // Draw target map nonempty on destruction.
159 // TODO: In GTL, handle differently. The condition should not occur.
160 mDTMap.clear();
161 }
162 mDTMapMutex.unlock();
163
164 if (mILMap->HasElements())
165 {
166 // Input layout map nonempty on destruction.
167 // TODO: In GTL, handle differently. The condition should not occur.
168 mILMap->UnbindAll();
169 }
170 mILMap = nullptr;
171}
172
173uint64_t GL46Engine::DrawPrimitive(VertexBuffer const* vbuffer, IndexBuffer const* ibuffer)
174{

Callers

nothing calls this directly

Calls 2

HasElementsMethod · 0.45
UnbindAllMethod · 0.45

Tested by

no test coverage detected