cocos2d-x  3.0-rc0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OpenGL_Internal.h File Reference
#include "CCPlatformConfig.h"

Macros

#define REPORT_ERROR(__FORMAT__,...)   printf("%s: %s\n", __FUNCTION__, [[NSString stringWithFormat:__FORMAT__, __VA_ARGS__] UTF8String])
#define CALL_EAGL_FUNCTION(__FUNC__,...)   ({ EAGLError __error = __FUNC__( __VA_ARGS__ ); if(__error != kEAGLErrorSuccess) printf("%s() called from %s returned error %i\n", #__FUNC__, __FUNCTION__, __error); (__error ? NO : YES); })
#define CHECK_GL_ERROR()   ({ GLenum __error = glGetError(); if(__error) printf("OpenGL error 0x%04X in %s %d\n", __error, __FUNCTION__, __LINE__); })
#define __DELEGATE_IVAR__   _delegate
#define __DELEGATE_METHODS_IVAR__   _delegateMethods
#define TEST_DELEGATE_METHOD_BIT(__BIT__)   (self->__DELEGATE_METHODS_IVAR__ & (1 << __BIT__))
#define SET_DELEGATE_METHOD_BIT(__BIT__, __NAME__)   { if([self->__DELEGATE_IVAR__ respondsToSelector:@selector(__NAME__)]) self->__DELEGATE_METHODS_IVAR__ |= (1 << __BIT__); else self->__DELEGATE_METHODS_IVAR__ &= ~(1 << __BIT__); }

Macro Definition Documentation

#define __DELEGATE_IVAR__   _delegate
var __DELEGATE_IVAR__   _delegate
local __DELEGATE_IVAR__   _delegate
#define __DELEGATE_METHODS_IVAR__   _delegateMethods
var __DELEGATE_METHODS_IVAR__   _delegateMethods
local __DELEGATE_METHODS_IVAR__   _delegateMethods
#define CALL_EAGL_FUNCTION (   __FUNC__,
  ... 
)    ({ EAGLError __error = __FUNC__( __VA_ARGS__ ); if(__error != kEAGLErrorSuccess) printf("%s() called from %s returned error %i\n", #__FUNC__, __FUNCTION__, __error); (__error ? NO : YES); })
var CALL_EAGL_FUNCTION (   var,
  ... 
)    ({ EAGLError __error = __FUNC__( __VA_ARGS__ ); if(__error != kEAGLErrorSuccess) printf("%s() called from %s returned error %i\n", #__FUNC__, __FUNCTION__, __error); (__error ? NO : YES); })
local CALL_EAGL_FUNCTION (   local,
  ... 
)    ({ EAGLError __error = __FUNC__( __VA_ARGS__ ); if(__error != kEAGLErrorSuccess) printf("%s() called from %s returned error %i\n", #__FUNC__, __FUNCTION__, __error); (__error ? NO : YES); })
#define CHECK_GL_ERROR ( )    ({ GLenum __error = glGetError(); if(__error) printf("OpenGL error 0x%04X in %s %d\n", __error, __FUNCTION__, __LINE__); })
var CHECK_GL_ERROR ( )    ({ GLenum __error = glGetError(); if(__error) printf("OpenGL error 0x%04X in %s %d\n", __error, __FUNCTION__, __LINE__); })
local CHECK_GL_ERROR ( )    ({ GLenum __error = glGetError(); if(__error) printf("OpenGL error 0x%04X in %s %d\n", __error, __FUNCTION__, __LINE__); })
#define REPORT_ERROR (   __FORMAT__,
  ... 
)    printf("%s: %s\n", __FUNCTION__, [[NSString stringWithFormat:__FORMAT__, __VA_ARGS__] UTF8String])
var REPORT_ERROR (   var,
  ... 
)    printf("%s: %s\n", __FUNCTION__, [[NSString stringWithFormat:__FORMAT__, __VA_ARGS__] UTF8String])
local REPORT_ERROR (   local,
  ... 
)    printf("%s: %s\n", __FUNCTION__, [[NSString stringWithFormat:__FORMAT__, __VA_ARGS__] UTF8String])
#define SET_DELEGATE_METHOD_BIT (   __BIT__,
  __NAME__ 
)    { if([self->__DELEGATE_IVAR__ respondsToSelector:@selector(__NAME__)]) self->__DELEGATE_METHODS_IVAR__ |= (1 << __BIT__); else self->__DELEGATE_METHODS_IVAR__ &= ~(1 << __BIT__); }
var SET_DELEGATE_METHOD_BIT (   var,
  var 
)    { if([self->__DELEGATE_IVAR__ respondsToSelector:@selector(__NAME__)]) self->__DELEGATE_METHODS_IVAR__ |= (1 << __BIT__); else self->__DELEGATE_METHODS_IVAR__ &= ~(1 << __BIT__); }
local SET_DELEGATE_METHOD_BIT (   local,
  local 
)    { if([self->__DELEGATE_IVAR__ respondsToSelector:@selector(__NAME__)]) self->__DELEGATE_METHODS_IVAR__ |= (1 << __BIT__); else self->__DELEGATE_METHODS_IVAR__ &= ~(1 << __BIT__); }
#define TEST_DELEGATE_METHOD_BIT (   __BIT__)    (self->__DELEGATE_METHODS_IVAR__ & (1 << __BIT__))
var TEST_DELEGATE_METHOD_BIT (   var)    (self->__DELEGATE_METHODS_IVAR__ & (1 << __BIT__))
local TEST_DELEGATE_METHOD_BIT (   local)    (self->__DELEGATE_METHODS_IVAR__ & (1 << __BIT__))