aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/ephyr/ephyr_glamor_glx.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-21 22:50:26 +0100
committermarha <marha@users.sourceforge.net>2014-03-21 22:56:24 +0100
commiteb71c0f23999d1cc156e1821d73634ec79621fc2 (patch)
treed45d551ada10b1bfb3d57517c892770734a77817 /xorg-server/hw/kdrive/ephyr/ephyr_glamor_glx.c
parentab3d257d88f67e169a314ad0fac851fc2fc6cb05 (diff)
parent41fea4472dec859ddec76bdfa7108ebec71de1e3 (diff)
downloadvcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.tar.gz
vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.tar.bz2
vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xserver fontconfig libX11 libXext libxcb mesa git update 21 Mar 2014 Conflicts: libxcb/src/xcb_auth.c libxcb/src/xcb_conn.c libxcb/src/xcb_util.c libxcb/src/xcb_windefs.h mesalib/src/mapi/glapi/glapi.h
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr/ephyr_glamor_glx.c')
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr_glamor_glx.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr_glamor_glx.c b/xorg-server/hw/kdrive/ephyr/ephyr_glamor_glx.c
index d56907fe7..9903cc772 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr_glamor_glx.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr_glamor_glx.c
@@ -67,6 +67,9 @@ struct ephyr_glamor {
GLuint texture_shader;
GLuint texture_shader_position_loc;
GLuint texture_shader_texcoord_loc;
+
+ /* Size of the window that we're rendering to. */
+ unsigned width, height;
};
static GLint
@@ -205,6 +208,7 @@ ephyr_glamor_damage_redisplay(struct ephyr_glamor *glamor,
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glUseProgram(glamor->texture_shader);
+ glViewport(0, 0, glamor->width, glamor->height);
glVertexAttribPointer(glamor->texture_shader_position_loc,
2, GL_FLOAT, FALSE, 0, position);
@@ -309,6 +313,7 @@ ephyr_glamor_get_visual(void)
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DOUBLEBUFFER, 1,
+ GLX_VISUAL_ID, DefaultVisual(dpy, DefaultScreen(dpy)),
None
};
int event_base = 0, error_base = 0, nelements;
@@ -329,3 +334,14 @@ ephyr_glamor_get_visual(void)
return xcb_aux_find_visual_by_id(xscreen, visual_info->visualid);
}
+
+void
+ephyr_glamor_set_window_size(struct ephyr_glamor *glamor,
+ unsigned width, unsigned height)
+{
+ if (!glamor)
+ return;
+
+ glamor->width = width;
+ glamor->height = height;
+}