Fix opengl rendering artifacts
This commit is contained in:
parent
9c89670006
commit
a76224cee6
67
gtk-vnc-0.3.4-render.patch
Normal file
67
gtk-vnc-0.3.4-render.patch
Normal file
@ -0,0 +1,67 @@
|
||||
diff -r 6f18ca44fbe3 src/vncdisplay.c
|
||||
--- a/src/vncdisplay.c Thu Apr 03 12:57:25 2008 -0300
|
||||
+++ b/src/vncdisplay.c Thu Apr 03 14:23:16 2008 -0400
|
||||
@@ -325,7 +325,7 @@
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, priv->fb.width);
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
||||
x, y, w, h,
|
||||
- GL_BGRA_EXT /* GL_RGB */,
|
||||
+ GL_RGBA,
|
||||
GL_UNSIGNED_BYTE,
|
||||
priv->gl_tex_data +
|
||||
y * 4 * priv->fb.width +
|
||||
@@ -340,7 +340,7 @@
|
||||
glTexCoord2f(0,0); glVertex3f(wx, wy+wh, 0);
|
||||
glTexCoord2f(rx,0); glVertex3f(wx+ww, wy+wh, 0);
|
||||
glTexCoord2f(rx,ry); glVertex3f(wx+ww, wy, 0);
|
||||
- glEnd();
|
||||
+ glEnd();
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glFlush();
|
||||
gdk_gl_drawable_gl_end(priv->gl_drawable);
|
||||
@@ -853,8 +853,8 @@
|
||||
VncDisplayPrivate *priv = obj->priv;
|
||||
GdkVisual *visual;
|
||||
|
||||
- visual = gdk_screen_get_system_visual(gdk_screen_get_default());
|
||||
-
|
||||
+ visual = gdk_drawable_get_visual(GTK_WIDGET(obj)->window);
|
||||
+
|
||||
priv->image = gdk_image_new(GDK_IMAGE_FASTEST, visual, width, height);
|
||||
GVNC_DEBUG("Visual mask: %3d %3d %3d\n shift: %3d %3d %3d\n",
|
||||
visual->red_mask,
|
||||
@@ -1170,8 +1170,8 @@
|
||||
{
|
||||
VncDisplayPrivate *priv = obj->priv;
|
||||
|
||||
- if (priv->allow_scaling &&
|
||||
- (priv->fb.height != width ||
|
||||
+ if (priv->allow_scaling &&
|
||||
+ (priv->fb.width != width ||
|
||||
priv->fb.height != height))
|
||||
scale_display(obj, width, height);
|
||||
else if (priv->gl_enabled) {
|
||||
@@ -2010,13 +2010,6 @@
|
||||
GtkObject *obj = GTK_OBJECT(display);
|
||||
GtkWidget *widget = GTK_WIDGET(display);
|
||||
VncDisplayPrivate *priv;
|
||||
-#if WITH_GTKGLEXT
|
||||
- static const int attrib[] = { GDK_GL_RGBA,
|
||||
- GDK_GL_RED_SIZE, 1,
|
||||
- GDK_GL_GREEN_SIZE, 1,
|
||||
- GDK_GL_BLUE_SIZE, 1,
|
||||
- GDK_GL_ATTRIB_LIST_NONE };
|
||||
-#endif
|
||||
|
||||
g_signal_connect(obj, "expose-event",
|
||||
G_CALLBACK(expose_event), NULL);
|
||||
@@ -2073,7 +2066,8 @@
|
||||
|
||||
#if WITH_GTKGLEXT
|
||||
if (gtk_gl_init_check(NULL, NULL)) {
|
||||
- priv->gl_config = gdk_gl_config_new(attrib);
|
||||
+ priv->gl_config = gdk_gl_config_new_by_mode(GDK_GL_MODE_RGB |
|
||||
+ GDK_GL_MODE_DEPTH);
|
||||
if (!gtk_widget_set_gl_capability(widget,
|
||||
priv->gl_config,
|
||||
NULL,
|
@ -7,7 +7,7 @@
|
||||
Summary: A GTK widget for VNC clients
|
||||
Name: gtk-vnc
|
||||
Version: 0.3.4
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: Development/Libraries
|
||||
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||
@ -15,6 +15,7 @@ Patch1: %{name}-%{version}-scaling-crash.patch
|
||||
Patch2: %{name}-%{version}-makecontext.patch
|
||||
Patch3: %{name}-%{version}-endianess.patch
|
||||
Patch4: %{name}-%{version}-protocol-version.patch
|
||||
Patch5: %{name}-%{version}-render.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
URL: http://gtk-vnc.sf.net/
|
||||
BuildRequires: gtk2-devel pygtk2-devel python-devel zlib-devel
|
||||
@ -75,6 +76,7 @@ browsers.
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
%if %{with_plugin}
|
||||
@ -128,6 +130,9 @@ rm -fr %{buildroot}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Apr 3 2008 Daniel P. Berrange <berrange@redhat.com> - 0.3.4-3.fc9
|
||||
- Fix OpenGL rendering artifacts (rhbz #440184)
|
||||
|
||||
* Thu Apr 3 2008 Daniel P. Berrange <berrange@redhat.com> - 0.3.4-2.fc9
|
||||
- Fixed endianness conversions
|
||||
- Fix makecontext() args crash on x86_64
|
||||
|
Loading…
Reference in New Issue
Block a user