summaryrefslogtreecommitdiffstats
path: root/libvo/vo_gl2.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-04-26 17:54:52 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-04-26 17:55:05 +0300
commite913d6c5dabcf342d8c1a7070382d712fc354948 (patch)
tree965b5b698c7075e53123593eb4b5bfdb45d78c56 /libvo/vo_gl2.c
parentbe935e27666d8fdbf387adb1fcc30d243f6359dc (diff)
parent00959d5cf76d4ad94de9d0022b7b40a58acf2b95 (diff)
downloadmpv-e913d6c5dabcf342d8c1a7070382d712fc354948.tar.bz2
mpv-e913d6c5dabcf342d8c1a7070382d712fc354948.tar.xz
Merge svn changes up to r31004
Diffstat (limited to 'libvo/vo_gl2.c')
-rw-r--r--libvo/vo_gl2.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 743289840e..e2cfcf2aff 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -263,11 +263,11 @@ static int initTextures(void)
glBindTexture (GL_TEXTURE_2D, tsq->texobj);
if (is_yuv) {
glGenTextures(2, tsq->uvtexobjs);
- ActiveTexture(GL_TEXTURE1);
+ mpglActiveTexture(GL_TEXTURE1);
glBindTexture (GL_TEXTURE_2D, tsq->uvtexobjs[0]);
- ActiveTexture(GL_TEXTURE2);
+ mpglActiveTexture(GL_TEXTURE2);
glBindTexture (GL_TEXTURE_2D, tsq->uvtexobjs[1]);
- ActiveTexture(GL_TEXTURE0);
+ mpglActiveTexture(GL_TEXTURE0);
}
glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, gl_bitmap_format, gl_bitmap_type, GL_LINEAR,
@@ -277,13 +277,13 @@ static int initTextures(void)
if (is_yuv) {
int xs, ys;
mp_get_chroma_shift(image_format, &xs, &ys);
- ActiveTexture(GL_TEXTURE1);
+ mpglActiveTexture(GL_TEXTURE1);
glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, gl_bitmap_format, gl_bitmap_type, GL_LINEAR,
texture_width >> xs, texture_height >> ys, 128);
- ActiveTexture(GL_TEXTURE2);
+ mpglActiveTexture(GL_TEXTURE2);
glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, gl_bitmap_format, gl_bitmap_type, GL_LINEAR,
texture_width >> xs, texture_height >> ys, 128);
- ActiveTexture(GL_TEXTURE0);
+ mpglActiveTexture(GL_TEXTURE0);
}
tsq++;
@@ -393,11 +393,11 @@ static void drawTextureDisplay (void)
thisw = image_width % texture_width;
glBindTexture (GL_TEXTURE_2D, square->texobj);
if (is_yuv) {
- ActiveTexture(GL_TEXTURE1);
+ mpglActiveTexture(GL_TEXTURE1);
glBindTexture (GL_TEXTURE_2D, square->uvtexobjs[0]);
- ActiveTexture(GL_TEXTURE2);
+ mpglActiveTexture(GL_TEXTURE2);
glBindTexture (GL_TEXTURE_2D, square->uvtexobjs[1]);
- ActiveTexture(GL_TEXTURE0);
+ mpglActiveTexture(GL_TEXTURE0);
}
if (texdirty) {
@@ -566,18 +566,18 @@ static int initGl(uint32_t d_width, uint32_t d_height)
switch (use_yuv) {
case YUV_CONVERSION_FRAGMENT_LOOKUP:
glGenTextures(1, &lookupTex);
- ActiveTexture(GL_TEXTURE3);
+ mpglActiveTexture(GL_TEXTURE3);
glBindTexture(GL_TEXTURE_2D, lookupTex);
- ActiveTexture(GL_TEXTURE0);
+ mpglActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, 0);
case YUV_CONVERSION_FRAGMENT_POW:
case YUV_CONVERSION_FRAGMENT:
- if (!GenPrograms || !BindProgram) {
+ if (!mpglGenPrograms || !mpglBindProgram) {
mp_msg(MSGT_VO, MSGL_ERR, "[gl] fragment program functions missing!\n");
break;
}
- GenPrograms(1, &fragprog);
- BindProgram(GL_FRAGMENT_PROGRAM, fragprog);
+ mpglGenPrograms(1, &fragprog);
+ mpglBindProgram(GL_FRAGMENT_PROGRAM, fragprog);
break;
}
mp_get_chroma_shift(image_format, &xs, &ys);
@@ -752,17 +752,17 @@ static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)
int subtex_w = rem_w;
if (subtex_x + subtex_w > texture_width)
subtex_w = texture_width - subtex_x;
- ActiveTexture(GL_TEXTURE0);
+ mpglActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, tsq->texobj);
glUploadTex(GL_TEXTURE_2D, gl_bitmap_format, gl_bitmap_type,
yptr, ystride, subtex_x, subtex_y,
subtex_w, subtex_h, 0);
- ActiveTexture(GL_TEXTURE1);
+ mpglActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, tsq->uvtexobjs[0]);
glUploadTex(GL_TEXTURE_2D, gl_bitmap_format, gl_bitmap_type,
uptr, ustride, subtex_x >> xs, subtex_y >> ys,
subtex_w >> xs, subtex_h >> ys, 0);
- ActiveTexture(GL_TEXTURE2);
+ mpglActiveTexture(GL_TEXTURE2);
glBindTexture(GL_TEXTURE_2D, tsq->uvtexobjs[1]);
glUploadTex(GL_TEXTURE_2D, gl_bitmap_format, gl_bitmap_type,
vptr, vstride, subtex_x >> xs, subtex_y >> ys,
@@ -781,7 +781,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)
texline += texnumx;
rem_h -= subtex_h;
}
- ActiveTexture(GL_TEXTURE0);
+ mpglActiveTexture(GL_TEXTURE0);
return 0;
}
@@ -874,7 +874,7 @@ static int preinit(const char *arg)
goto err_out;
if (glctx.setGlWindow(&glctx) == SET_WINDOW_FAILED)
goto err_out;
- extensions = GetString(GL_EXTENSIONS);
+ extensions = mpglGetString(GL_EXTENSIONS);
use_yuv = strstr(extensions, "GL_ARB_fragment_program") ? 2 : 0;
}
return 0;