summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2005-03-08 07:25:08 +0000
committerDavid Reveman <davidr@novell.com>2005-03-08 07:25:08 +0000
commit696e95e129f3a556e14c97489b6d657289205fe1 (patch)
treeae7f9ee0c24a5aa65dabe777ba2799cd40dd5049
parentfef16ff6881758c74b619a5e60c8089e9c585310 (diff)
Fix glitz_set_pixels and initialization of plane equation for TexGen
-rw-r--r--ChangeLog8
-rw-r--r--src/glitz_pixel.c11
-rw-r--r--src/glitz_texture.c2
3 files changed, 15 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c29918..2bafccc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-03-08 David Reveman <davidr@novell.com>
+
+ * src/glitz_texture.c (glitz_texture_set_tex_gen): Initialize plane
+ equation correctly.
+
+ * src/glitz_pixel.c (glitz_set_pixels): Advance to next clip box.
+ (glitz_set_pixels): Zero y-offset to _glitz_pixel_transform.
+
2005-03-01 David Reveman <davidr@novell.com>
* src/glitz.h (GLITZ_REVISION): Bump version to 0.4.1.
diff --git a/src/glitz_pixel.c b/src/glitz_pixel.c
index 946bfdd..adae8b6 100644
--- a/src/glitz_pixel.c
+++ b/src/glitz_pixel.c
@@ -780,11 +780,9 @@ glitz_set_pixels (glitz_surface_t *dst,
dst_image.data = pixels = data;
dst_image.format = &gl_format->pixel;
- src_image.data =
+ ptr =
glitz_buffer_map (buffer,
GLITZ_BUFFER_ACCESS_READ_ONLY);
- src_image.data +=
- format->skip_lines * format->bytes_per_line;
src_image.format = format;
gl->pixel_store_i (GLITZ_GL_UNPACK_ALIGNMENT, 4);
@@ -797,11 +795,13 @@ glitz_set_pixels (glitz_surface_t *dst,
src_image.width = box.x2 - box.x1;
src_image.height = box.y2 - box.y1;
+ src_image.data = ptr + (format->skip_lines + box.y1 - y_dst) *
+ format->bytes_per_line;
+
_glitz_pixel_transform (transform,
&src_image,
&dst_image,
- format->xoffset + box.x1 - x_dst,
- box.y1 - y_dst,
+ format->xoffset + box.x1 - x_dst, 0,
0, 0,
box.x2 - box.x1, box.y2 - box.y1);
}
@@ -851,6 +851,7 @@ glitz_set_pixels (glitz_surface_t *dst,
GLITZ_DAMAGE_DRAWABLE_MASK |
GLITZ_DAMAGE_SOLID_MASK);
}
+ clip++;
}
if (transform)
diff --git a/src/glitz_texture.c b/src/glitz_texture.c
index de53ff5..4722c81 100644
--- a/src/glitz_texture.c
+++ b/src/glitz_texture.c
@@ -293,7 +293,7 @@ glitz_texture_set_tex_gen (glitz_gl_proc_address_list_t *gl,
if (flags & GLITZ_SURFACE_FLAG_GEN_T_COORDS_MASK)
{
- plane.v[0] = 0.0f;
+ plane.v[0] = plane.v[2] = 0.0f;
if (flags & GLITZ_SURFACE_FLAG_EYE_COORDS_MASK)
{
plane.v[1] = 1.0f;