Showing the changes to interface/src/renderer/TextureCache.cpp (1 of 16 files). Show all
Unified · Split
| @@ -242,6 +242,18 @@ GLuint TextureCache::getPrimaryNormalTextureID() { · 241 unmodified lines | ||
| 242 | 242 | return _primaryNormalTextureID; |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | +void TextureCache::setPrimaryDrawBuffers(bool color, bool normal) { | |
| 246 | + GLenum buffers[2]; | |
| 247 | + int bufferCount = 0; | |
| 248 | + if (color) { | |
| 249 | + buffers[bufferCount++] = GL_COLOR_ATTACHMENT0; | |
| 250 | + } | |
| 251 | + if (normal) { | |
| 252 | + buffers[bufferCount++] = GL_COLOR_ATTACHMENT1; | |
| 253 | + } | |
| 254 | + glDrawBuffers(bufferCount, buffers); | |
| 255 | +} | |
| 256 | + | |
| 245 | 257 | QOpenGLFramebufferObject* TextureCache::getSecondaryFramebufferObject() { |
| 246 | 258 | if (!_secondaryFramebufferObject) { |
| 247 | 259 | _secondaryFramebufferObject = createFramebufferObject(); |