diff --git a/cocos2dx/platform/CCGL.h b/cocos2dx/platform/CCGL.h index f9bd8578ee..cde01e0088 100644 --- a/cocos2dx/platform/CCGL.h +++ b/cocos2dx/platform/CCGL.h @@ -34,7 +34,7 @@ THE SOFTWARE. #define CC_GLVIEW cocos2d::CCEGLView #define ccglOrtho glOrthof #define ccglClearDepth glClearDepthf -#if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) || (CC_TARGET_PLATFORM == CC_PLATFORM_BADA) +#if (CC_TARGET_PLATFORM == CC_PLATFORM_QNX) || defined(CC_BADA_2_0) #define ccglGenerateMipmap CCEGLView::glGenerateMipmapOES #define ccglGenFramebuffers CCEGLView::glGenFramebuffersOES #define ccglBindFramebuffer CCEGLView::glBindFramebufferOES diff --git a/cocos2dx/platform/bada/CCEGLView_bada.cpp b/cocos2dx/platform/bada/CCEGLView_bada.cpp index f6a4524f09..44b8216332 100644 --- a/cocos2dx/platform/bada/CCEGLView_bada.cpp +++ b/cocos2dx/platform/bada/CCEGLView_bada.cpp @@ -173,14 +173,14 @@ private: ////////////////////////////////////////////////////////////////////////// // impliment CCEGLView ////////////////////////////////////////////////////////////////////////// - +#ifdef CC_BADA_2_0 PFNGLGENERATEMIPMAPOESPROC CCEGLView::glGenerateMipmapOES = 0; PFNGLGENFRAMEBUFFERSOESPROC CCEGLView::glGenFramebuffersOES = 0; PFNGLBINDFRAMEBUFFEROESPROC CCEGLView::glBindFramebufferOES = 0; PFNGLFRAMEBUFFERTEXTURE2DOESPROC CCEGLView::glFramebufferTexture2DOES = 0; PFNGLDELETEFRAMEBUFFERSOESPROC CCEGLView::glDeleteFramebuffersOES = 0; PFNGLCHECKFRAMEBUFFERSTATUSOESPROC CCEGLView::glCheckFramebufferStatusOES = 0; - +#endif CCEGLView::CCEGLView() : m_pKeypad(null) , m_bNotHVGA(true) @@ -189,13 +189,14 @@ CCEGLView::CCEGLView() , m_bCaptured(false) , m_pEGL(NULL) { +#ifdef CC_BADA_2_0 glGenerateMipmapOES = (PFNGLGENERATEMIPMAPOESPROC)eglGetProcAddress("glGenerateMipmapOES"); glGenFramebuffersOES = (PFNGLGENFRAMEBUFFERSOESPROC)eglGetProcAddress("glGenFramebuffersOES"); glBindFramebufferOES = (PFNGLBINDFRAMEBUFFEROESPROC)eglGetProcAddress("glBindFramebufferOES"); glFramebufferTexture2DOES = (PFNGLFRAMEBUFFERTEXTURE2DOESPROC)eglGetProcAddress("glFramebufferTexture2DOES"); glDeleteFramebuffersOES = (PFNGLDELETEFRAMEBUFFERSOESPROC)eglGetProcAddress("glDeleteFramebuffersOES"); glCheckFramebufferStatusOES = (PFNGLCHECKFRAMEBUFFERSTATUSOESPROC)eglGetProcAddress("glCheckFramebufferStatusOES"); - +#endif m_pTouch = new CCTouch; m_pSet = new CCSet; m_eInitOrientation = CCDirector::sharedDirector()->getDeviceOrientation(); diff --git a/cocos2dx/platform/bada/CCEGLView_bada.h b/cocos2dx/platform/bada/CCEGLView_bada.h index 15aed1cb65..5de3597f7f 100644 --- a/cocos2dx/platform/bada/CCEGLView_bada.h +++ b/cocos2dx/platform/bada/CCEGLView_bada.h @@ -117,6 +117,7 @@ public: virtual void OnTextValueChanged(const Osp::Ui::Control& source); virtual void OnTextValueChangeCanceled(const Osp::Ui::Control& source); +#ifdef CC_BADA_2_0 // pointer to OES methods from EGL static PFNGLGENERATEMIPMAPOESPROC glGenerateMipmapOES; static PFNGLGENFRAMEBUFFERSOESPROC glGenFramebuffersOES; @@ -124,6 +125,7 @@ public: static PFNGLFRAMEBUFFERTEXTURE2DOESPROC glFramebufferTexture2DOES; static PFNGLDELETEFRAMEBUFFERSOESPROC glDeleteFramebuffersOES; static PFNGLCHECKFRAMEBUFFERSTATUSOESPROC glCheckFramebufferStatusOES; +#endif private: Osp::Ui::Controls::Keypad *m_pKeypad;