SDL / opengl多重采样不起作用
我正在尝试使用SDL / opengl进行多重采样,但SDL不接受设置SDL_MULTISAMPLEBUFFERS和SDL_MULTISAMPLESAMPLES。相反,它们保留为0,之后SDL_SetVideoMode()将失败。我知道我的硬件可以通过4倍多重采样来实现这种像素格式。我正在运行Ubuntu 10.10。
码:
SDL_Init( SDL_INIT_VIDEO );
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 0 );
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, 0 );
SDL_GL_SetAttribute( SDL_GL_ACCELERATED_VISUAL, 1 );
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1 );
SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, 4 );
Uint32 flags;
flags = SDL_OPENGL;
if( m_bFullscreen )
{
flags = flags | SDL_FULLSCREEN;
}
SDL_SetVideoMode( m_sizeX, m_sizeY, 0, flags );
没有找到相关结果
已邀请:
1 个回复
茂坦湿床够
和
然后观察你的stderr输出。