X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FVideo.hh;fp=src%2FMoof%2FVideo.hh;h=bb1fdd48db9b168a086be687c6cc2f51fe55a284;hp=a76dca268ef052f136124bc425769d6f65a32f72;hb=16d1a05b0777e97a45c48e2874aa4e5cc791282e;hpb=15cd32dc28e7fa5997d9850d7e10b889f69a7cae diff --git a/src/Moof/Video.hh b/src/Moof/Video.hh index a76dca2..bb1fdd4 100644 --- a/src/Moof/Video.hh +++ b/src/Moof/Video.hh @@ -45,32 +45,33 @@ public: struct Attributes { // OpenGL attributes - long colorBuffer[4]; // rgba - long frameBuffer; - bool doubleBuffer; - long depthBuffer; - long stencilBuffer; - long accumBuffer[4]; // rgba - bool stereo; - long multisampleBuffers; - long multisampleSamples; - bool swapControl; - bool hardwareonly; + long colorBuffer[4]; // rgba + long frameBuffer; + bool doubleBuffer; + long depthBuffer; + long stencilBuffer; + long accumBuffer[4]; // rgba + bool stereo; + long multisampleBuffers; + long multisampleSamples; + bool swapControl; + bool hardwareonly; // Window attributes - long mode[3]; // width, height, bpp - bool fullscreen; - bool resizable; - bool cursorVisible; - bool cursorGrab; + std::string caption; + std::string icon; + long mode[3]; // width, height, bpp + bool fullscreen; + bool resizable; + bool cursorVisible; + bool cursorGrab; Attributes(); }; Video(); - Video(const Attributes& attribs); - Video(const Attributes& attribs, const std::string& caption); - Video(const std::string& caption); + explicit Video(const Attributes& attribs); + explicit Video(const std::string& caption, const std::string& icon); ~Video(); void setVideoMode(const long mode[3]); @@ -109,10 +110,13 @@ public: }; private: - void init(const Attributes& attribs, const std::string& caption); + void init(const Attributes& attribs); + void recreateContext(); void setOpenGLAttributes(); + void setIcon(); + SDL_Surface* context_; unsigned flags_; Attributes attribs_;