Jump to content

  • Log In with Google      Sign In   
  • Create Account


floatingwoods

Member Since 09 Jun 2008
Offline Last Active Jul 09 2014 03:52 PM
-----

Posts I've Made

In Topic: glDrawElements without indices?

09 July 2014 - 12:15 PM

Thanks again to both of you. It is now much more clear!


In Topic: glDrawElements without indices?

07 July 2014 - 05:54 PM

Interesting, thanks to both of you!

 

So what about following strategy:

 

I keep track of all textures and VBOs that I have registered with the GPU. If I notice that I am coming close to a saturation, then I release a few textures or VBOs that were not used for a while... (e.g. not used because out of sight). Does that sound reasonable?


In Topic: glDrawElements without indices?

07 July 2014 - 01:09 PM

Thank you for the clarification L. Spiro, which actually confuses me a little bit ;)

 

Take texture memory. Does that mean that if you try to put too many textures onto the GPU, some textures will automatically be flushed? If yes, then this means I might have to upload textures more than one time!?

 

I somehow feel that texure memory is yet another story. But take VBOs: I creating them via Qt, like:

QGLBuffer* myVBO=new QGLBuffer(QGLBuffer::VertexBuffer);
myVBO->create();
myVBO->bind();
myVBO->setUsagePattern(QGLBuffer::StaticDraw);
myVBO->allocate(vertices,3*verticesCnt*sizeof(float));

and everytime, in order to use them, I call:

myVBO->bind();
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3,GL_FLOAT,0,0);
glDrawArrays(GL_TRIANGLES,0,verticesCnt);
glDisableClientState(GL_VERTEX_ARRAY);

And that works fine. I never have to upload the vertices to the GPU again. So is there something that happens behind the scene?

 

Thanks

 


In Topic: glDrawElements without indices?

06 July 2014 - 04:43 PM

Thank you COlumbo, that's exactly what I was looking for!

 

For the second part, how can I find out if my GPU's memory is already saturated?

 

Thanks


In Topic: OBJ format and texture coordinates

13 May 2014 - 05:18 PM

Thanks Phil,

 

that works indeed! (I forgot to enable the U and V repeat)


PARTNERS