fix bug when numberOfSamples is 0

This commit is contained in:
Emil Axelsson
2016-04-01 17:47:00 +02:00
parent 7b6a47973a
commit 568a6a3416
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -123,6 +123,9 @@ void FramebufferRenderer::initialize() {
OsEng.renderEngine().raycasterManager().addListener(*this);
_nAaSamples = OsEng.windowWrapper().currentNumberOfAaSamples();
if (_nAaSamples == 0) {
_nAaSamples = 1;
}
if (_nAaSamples > 8) {
LERROR("Framebuffer renderer does not support more than 8 MSAA samples.");
_nAaSamples = 8;