summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-16 17:57:53 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-16 17:57:53 +0000
commit44ec3f7566a1dcfc7cb392226c30d05bb0793204 (patch)
treea0f7c71e0a5f1fe4b555aa7777c6f42326bcb21e /libvo/gl_common.c
parent1d720784bd086d77059ad207066e6d312444688d (diff)
downloadmpv-44ec3f7566a1dcfc7cb392226c30d05bb0793204.tar.bz2
mpv-44ec3f7566a1dcfc7cb392226c30d05bb0793204.tar.xz
use GenBuffers to get a buffer number instead of hardcoding 1.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16234 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 78aa26e872..4139bd9de0 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -2,6 +2,8 @@
#include <string.h>
#include "gl_common.h"
+void (APIENTRY *GenBuffers)(GLsizei, GLuint *);
+void (APIENTRY *DeleteBuffers)(GLsizei, const GLuint *);
void (APIENTRY *BindBuffer)(GLenum, GLuint);
GLvoid* (APIENTRY *MapBuffer)(GLenum, GLenum);
GLboolean (APIENTRY *UnmapBuffer)(GLenum);
@@ -203,6 +205,12 @@ static void *(*getProcAddress)(const GLubyte *procName) = NULL;
static void getFunctions() {
if (!getProcAddress)
getProcAddress = setNull;
+ GenBuffers = getProcAddress("glGenBuffers");
+ if (!GenBuffers)
+ GenBuffers = getProcAddress("glGenBuffersARB");
+ DeleteBuffers = getProcAddress("glDeleteBuffers");
+ if (!DeleteBuffers)
+ DeleteBuffers = getProcAddress("glDeleteBuffersARB");
BindBuffer = getProcAddress("glBindBuffer");
if (!BindBuffer)
BindBuffer = getProcAddress("glBindBufferARB");