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

Method bindGLBuffer

RenderSystems/GLES2/src/OgreGLES2StateCacheManager.cpp:105–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103 }
104
105 void GLES2StateCacheManager::bindGLBuffer(GLenum target, GLuint buffer)
106 {
107#ifdef OGRE_ENABLE_STATE_CACHE
108 auto ret = mActiveBufferMap.emplace(target, buffer);
109 if(ret.first->second != buffer) // Update the cached value if needed
110 {
111 ret.first->second = buffer;
112 ret.second = true;
113 }
114
115 // Update GL
116 if(ret.second)
117#endif
118 {
119 if(target == GL_FRAMEBUFFER)
120 {
121 OgreAssert(false, "not implemented");
122 }
123 else if(target == GL_RENDERBUFFER)
124 {
125 OGRE_CHECK_GL_ERROR(glBindRenderbuffer(target, buffer));
126 }
127 else
128 {
129 OGRE_CHECK_GL_ERROR(glBindBuffer(target, buffer));
130 }
131 }
132 }
133
134 void GLES2StateCacheManager::deleteGLBuffer(GLenum target, GLuint buffer)
135 {

Callers 7

createBufferMethod · 0.45
lockImplMethod · 0.45
unlockImplMethod · 0.45
readDataMethod · 0.45
writeDataImplMethod · 0.45
_renderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected