summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2008-11-06 20:41:40 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2008-11-06 20:41:40 +0200
commite46ce9c0ac88cdc3b4604c249576cfde0c5c4946 (patch)
tree6553efdc461e8d81ae2c9a7508b2dec5f116905a /libvo
parente51225dc3135e69d3f0fe6a5502c0c0e77952056 (diff)
parent14eb21fce00bfcab5145140f22bfd706d991c101 (diff)
downloadmpv-e46ce9c0ac88cdc3b4604c249576cfde0c5c4946.tar.bz2
mpv-e46ce9c0ac88cdc3b4604c249576cfde0c5c4946.tar.xz
Merge svn changes up to r27899
Diffstat (limited to 'libvo')
-rw-r--r--libvo/gl_common.c2
-rw-r--r--libvo/gl_common.h34
-rw-r--r--libvo/jpeg_enc.c1
3 files changed, 34 insertions, 3 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 90272f6e80..65592932e6 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -1194,7 +1194,7 @@ static void glSetupYUVFragprog(gl_conversion_params_t *params) {
memcpy(chrom_scale_texs, lum_scale_texs, sizeof(chrom_scale_texs));
else
create_scaler_textures(YUV_CHROM_SCALER(type), &cur_texu, chrom_scale_texs);
- glGetIntegerv(GL_MAX_TEXTURE_UNITS, &i);
+ glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &i);
if (i < cur_texu)
mp_msg(MSGT_VO, MSGL_ERR,
"[gl] %i texture units needed for this type of YUV fragment support (found %i)\n",
diff --git a/libvo/gl_common.h b/libvo/gl_common.h
index 1f1b73cca9..fbcd49db88 100644
--- a/libvo/gl_common.h
+++ b/libvo/gl_common.h
@@ -7,14 +7,14 @@
#include "config.h"
#include "mp_msg.h"
-#include <GL/gl.h>
#include "video_out.h"
#ifdef GL_WIN32
#include <windows.h>
-#include <GL/glext.h>
+#include <GL/gl.h>
#include "w32_common.h"
#else
+#include <GL/gl.h>
#include <X11/Xlib.h>
#include <GL/glx.h>
#include "x11_common.h"
@@ -39,6 +39,15 @@
* (e.g. _NV), _ARB is not used to ease readability.
* \{
*/
+#ifndef GL_TEXTURE_3D
+#define GL_TEXTURE_3D 0x806F
+#endif
+#ifndef GL_TEXTURE_WRAP_R
+#define GL_TEXTURE_WRAP_R 0x8072
+#endif
+#ifndef GL_CLAMP_TO_EDGE
+#define GL_CLAMP_TO_EDGE 0x812F
+#endif
#ifndef GL_REGISTER_COMBINERS_NV
#define GL_REGISTER_COMBINERS_NV 0x8522
#endif
@@ -171,12 +180,30 @@
#ifndef GL_UNSIGNED_BYTE_2_3_3_REV
#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
#endif
+#ifndef GL_UNSIGNED_SHORT_4_4_4_4
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#endif
+#ifndef GL_UNSIGNED_SHORT_4_4_4_4_REV
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
+#endif
#ifndef GL_UNSIGNED_SHORT_5_6_5
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
#endif
+#ifndef GL_UNSIGNED_INT_8_8_8_8
+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
+#endif
+#ifndef GL_UNSIGNED_INT_8_8_8_8_REV
+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
+#endif
#ifndef GL_UNSIGNED_SHORT_5_6_5_REV
#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
#endif
+#ifndef GL_UNSIGNED_INT_10_10_10_2
+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
+#endif
+#ifndef GL_UNSIGNED_INT_2_10_10_10_REV
+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
+#endif
#ifndef GL_UNSIGNED_SHORT_5_5_5_1
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
#endif
@@ -198,6 +225,9 @@
#ifndef GL_PROGRAM_ERROR_POSITION
#define GL_PROGRAM_ERROR_POSITION 0x864B
#endif
+#ifndef GL_MAX_TEXTURE_IMAGE_UNITS
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#endif
#ifndef GL_PROGRAM_ERROR_STRING
#define GL_PROGRAM_ERROR_STRING 0x8874
#endif
diff --git a/libvo/jpeg_enc.c b/libvo/jpeg_enc.c
index f4edc4b265..a0f76ee6d2 100644
--- a/libvo/jpeg_enc.c
+++ b/libvo/jpeg_enc.c
@@ -30,6 +30,7 @@
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "config.h"
#include "mp_msg.h"
/* We need this #define because we need ../libavcodec/common.h to #define