2012-03-15 23:58:37 +00:00
|
|
|
//
|
|
|
|
|
// KREngine-common.h
|
|
|
|
|
// KREngine
|
|
|
|
|
//
|
|
|
|
|
// Created by Kearwood Gilbert on 12-03-15.
|
|
|
|
|
// Copyright (c) 2012 Kearwood Software. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef KREngine_KREngine_common_h
|
|
|
|
|
#define KREngine_KREngine_common_h
|
|
|
|
|
|
2012-10-19 23:17:43 +00:00
|
|
|
#define KRENGINE_MAX_TEXTURE_UNITS 8
|
|
|
|
|
|
2012-03-15 23:58:37 +00:00
|
|
|
#import <stdint.h>
|
|
|
|
|
#import <vector>
|
|
|
|
|
#import <string>
|
2012-08-15 21:26:06 +00:00
|
|
|
#import <set>
|
2012-08-23 16:55:46 +00:00
|
|
|
#import <list>
|
2012-03-15 23:58:37 +00:00
|
|
|
|
|
|
|
|
#ifdef __APPLE__
|
|
|
|
|
#include "TargetConditionals.h"
|
2012-10-25 03:15:28 +00:00
|
|
|
#import <Accelerate/Accelerate.h>
|
2012-03-15 23:58:37 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if TARGET_OS_IPHONE
|
|
|
|
|
|
|
|
|
|
#import <OpenGLES/ES2/gl.h>
|
|
|
|
|
#import <OpenGLES/ES2/glext.h>
|
|
|
|
|
|
2012-10-25 03:15:28 +00:00
|
|
|
|
2012-03-15 23:58:37 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
#import <OpenGL/gl.h>
|
|
|
|
|
#import <OpenGL/glext.h>
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
2012-09-13 20:09:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#define GLDEBUG(x) \
|
|
|
|
|
x; \
|
|
|
|
|
{ \
|
|
|
|
|
GLenum e; \
|
|
|
|
|
while( (e=glGetError()) != GL_NO_ERROR) \
|
|
|
|
|
{ \
|
|
|
|
|
fprintf(stderr, "Error at line number %d, in file %s. glGetError() returned %i for call %s\n",__LINE__, __FILE__, e, #x ); \
|
|
|
|
|
} \
|
|
|
|
|
}
|