int FramebufferConfiguration::getNumColorAttachments(){
   int numAttachments = 0;
   for (auto i = fbTextures.begin(); i != fbTextures.end(); ++i)
   {
      if(i->second->attachmentInfo >= GL_COLOR_ATTACHMENT0 && i->second->attachmentInfo < GL_COLOR_ATTACHMENT0 + getMaxColorAttachments())
      {
         numAttachments++;
      }
   }
   return numAttachments;
}
예제 #2
0
FrameBufferObject::FrameBufferObject(unsigned int nbColorBuffer)
        : nbColorAttachement(nbColorBuffer)
{
	if(nbColorAttachement > getMaxColorAttachments())
		nbColorAttachement = getMaxColorAttachments();
}