libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd cvd/glwindow.h cvd_src/glwindow.cc


From: Colin Starr
Subject: [libcvd-members] libcvd cvd/glwindow.h cvd_src/glwindow.cc
Date: Tue, 20 Mar 2007 14:16:05 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Colin Starr <ccs36>     07/03/20 14:16:04

Modified files:
        cvd            : glwindow.h 
        cvd_src        : glwindow.cc 

Log message:
        Modified constructors to allow user to specify either bpp, title, or 
neither.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/glwindow.h?cvsroot=libcvd&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/glwindow.cc?cvsroot=libcvd&r1=1.1&r2=1.2

Patches:
Index: cvd/glwindow.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/glwindow.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- cvd/glwindow.h      2 Mar 2007 15:31:19 -0000       1.1
+++ cvd/glwindow.h      20 Mar 2007 14:16:04 -0000      1.2
@@ -86,7 +86,13 @@
 
        /// Construct a GLWindow of the given size and colour depth, with the 
given title.
        /// A double-buffered GL context is associated with the window.
-       GLWindow(const ImageRef& size, int bpp, const std::string& 
title="GLWindow");
+       GLWindow(const ImageRef& size, int bpp=24, const std::string& 
title="GLWindow") {
+         init(size, bpp, title);
+       }
+       GLWindow(const ImageRef& size, const std::string& title, int bpp=24) {
+         init(size, bpp, title);
+       }
+
        ~GLWindow();
        /// Get the size
        ImageRef size() const;
@@ -119,6 +125,7 @@
     private:
        struct State;
        State* state;
+       void init(const ImageRef& size, int bpp, const std::string& title);
     };
 
     

Index: cvd_src/glwindow.cc
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/glwindow.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- cvd_src/glwindow.cc 2 Mar 2007 15:31:19 -0000       1.1
+++ cvd_src/glwindow.cc 20 Mar 2007 14:16:04 -0000      1.2
@@ -28,7 +28,7 @@
     int font;  
 };
     
-CVD::GLWindow::GLWindow(const ImageRef& size, int bpp, const std::string& 
title)
+void CVD::GLWindow::init(const ImageRef& size, int bpp, const std::string& 
title)
 {
     Display* display = XOpenDisplay(0);
     if (display == 0)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]