summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-14 19:40:33 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-14 19:40:33 +0000
commit0f10868e3d7e5379b56f3cce9cc391e8d9c17ee6 (patch)
tree54e88e77b554c8e718d63b5f249f1c4f818f7777 /libvo
parent0ddf1709175512266d5cb73aa205abb740b0fb89 (diff)
downloadmpv-0f10868e3d7e5379b56f3cce9cc391e8d9c17ee6.tar.bz2
mpv-0f10868e3d7e5379b56f3cce9cc391e8d9c17ee6.tar.xz
use glUploadTex helper function
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16225 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl2.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 3331fdcd79..f746aa937c 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -229,7 +229,7 @@ static int initTextures()
tsq->fw = texpercx;
tsq->fh = texpercy;
- tsq->isDirty=GL_TRUE;
+ tsq->isDirty=GL_FALSE;
tsq->isTexture=GL_FALSE;
tsq->texobj=0;
tsq->dirtyXoff=0; tsq->dirtyYoff=0; tsq->dirtyWidth=-1; tsq->dirtyHeight=-1;
@@ -469,10 +469,11 @@ static void drawTextureDisplay ()
if(square->isDirty)
{
- glTexSubImage2D (GL_TEXTURE_2D, 0,
+ glUploadTex(GL_TEXTURE_2D, gl_bitmap_format, gl_bitmap_type,
+ square->texture, image_width * image_bytes,
square->dirtyXoff, square->dirtyYoff,
square->dirtyWidth, square->dirtyHeight,
- gl_bitmap_format, gl_bitmap_type, square->texture);
+ 0);
square->isDirty=GL_FALSE;
square->dirtyXoff=0; square->dirtyYoff=0; square->dirtyWidth=-1; square->dirtyHeight=-1;
@@ -709,15 +710,6 @@ static int initGl(uint32_t d_width, uint32_t d_height)
glDisable(GL_DEPTH_TEST);
glDepthMask(GL_FALSE);
glDisable(GL_CULL_FACE);
-
- glPixelStorei (GL_UNPACK_ROW_LENGTH, image_width);
-
- /**
- * may give a little speed up for a kinda burst read ..
- * Also, the default of 4 will break some files.
- */
- glAdjustAlignment(image_width*image_bytes);
-
glEnable (GL_TEXTURE_2D);
gl_set_antialias(0);