Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-11-25 00:26:08 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-11-25 00:29:28 +0300
commit8d4aa6bf44106bbc1605151c05ae6d5bb5c30e29 (patch)
treeb140f8a7b0b6c53a53215312e213421ce3be15d7 /source
parentf5910608566861e136489f3643eb604d0c169558 (diff)
GPUFramebuffer: Bump the framebuffer attachement limit to 5 color textures
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index 5aa7e5e8008..6830e73cb03 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -45,8 +45,8 @@ static struct GPUFrameBufferGlobal {
} GG = {0};
/* Number of maximum output slots.
- * We support 4 outputs for now (usually we wouldn't need more to preserve fill rate) */
-#define GPU_FB_MAX_SLOTS 4
+ * We support 5 outputs for now (usually we wouldn't need more to preserve fill rate) */
+#define GPU_FB_MAX_SLOTS 5
struct GPUFrameBuffer {
GLuint object;
@@ -286,14 +286,14 @@ void GPU_texture_bind_as_framebuffer(GPUTexture *tex)
void GPU_framebuffer_slots_bind(GPUFrameBuffer *fb, int slot)
{
int numslots = 0, i;
- GLenum attachments[4];
+ GLenum attachments[GPU_FB_MAX_SLOTS];
if (!fb->colortex[slot]) {
fprintf(stderr, "Error, framebuffer slot empty!\n");
return;
}
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < GPU_FB_MAX_SLOTS; i++) {
if (fb->colortex[i]) {
attachments[numslots] = GL_COLOR_ATTACHMENT0 + i;
numslots++;
@@ -319,11 +319,11 @@ void GPU_framebuffer_slots_bind(GPUFrameBuffer *fb, int slot)
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
{
int numslots = 0, i;
- GLenum attachments[4];
+ GLenum attachments[GPU_FB_MAX_SLOTS];
GLenum readattachement = 0;
GPUTexture *tex;
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < GPU_FB_MAX_SLOTS; i++) {
if (fb->colortex[i]) {
attachments[numslots] = GL_COLOR_ATTACHMENT0 + i;
tex = fb->colortex[i];