Mercurial > mplayer.hg
diff libvo/vo_gl2.c @ 34337:f8c523d09e5e
Use glLoadMatrixf. This makes it easier to support OpenGL ES.
author | reimar |
---|---|
date | Sat, 10 Dec 2011 20:21:50 +0000 |
parents | fe03e0d5c7d0 |
children | 5e29e950d918 |
line wrap: on
line diff
--- a/libvo/vo_gl2.c Sat Dec 10 14:31:28 2011 +0000 +++ b/libvo/vo_gl2.c Sat Dec 10 20:21:50 2011 +0000 @@ -423,6 +423,13 @@ static void resize(int x,int y){ + // simple orthogonal projection for 0-1;0-1 + static const float matrix[16] = { + 2, 0, 0, 0, + 0, -2, 0, 0, + 0, 0, 0, 0, + -1, 1, 0, 1, + }; mp_msg(MSGT_VO,MSGL_V,"[gl2] Resize: %dx%d\n",x,y); if(aspect_scaling()) { glClear(GL_COLOR_BUFFER_BIT); @@ -443,8 +450,7 @@ } glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho (0, 1, 1, 0, -1.0, 1.0); + glLoadMatrixf(matrix); glMatrixMode(GL_MODELVIEW); glLoadIdentity();