Page 1 of 1

a error with cocos2dx

PostPosted: Thu Aug 28, 2014 7:16 am
by muhoor
when i set "Preprocessor Definitions" COCOS_2DX" and "MAGIC_3D",mp_wrap.ccp notice "DIST_CAMERA_3D" is not define in line 779.

i have to add "#define DIST_CAMERA_3D xxx" to mp_wrap.h,and it works

Code: Select all
#if (CC_TARGET_PLATFORM==CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM==CC_PLATFORM_ANDROID)
   #define internalformat GL_RGBA
   #define DIST_CAMERA_3D  -2520 //(added)
#else
   #define internalformat GL_RGBA8
   #define DIST_CAMERA_3D  -840 //(added)
#endif

Re: a error with cocos2dx

PostPosted: Thu Aug 28, 2014 5:55 pm
by Odin_KG
MAGIC_3D is used for 3D version of API. Cocos2dx works with 2D version only. You need to delete MAGIC_3D from "Preprocessor Definitions". OPENGL_SHADER is needed for Cocos2dx.