* Make GL_EXT() a noop on OS X, it's not required.

* Conditionalise glMultiDrawArraysFallback since it's not used on OS X.
 * Stub APIENTRY at the top of visual_tool_vector_clip.cpp, this should never be added to a header but at the top of source files.

Originally committed to SVN as r4737.
This commit is contained in:
Amar Takhar 2010-08-13 00:24:35 +00:00
parent ce28cca7c6
commit 61656d633b
2 changed files with 14 additions and 1 deletions

View file

@ -57,12 +57,17 @@ typedef GLuint GLhandleARB;
#define glGetProc(a) glXGetProcAddress((const GLubyte *)(a))
#endif
#if defined(__APPLE__)
// Not required on OS X.
#define GL_EXT(type, name)
#else
#define GL_EXT(type, name) \
static type name = reinterpret_cast<type>(glGetProc(#name)); \
if (!name) { \
name = & name ## Fallback; \
}
#endif
/// DOCME

View file

@ -47,6 +47,11 @@
#include <algorithm>
#endif
#ifdef __APPLE__
/// Noop macro, this should never be defined in a header.
#define APIENTRY
#endif
#include "config.h"
#include "ass_dialogue.h"
@ -112,11 +117,14 @@ void VisualToolVectorClip::SetMode(int newMode) {
}
// Substitute for glMultiDrawArrays for sub-1.4 OpenGL
// Not required on OS X.
#ifndef __APPLE__
static void APIENTRY glMultiDrawArraysFallback(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
for (int i = 0; i < primcount; ++i) {
glDrawArrays(mode, *first++, *count++);
}
}
#endif
static bool is_move(SplineCurve const& c) {
return c.type == CURVE_POINT;