SDL_GL_SetAttribute(SDL_GL_STEREO,
attributes_.is_stereo);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,
- attributes_.multisample_buffers);
+ 0 < attributes_.multisamples);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,
- attributes_.multisample_samples);
+ attributes_.multisamples);
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL,
attributes_.is_swap_control);
SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL,
if (context_) SDL_FreeSurface(context_);
context_ = SDL_SetVideoMode(mode[0], mode[1], mode[2],
- flags_);
+ SDL_OPENGL | flags_);
if (context_)
{
}
else
{
- throw std::runtime_error("bad video mode attempted");
+ throw std::runtime_error(SDL_GetError());
}
}
}
if (accum.size() > 3) accumulator_buffer[3] = accum[3];
settings.get("stereo", is_stereo);
- settings.get("multiesamplebuffers", multisample_buffers);
- settings.get("multiesamplesamples", multisample_samples);
+ settings.get("multisamples", multisamples);
settings.get("swapcontrol", is_swap_control);
settings.get("hardwareonly", is_hardware_only);
accumulator_buffer[2] = 0;
accumulator_buffer[3] = 0;
is_stereo = false;
- multisample_buffers = 0;
- multisample_samples = 0;
+ multisamples = 0;
is_swap_control = false;
is_hardware_only = false;
mode[0] = 640;