]> Dogcows Code - chaz/yoink/blobdiff - src/moof/video.hh
remove some unused stlplus modules
[chaz/yoink] / src / moof / video.hh
index 8b42cfddd8b9e181f0f94706f97c6aaf41c67c78..6b4980e519fb48391f5249bb109cf3d979f8f1a5 100644 (file)
@@ -1,13 +1,11 @@
 
-/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+/*]  Copyright (c) 2009-2011, Charles McGarvey  [*****************************
 **]  All rights reserved.
 *
-* vi:ts=4 sw=4 tw=75
-*
 * Distributable under the terms and conditions of the 2-clause BSD license;
 * see the file COPYING for a complete text of the license.
 *
-**************************************************************************/
+*****************************************************************************/
 
 #ifndef _MOOF_VIDEO_HH_
 #define _MOOF_VIDEO_HH_
 namespace moof {
 
 
+// forward declarations
 class settings;
 
 class video;
 typedef boost::shared_ptr<video> video_ptr;
 
-
 class video
 {
 public:
 
        struct attributes
        {
-               int                     color_buffer[4];                // rgba
-               int                     frame_buffer;
-               bool            is_double_buffer;
-               int                     depth_buffer;
-               int                     stencil_buffer;
-               int                     accumulator_buffer[4];  // rgba
-               bool            is_stereo;
-               int                     multisample_buffers;
-               int                     multisample_samples;
-               bool            is_swap_control;
-               bool            is_hardware_only;
-               int                     mode[3];                                // width, height, bpp
-               bool            is_fullscreen;
-               bool            is_resizable;
-               bool            is_cursor_visible;
-               bool            is_cursor_captured;
+               int     color_buffer[4];        // rgba
+               int     frame_buffer;
+               bool    is_double_buffer;
+               int     depth_buffer;
+               int     stencil_buffer;
+               int     accumulator_buffer[4];  // rgba
+               bool    is_stereo;
+               int     multisample_buffers;
+               int     multisample_samples;
+               bool    is_swap_control;
+               bool    is_hardware_only;
+               int     mode[3];                // width, height, bpp
+               bool    is_fullscreen;
+               bool    is_resizable;
+               bool    is_cursor_visible;
+               bool    is_cursor_captured;
 
                attributes();
                attributes(const settings& settings);
@@ -66,10 +64,9 @@ public:
 
                void init();
 
-               backend         mBackend;
+               backend backend_;
        };
 
-
        static video_ptr alloc(const attributes& attribs)
        {
                return video_ptr(new video(attribs));
@@ -78,7 +75,7 @@ public:
        explicit video(const std::string& caption = "Moof!!");
        explicit video(const class attributes& attribs);
        explicit video(const std::string& caption,
-                                  const class attributes& attribs);
+                       const class attributes& attribs);
        ~video();
 
        class attributes attributes() const;
@@ -107,13 +104,11 @@ public:
        bool cursor_captured() const;
        void toggle_cursor_captured();
 
-
        /**
         * Swap the video buffers if double-buffered.
         */
        void swap(scalar t = timer::ticks());
 
-
        /**
         * Make this video context the current context which will be effected
         * by future draw commands.
@@ -128,7 +123,6 @@ public:
                return current_;
        }
 
-
        /**
         * Get the width of the video display.
         * \return The pixel width.
@@ -141,7 +135,6 @@ public:
         */
        int height() const;
 
-
        void show_fps(bool show)
        {
                show_fps_ = show;
@@ -155,7 +148,6 @@ public:
                return show_fps_;
        }
 
-
 private:
 
        void init();
@@ -166,13 +158,13 @@ private:
        // TODO: this implementation is not well hidden
 
        SDL_Surface*            context_;
-       int                                     flags_;
+       int                     flags_;
        class attributes        attributes_;
-       bool                            show_fps_;
-       std::string                     caption_;
-       scalar                          fps_accumulator_;
-       int                                     fps_counter_;
-       scalar                          last_swap_;
+       bool                    show_fps_;
+       std::string             caption_;
+       scalar                  fps_accumulator_;
+       int                     fps_counter_;
+       scalar                  last_swap_;
 
        static video*           current_;
 };
This page took 0.022337 seconds and 4 git commands to generate.