I just port my code from win32api to GLFW and It work pretty well in window mode.
But when i try fullscreen mode the performance is very horrible and there are some kind of scanlines when the scene is moving.
can someone tell me how to fix this ?
this is the code i use to initialize window
#include <StdAfx.h>
#include "./MainEngine.h"
#include <GL/glfw.h>
MainEngine* mainEngine;
int main( void )
{
int running = GL_TRUE;
glfwInit();
glfwSetTime(1);
if( !glfwOpenWindow( 1024,768, 8,8,8,8,16,0, GLFW_FULLSCREEN) )
{
glfwTerminate();
return 0;
}
mainEngine = new MainEngine();
mainEngine->isFrameLimit = false;
mainEngine->isUseOpenGL2 = 1;
mainEngine->initComponent();
mainEngine->isPostProcessing = true;
mainEngine->resize(1024,768);
while( running )
{
mainEngine->mainLoop();
glfwSwapBuffers();
/*
running = !glfwGetKey( GLFW_KEY_ESC ) &&
glfwGetWindowParam( GLFW_OPENED );
*/
}
glfwTerminate();
return 0;
}