View Single Post
Old 03-15-07, 11:49 AM   #1
Registered User
Join Date: Mar 2007
Posts: 1
Default Problem with a large number of FBO+texture under Linux


I tried the following Opengl code under Ubuntu x86 (dual Xeon+7800GTS) and Ubuntu x86-64 (Core 2 Duo E6600+GeForce 7800GTX and AMD x2 4600+GeForce8800GTX)

#include <iostream>
#include "glee.h"
#include <GL/glut.h>

using namespace std;

int main ( int argc, char** argv )
  glutInit(&argc, argv);
  glutCreateWindow( "FBO" );

  for (int i=0;i<atoi(argv[1]);i++)
      GLuint framebuffer, texture;
      GLenum status;
      glGenFramebuffersEXT(1, &framebuffer);
      cout << "Framebuffer id : " << framebuffer << endl;
      glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer);
      cout << "   FBO Binding done" << endl;
      glGenTextures(1, &texture);
      cout << "   Texture id : " << texture << endl;
      glBindTexture(GL_TEXTURE_2D, texture);

      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, 100, 100, 0, 
				GL_TEXTURE_2D, texture, 0);      
      cout << "   Texture attachment done" << endl;

  glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);

  return 0;
And I can not initialize more than 155 frame buffer objects + textures under Linux with the latest nVidia driver. After that, I got this error:

Framebuffer id : 155
FBO Binding done
Texture id : 155
Texture attachment done
Framebuffer id : 156
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 143 (GLX)
Minor opcode of failed request: 27 ()
Serial number of failed request: 969
Current serial number in output stream: 970

The same code works without problem with
Ubuntu x86 - ATI graphics card (9600 mobility)
Windows XP 64bits GeForce 7800GTX
Windows XP GeForce 8800GTX
Windows Vista x86 ATI X1900GT
Windows Vista x86 GeForce 8800GTX
(I am using for each system the latest driver)

I am working on an application which needs to initialize a lot of FBO+texture. And this application can not works under Linux when I am using a nVidia graphics card.

Am I doing something wrong ?
Wog is offline   Reply With Quote