libcvd-members
[Top][All Lists]
Advanced

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

[libcvd-members] libcvd cvd_src/glwindow.cc cvd_src/Win32/glwind...


From: Edward Rosten
Subject: [libcvd-members] libcvd cvd_src/glwindow.cc cvd_src/Win32/glwind...
Date: Wed, 13 May 2009 11:10:18 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Edward Rosten <edrosten>        09/05/13 11:10:18

Modified files:
        cvd_src        : glwindow.cc 
        cvd_src/Win32  : glwindow.cpp 
        cvd            : glwindow.h 

Log message:
        Allow GLWindow to take an X11 Display string. Ignored for Win32.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/glwindow.cc?cvsroot=libcvd&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/Win32/glwindow.cpp?cvsroot=libcvd&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/glwindow.h?cvsroot=libcvd&r1=1.11&r2=1.12

Patches:
Index: cvd_src/glwindow.cc
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/glwindow.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- cvd_src/glwindow.cc 11 Mar 2009 21:30:44 -0000      1.15
+++ cvd_src/glwindow.cc 13 May 2009 11:10:08 -0000      1.16
@@ -28,9 +28,9 @@
     GLXContext context;
 };
 
-void CVD::GLWindow::init(const ImageRef& size, int bpp, const std::string& 
title)
+void CVD::GLWindow::init(const ImageRef& size, int bpp, const std::string& 
title, const std::string& disp)
 {
-    Display* display = XOpenDisplay(0);
+    Display* display = 
XOpenDisplay(disp==""?NULL:const_cast<char*>(disp.c_str()));
     if (display == 0)
        throw Exceptions::GLWindow::CreationError("Cannot open X display");
 

Index: cvd_src/Win32/glwindow.cpp
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/Win32/glwindow.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- cvd_src/Win32/glwindow.cpp  27 Aug 2008 20:47:13 -0000      1.3
+++ cvd_src/Win32/glwindow.cpp  13 May 2009 11:10:11 -0000      1.4
@@ -45,7 +45,7 @@
 
 static bool windowClassRegistered = false;
 
-void GLWindow::init(const ImageRef& size, int bpp, const std::string& title)
+void GLWindow::init(const ImageRef& size, int bpp, const std::string& title, 
const std::string&)
 {
     GLuint             PixelFormat;                    // Holds The Results 
After Searching For A Match
        WNDCLASS        wc;                                             // 
Windows Class Structure

Index: cvd/glwindow.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/glwindow.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- cvd/glwindow.h      1 Aug 2008 20:39:25 -0000       1.11
+++ cvd/glwindow.h      13 May 2009 11:10:15 -0000      1.12
@@ -93,11 +93,16 @@
 
        /// 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=24, const std::string& 
title="GLWindow") {
-         init(size, bpp, title);
+       /// @param size    Window size
+       /// @param bpp     Colour depth
+       /// @param title   Window title
+       /// @param display X11 display string, passed to XOpenDisplay. "" Is 
used to indicate NULL. This is ignored for non X11 platforms. 
+       GLWindow(const ImageRef& size, int bpp=24, const std::string& 
title="GLWindow", const std::string& display="") {
+         init(size, bpp, title, display);
        }
-       GLWindow(const ImageRef& size, const std::string& title, int bpp=24) {
-         init(size, bpp, title);
+       ///@overload
+       GLWindow(const ImageRef& size, const std::string& title, int bpp=24, 
const std::string& display="") {
+         init(size, bpp, title, display);
        }
 
        ~GLWindow();
@@ -139,7 +144,7 @@
     struct State;
     private:
        State* state;
-       void init(const ImageRef& size, int bpp, const std::string& title);
+       void init(const ImageRef& size, int bpp, const std::string& title, 
const std::string& display);
     };
 
 




reply via email to

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