Fix for #1160 Anti-aliasing
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8099 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: d56b77a512b45c8c2d74f52af4d6d8c8f795afbc Former-commit-id: b65c2d8882f3e2bb7b35bdc70691f04ed8a94d61
This commit is contained in:
parent
fe6de8c6e3
commit
ab8f88cc95
1 changed files with 17 additions and 0 deletions
|
@ -686,6 +686,23 @@ bool GfScrInitSDL2(int nWinWidth, int nWinHeight, int nFullScreen)
|
|||
GfglFeatures::self().detectStandardSupport();
|
||||
GfglFeatures::self().dumpSupport();
|
||||
GfglFeatures::self().loadSelection();
|
||||
if (GfglFeatures::self().isSupported(GfglFeatures::MultiSampling))
|
||||
{
|
||||
bool MultiSamplingWasSelected =
|
||||
GfglFeatures::self().isSelected(GfglFeatures::MultiSampling);
|
||||
int MultiSamplingSamples =
|
||||
GfglFeatures::self().getSelected(GfglFeatures::MultiSamplingSamples);
|
||||
if(MultiSamplingWasSelected)
|
||||
{
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, MultiSamplingSamples);
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 0);
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Save view geometry and screen center.
|
||||
|
|
Loading…
Reference in a new issue