summaryrefslogtreecommitdiff
path: root/community/tigervnc/glx.patch
blob: b2ecb672f24424b9107e2b1f50847d621521de59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
diff -ur tigervnc-1.2.0.orig/unix/xserver/hw/vnc/Makefile.am tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am
--- tigervnc-1.2.0.orig/unix/xserver/hw/vnc/Makefile.am	2011-10-31 09:14:40.000000000 +0100
+++ tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am	2013-01-21 03:39:14.924841615 +0100
@@ -7,6 +7,10 @@
 XREGION_LIB=$(LIB_DIR)/Xregion/libXregion.la
 COMMON_LIBS=$(NETWORK_LIB) $(RFB_LIB) $(RDR_LIB) $(XREGION_LIB)
 
+if GLX
+GLX_LIB = $(top_srcdir)/glx/libglx.la
+endif
+
 noinst_LTLIBRARIES = libvnccommon.la
 
 HDRS = RegionHelper.h vncExtInit.h vncHooks.h XserverDesktop.h xorg-version.h \
@@ -34,7 +38,8 @@
 	-UHAVE_CONFIG_H \
 	-DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
 	-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common \
-	-I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir)
+	-I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir) \
+	-I$(top_srcdir)/glx
 
 Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(COMMON_LIBS) \
 	$(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XVNC_SYS_LIBS) -lX11
@@ -55,7 +60,7 @@
 
 libvnc_la_LDFLAGS = -module -avoid-version
 
-libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS)
+libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS) $(GLX_LIB)
 
 EXTRA_DIST = Xvnc.man
 
diff -ur tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xvnc.cc tigervnc-1.2.0/unix/xserver/hw/vnc/xvnc.cc
--- tigervnc-1.2.0.orig/unix/xserver/hw/vnc/xvnc.cc	2012-03-09 21:34:29.000000000 +0100
+++ tigervnc-1.2.0/unix/xserver/hw/vnc/xvnc.cc	2013-01-21 03:38:38.187300899 +0100
@@ -87,6 +87,17 @@
 #include "version-config.h"
 #include "site.h"
 #endif
+
+#if XORG >= 113
+#ifdef GLXEXT
+/* C++ really is the worst */
+#define private _private
+#include "glxserver.h"
+#undef private
+#include "glx_extinit.h"
+#endif
+#endif
+
 #undef class
 #undef public
 }
@@ -1305,6 +1316,16 @@
   dispatchException &= ~DE_RESET;
 }
 
+#if XORG >= 113
+#ifdef GLXEXT
+static ExtensionModule vnc_glx_ext = {
+    GlxExtensionInit,
+    "GLX",
+    &noGlxExtension
+};
+#endif
+#endif
+
 void
 InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
 {
@@ -1314,6 +1335,13 @@
     int i;
     int NumFormats = 0;
 
+#if XORG >= 113
+#ifdef GLXEXT
+    if (serverGeneration == 1)
+        LoadExtension(&vnc_glx_ext, TRUE);
+#endif
+#endif
+
     /* initialize pixmap formats */
 
     /* must have a pixmap depth to match every screen depth */