Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


floatingwoods

Member Since 09 Jun 2008
Offline Last Active Oct 01 2014 01:26 PM

Posts I've Made

In Topic: Default light ambient, diffuse and specular values?

01 October 2014 - 09:57 AM

a quick follow-up question though... you wrote "my advice would be for per light ambient to be very low or zero, and per light diffuse/specular to be equal".

 

If I do that, then I need to code the color in the diffuse channel, right? As for now, I specify an objet's color via the ambient component (of the object). Its diffuse component is always grey, i.e. it adds some diffuse effect, but not in the color of the object.

 

Would that mean I could drop the object's ambient channel, and only work with the object's diffuse and specular channels?


In Topic: Default light ambient, diffuse and specular values?

01 October 2014 - 09:46 AM

Thank you Hodgman!


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

 


PARTNERS