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 | return _primaryNormalTextureID; | 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 | QOpenGLFramebufferObject* TextureCache::getSecondaryFramebufferObject() { | 257 | QOpenGLFramebufferObject* TextureCache::getSecondaryFramebufferObject() { |
| 246 | if (!_secondaryFramebufferObject) { | 258 | if (!_secondaryFramebufferObject) { |
| 247 | _secondaryFramebufferObject = createFramebufferObject(); | 259 | _secondaryFramebufferObject = createFramebufferObject(); |