summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2006-12-31 07:00:13 +0000
committerCarsten Haitzler <raster@rasterman.com>2006-12-31 07:00:13 +0000
commitccafed752a73f32ea52bec36b1ce25f8851b52d5 (patch)
tree6b8ceacc8c6f9d280c05c5ae96c4a707c794feea
parentb51bdcbc1e31586d50bd4b1e605030c60ef5e3b1 (diff)
well THAT was just silly. fix yuv texture upload bug - row by row get it right.
SVN revision: 27691
-rw-r--r--legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c
index 1a4621c87a..51d257dc37 100644
--- a/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c
+++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c
@@ -491,7 +491,7 @@ evas_gl_common_ycbcr601pl_texture_new(Evas_GL_Context *gc, unsigned char **rows,
491 texfmt, GL_UNSIGNED_BYTE, NULL); 491 texfmt, GL_UNSIGNED_BYTE, NULL);
492 for (y = 0; y < tex->h; y++) 492 for (y = 0; y < tex->h; y++)
493 glTexSubImage2D(GL_TEXTURE_2D, 0, 493 glTexSubImage2D(GL_TEXTURE_2D, 0,
494 0, y, tex->w, tex->h, 494 0, y, tex->w, 1,
495 texfmt, GL_UNSIGNED_BYTE, rows[y]); 495 texfmt, GL_UNSIGNED_BYTE, rows[y]);
496 496
497 glGenTextures(1, &(tex->texture2)); 497 glGenTextures(1, &(tex->texture2));
@@ -514,7 +514,7 @@ evas_gl_common_ycbcr601pl_texture_new(Evas_GL_Context *gc, unsigned char **rows,
514 texfmt, GL_UNSIGNED_BYTE, NULL); 514 texfmt, GL_UNSIGNED_BYTE, NULL);
515 for (y = 0; y < (tex->h / 2); y++) 515 for (y = 0; y < (tex->h / 2); y++)
516 glTexSubImage2D(GL_TEXTURE_2D, 0, 516 glTexSubImage2D(GL_TEXTURE_2D, 0,
517 0, y, tex->w / 2, tex->h / 2, 517 0, y, tex->w / 2, 1,
518 texfmt, GL_UNSIGNED_BYTE, rows[tex->h + y]); 518 texfmt, GL_UNSIGNED_BYTE, rows[tex->h + y]);
519 519
520 glGenTextures(1, &(tex->texture3)); 520 glGenTextures(1, &(tex->texture3));
@@ -537,7 +537,7 @@ evas_gl_common_ycbcr601pl_texture_new(Evas_GL_Context *gc, unsigned char **rows,
537 texfmt, GL_UNSIGNED_BYTE, NULL); 537 texfmt, GL_UNSIGNED_BYTE, NULL);
538 for (y = 0; y < (tex->h / 2); y++) 538 for (y = 0; y < (tex->h / 2); y++)
539 glTexSubImage2D(GL_TEXTURE_2D, 0, 539 glTexSubImage2D(GL_TEXTURE_2D, 0,
540 0, y, tex->w / 2, tex->h / 2, 540 0, y, tex->w / 2, 1,
541 texfmt, GL_UNSIGNED_BYTE, rows[tex->h + (tex->h / 2) + y]); 541 texfmt, GL_UNSIGNED_BYTE, rows[tex->h + (tex->h / 2) + y]);
542 542
543 glUseProgramObjectARB(0); 543 glUseProgramObjectARB(0);
@@ -573,7 +573,7 @@ evas_gl_common_ycbcr601pl_texture_update(Evas_GL_Texture *tex, unsigned char **r
573 } 573 }
574 for (y = 0; y < tex->h; y++) 574 for (y = 0; y < tex->h; y++)
575 glTexSubImage2D(GL_TEXTURE_2D, 0, 575 glTexSubImage2D(GL_TEXTURE_2D, 0,
576 0, y, tex->w, tex->h, 576 0, y, tex->w, 1,
577 texfmt, GL_UNSIGNED_BYTE, rows[y]); 577 texfmt, GL_UNSIGNED_BYTE, rows[y]);
578 578
579 glBindTexture(GL_TEXTURE_2D, tex->texture2); 579 glBindTexture(GL_TEXTURE_2D, tex->texture2);
@@ -589,7 +589,7 @@ evas_gl_common_ycbcr601pl_texture_update(Evas_GL_Texture *tex, unsigned char **r
589 } 589 }
590 for (y = 0; y < (tex->h / 2); y++) 590 for (y = 0; y < (tex->h / 2); y++)
591 glTexSubImage2D(GL_TEXTURE_2D, 0, 591 glTexSubImage2D(GL_TEXTURE_2D, 0,
592 0, y, tex->w / 2, tex->h / 2, 592 0, y, tex->w / 2, 1,
593 texfmt, GL_UNSIGNED_BYTE, rows[tex->h + y]); 593 texfmt, GL_UNSIGNED_BYTE, rows[tex->h + y]);
594 594
595 glBindTexture(GL_TEXTURE_2D, tex->texture3); 595 glBindTexture(GL_TEXTURE_2D, tex->texture3);
@@ -605,7 +605,7 @@ evas_gl_common_ycbcr601pl_texture_update(Evas_GL_Texture *tex, unsigned char **r
605 } 605 }
606 for (y = 0; y < (tex->h / 2); y++) 606 for (y = 0; y < (tex->h / 2); y++)
607 glTexSubImage2D(GL_TEXTURE_2D, 0, 607 glTexSubImage2D(GL_TEXTURE_2D, 0,
608 0, y, tex->w / 2, tex->h / 2, 608 0, y, tex->w / 2, 1,
609 texfmt, GL_UNSIGNED_BYTE, rows[tex->h + (tex->h / 2) + y]); 609 texfmt, GL_UNSIGNED_BYTE, rows[tex->h + (tex->h / 2) + y]);
610 610
611 if (tex->gc->texture) tex->gc->texture->references--; 611 if (tex->gc->texture) tex->gc->texture->references--;