I wanted to add an option to enable multisampling in the sample applications, but run into issues.
Currently, only the "HDR" pipeline supports multisampling.
I'm would like to enable multisampling for the forward pipeline. Reading the wiki and source code, it seems that you are forced to render in a separate FBO, do the resolve in another FBO and finally copy the image to the default FBO (window). This looks like a waste of buffer space and could cause issues on lower end card with little memory. I tried create a default FBO with multisampling (using `glfwWindowHint( GLFW_SAMPLES, 8 );`), but run into issues that Horde3D doesn't support multisampling on the default FBO.
My question is: Is the description given above correct or did I miss something? Does it make sense to add multisampling support for the default FBO?
You're right that this is still an issue. For default framebuffer like in the forwardpipeline there is currently no way to specify that you want multisampling to be activated. So the default will be applied and default means in case of Horde3D to disable multisampling by calling glDisable( GL_MULTISAMPLE ); in RenderDevice::setRenderBuffer( uint32 rbObj ).
This is IMHO not ideal. Maybe we should change this by querying the multisample state in RenderDevice::initStates() and use that state in setRenderBuffer().
Another way would be to query it everytime in beginRendering() but that would be proably to much as I guess even if you use other rendering libraries too, they won't change the multisampling state all the time.
+1 for the first solution.
Yeah, the patch looks good also to me.