mirror of https://github.com/axmolengine/axmol.git
fixed #938:Don't use eglGetProcAddress to get extension function on bada1.0 device, otherwise it will cause crash.
This commit is contained in:
parent
259aaf42a6
commit
4cc1658d45
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue