WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] opengl rendering

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] opengl rendering
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 19 Mar 2008 14:02:41 +0000
Delivery-date: Wed, 19 Mar 2008 07:03:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (X11/20071022)
Hi all,
I am attaching a patch with few corrections for the opengl rendering. This patch has to be applied on top of the previous one.
Best Regards,

Stefano Stabellini

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
diff -r d1e91aba2758 tools/ioemu/sdl.c
--- a/tools/ioemu/sdl.c Wed Mar 19 12:41:48 2008 +0000
+++ b/tools/ioemu/sdl.c Wed Mar 19 13:56:13 2008 +0000
@@ -110,7 +110,7 @@ static void opengl_setdata(DisplayState 
             glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
             break;
     }   
-    glPixelStorei(GL_UNPACK_ROW_LENGTH, (ds->linesize * 8 / ds->depth) - 
ds->width);
+    glPixelStorei(GL_UNPACK_ROW_LENGTH, (ds->linesize * 8) / ds->depth);
     glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, gl_format, ds->width, 
ds->height, 0, tex_format, tex_type, pixels);
     glTexParameterf(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_PRIORITY, 1.0);
     glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, 
GL_LINEAR);
@@ -125,7 +125,7 @@ static void opengl_update(DisplayState *
     int bpp = ds->depth / 8;
     GLvoid *pixels = ds->data + y * ds->linesize + x * bpp;
     glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texture_ref);
-    glPixelStorei(GL_UNPACK_ROW_LENGTH, (ds->linesize / bpp) - w);
+    glPixelStorei(GL_UNPACK_ROW_LENGTH, ds->linesize / bpp);
     glTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, x, y, w, h, tex_format, 
tex_type, pixels);
     glBegin(GL_QUADS);
         glTexCoord2d(0, 0);
@@ -476,7 +476,8 @@ static void toggle_full_screen(DisplaySt
 static void toggle_full_screen(DisplayState *ds)
 {
     gui_fullscreen = !gui_fullscreen;
-    sdl_resize(ds, screen->w, screen->h, ds->linesize);
+    sdl_resize(ds, ds->width, ds->height, ds->linesize);
+    ds->dpy_setdata(ds, ds->data);
     if (gui_fullscreen) {
         gui_saved_grab = gui_grab;
         sdl_grab_start();
@@ -503,7 +504,7 @@ static void sdl_refresh(DisplayState *ds
     while (SDL_PollEvent(ev)) {
         switch (ev->type) {
         case SDL_VIDEOEXPOSE:
-            sdl_update(ds, 0, 0, ds->width, ds->height);
+            ds->dpy_update(ds, 0, 0, ds->width, ds->height);
             break;
         case SDL_KEYDOWN:
         case SDL_KEYUP:
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] opengl rendering, Stefano Stabellini <=