]> Dogcows Code - chaz/yoink/blobdiff - src/moof/video.cc
compression functions; fixed texture seams
[chaz/yoink] / src / moof / video.cc
index 30de984d8a9ecc84644ae273db9cfba132c5ec9e..c4e8fd855e9c1f2f597d495eeda6ef100adeaea7 100644 (file)
@@ -97,9 +97,9 @@ void video::set_opengl_attributes()
        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,
@@ -124,7 +124,7 @@ void video::mode(const int mode[3])
                if (context_) SDL_FreeSurface(context_);
 
                context_ = SDL_SetVideoMode(mode[0], mode[1], mode[2],
-                               flags_);
+                               SDL_OPENGL | flags_);
 
                if (context_)
                {
@@ -139,7 +139,7 @@ void video::mode(const int mode[3])
                }
                else
                {
-                       throw std::runtime_error("bad video mode attempted");
+                       throw std::runtime_error(SDL_GetError());
                }
        }
 }
@@ -322,8 +322,7 @@ video::attributes::attributes(const settings& settings)
        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);
 
@@ -380,8 +379,7 @@ void video::attributes::init()
        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;
This page took 0.022414 seconds and 4 git commands to generate.