MCPcopy Create free account
hub / github.com/OGRECave/ogre / bindGLBuffer

Method bindGLBuffer

RenderSystems/GL/src/OgreGLStateCacheManager.cpp:150–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148 }
149
150 void GLStateCacheManager::bindGLBuffer(GLenum target, GLuint buffer)
151 {
152#ifdef OGRE_ENABLE_STATE_CACHE
153 auto ret = mActiveBufferMap.emplace(target, buffer);
154 if(ret.first->second != buffer) // Update the cached value if needed
155 {
156 ret.first->second = buffer;
157 ret.second = true;
158 }
159
160 // Update GL
161 if(ret.second)
162#endif
163 {
164 if(target == GL_FRAMEBUFFER)
165 {
166 OgreAssert(false, "not implemented");
167 }
168 else if(target == GL_RENDERBUFFER)
169 {
170 glBindRenderbufferEXT(target, buffer);
171 }
172 else
173 {
174 glBindBuffer(target, buffer);
175 }
176 }
177
178 }
179
180 void GLStateCacheManager::deleteGLBuffer(GLenum target, GLuint buffer)
181 {

Callers 8

_renderMethod · 0.45
lockImplMethod · 0.45
unlockImplMethod · 0.45
readDataMethod · 0.45
writeDataMethod · 0.45
_updateFromShadowMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected