From 8b53d19a68114bafba224d2a45e160b2adf36314 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 7 Aug 2012 19:25:03 +0000 Subject: [PATCH] fix issue with rgb + alpha movie textures --- panda/src/movies/movieVideoCursor.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/panda/src/movies/movieVideoCursor.cxx b/panda/src/movies/movieVideoCursor.cxx index 851bb8ea00..8129e7b898 100644 --- a/panda/src/movies/movieVideoCursor.cxx +++ b/panda/src/movies/movieVideoCursor.cxx @@ -211,24 +211,24 @@ apply_to_texture_alpha(const Buffer *buffer, Texture *t, int page, int alpha_src unsigned char *data = img.p() + page * t->get_expected_ram_page_size(); PStatTimer timer2(_copy_pcollector_copy); - int src_stride = size_x() * get_num_components(); + int src_width = get_num_components(); + int src_stride = size_x() * src_width; int dst_stride = t->get_x_size() * 4; + unsigned char *p = buffer->_block; if (alpha_src == 0) { - unsigned char *p = buffer->_block; for (int y=0; y_block; - int src_width = get_num_components(); for (int y=0; y