mac: C4Particles: glGenVertexArrays fix for Mac OS X

stable-5.4
Martin Plicht 2014-01-11 15:44:40 +01:00
parent 010f8c97eb
commit 3d9c965ebd
3 changed files with 14 additions and 0 deletions

View File

@ -13,6 +13,8 @@
* See clonk_trademark_license.txt for full license.
*/
#include <GL/glew.h>
#include <C4Include.h>
#include <C4Console.h>
#include <C4Application.h>

View File

@ -13,6 +13,8 @@
* See clonk_trademark_license.txt for full license.
*/
#include <GL/glew.h>
#include <C4Include.h>
#include <C4Console.h>
#include <C4Player.h>

View File

@ -932,6 +932,16 @@ bool C4ParticleChunk::Exec(C4Object *obj, float timeDelta)
return particleCount > 0;
}
#if defined(__APPLE__)
#undef glGenVertexArrays
#undef glBindVertexArray
#undef glDeleteVertexArrays
#define glGenVertexArrays glGenVertexArraysAPPLE
#define glBindVertexArray glBindVertexArrayAPPLE
#define glDeleteVertexArrays glDeleteVertexArraysAPPLE
#endif
void C4ParticleChunk::Draw(C4TargetFacet cgo, C4Object *obj)
{
if (particleCount == 0) return;