kushaura
03-02-2008, 03:09 PM
I am working on developing a particle system modeler using OpenGL and texture-bound point sprites. It works fine, up to the point that I really crank up the number of points generated, and I hit a limit on the number of texture objects I can render (I guess?). Stranger still is that I'm only using a single texture (I only call glBindTexture once), so I assumed I should be able to render a great deal of points that share a single texture. Does anyone know how to increase this limit? Or if I'm making a common noob mistake. Here is a code example:
glEnable(GL_TEXTURE_2D);
glEnable(GL_POINT_SPRITE);
glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
glPointSize(4.0f);
glBegin(GL_POINTS);
//can only call glVertex3f here so many times before I stop seeing rendered points
glEnd();
I know this is a texture issue, since if I instead just render primitive points, I can generate as many as I want.
glEnable(GL_TEXTURE_2D);
glEnable(GL_POINT_SPRITE);
glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
glPointSize(4.0f);
glBegin(GL_POINTS);
//can only call glVertex3f here so many times before I stop seeing rendered points
glEnd();
I know this is a texture issue, since if I instead just render primitive points, I can generate as many as I want.