mirror of https://github.com/axmolengine/axmol.git
Renames EGLView -> GLView
This commit is contained in:
parent
862500f99a
commit
7da8c84a75
|
@ -1 +1 @@
|
|||
898070abcd006587b46928f7d5804fcec1e5ff4b
|
||||
be9f283a24f020011a1dedfd59ddd6e01da16e3d
|
|
@ -111,7 +111,7 @@ cocos2d.cpp \
|
|||
TGAlib.cpp \
|
||||
TransformUtils.cpp \
|
||||
ZipUtils.cpp \
|
||||
platform/CCEGLViewProtocol.cpp \
|
||||
platform/CCGLViewProtocol.cpp \
|
||||
platform/CCFileUtils.cpp \
|
||||
platform/CCSAXParser.cpp \
|
||||
platform/CCThread.cpp \
|
||||
|
|
|
@ -55,7 +55,7 @@ THE SOFTWARE.
|
|||
#include "kazmath/GL/matrix.h"
|
||||
#include "CCProfiling.h"
|
||||
#include "platform/CCImage.h"
|
||||
#include "CCEGLView.h"
|
||||
#include "CCGLView.h"
|
||||
#include "CCConfiguration.h"
|
||||
#include "CCEventDispatcher.h"
|
||||
#include "CCEventCustom.h"
|
||||
|
|
|
@ -26,7 +26,7 @@ THE SOFTWARE.
|
|||
#include "CCTextFieldTTF.h"
|
||||
|
||||
#include "CCDirector.h"
|
||||
#include "CCEGLView.h"
|
||||
#include "CCGLView.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ set(PLATFORM_SRC
|
|||
platform/win32/CCFileUtilsWin32.cpp
|
||||
platform/win32/CCCommon.cpp
|
||||
platform/win32/CCApplication.cpp
|
||||
platform/win32/CCEGLView.cpp
|
||||
platform/win32/CCGLView.cpp
|
||||
platform/win32/CCImage.cpp
|
||||
platform/win32/CCDevice.cpp
|
||||
)
|
||||
|
@ -21,7 +21,7 @@ set(PLATFORM_SRC
|
|||
platform/linux/CCFileUtilsLinux.cpp
|
||||
platform/linux/CCCommon.cpp
|
||||
platform/linux/CCApplication.cpp
|
||||
platform/desktop/CCEGLView.cpp
|
||||
platform/desktop/CCGLView.cpp
|
||||
platform/linux/CCImage.cpp
|
||||
platform/linux/CCDevice.cpp
|
||||
)
|
||||
|
@ -134,7 +134,7 @@ set(COCOS2D_SRC
|
|||
CCDeprecated.cpp
|
||||
platform/CCSAXParser.cpp
|
||||
platform/CCThread.cpp
|
||||
platform/CCEGLViewProtocol.cpp
|
||||
platform/CCGLViewProtocol.cpp
|
||||
platform/CCFileUtils.cpp
|
||||
../../external/edtaa3func/edtaa3func.cpp
|
||||
renderer/CCCustomCommand.cpp
|
||||
|
|
|
@ -154,42 +154,42 @@ THE SOFTWARE.
|
|||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
#include "platform/ios/CCApplication.h"
|
||||
#include "platform/ios/CCEGLView.h"
|
||||
#include "platform/ios/CCGLView.h"
|
||||
#include "platform/ios/CCGL.h"
|
||||
#include "platform/ios/CCStdC.h"
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
#include "platform/android/CCApplication.h"
|
||||
#include "platform/android/CCEGLView.h"
|
||||
#include "platform/android/CCGLView.h"
|
||||
#include "platform/android/CCGL.h"
|
||||
#include "platform/android/CCStdC.h"
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY)
|
||||
#include "platform/blackberry/CCApplication.h"
|
||||
#include "platform/blackberry/CCEGLView.h"
|
||||
#include "platform/blackberry/CCGLView.h"
|
||||
#include "platform/blackberry/CCGL.h"
|
||||
#include "platform/blackberry/CCStdC.h"
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
||||
#include "platform/win32/CCApplication.h"
|
||||
#include "platform/desktop/CCEGLView.h"
|
||||
#include "platform/desktop/CCGLView.h"
|
||||
#include "platform/win32/CCGL.h"
|
||||
#include "platform/win32/CCStdC.h"
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
|
||||
#include "platform/mac/CCApplication.h"
|
||||
#include "platform/desktop/CCEGLView.h"
|
||||
#include "platform/desktop/CCGLView.h"
|
||||
#include "platform/mac/CCGL.h"
|
||||
#include "platform/mac/CCStdC.h"
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
|
||||
#include "platform/linux/CCApplication.h"
|
||||
#include "platform/desktop/CCEGLView.h"
|
||||
#include "platform/desktop/CCGLView.h"
|
||||
#include "platform/linux/CCGL.h"
|
||||
#include "platform/linux/CCStdC.h"
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||
|
|
|
@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCEGLViewProtocol.h"
|
||||
#include "CCGLViewProtocol.h"
|
||||
#include "CCTouch.h"
|
||||
#include "CCDirector.h"
|
||||
#include "CCSet.h"
|
|
@ -10,7 +10,7 @@ LOCAL_SRC_FILES := \
|
|||
CCApplication.cpp \
|
||||
CCCommon.cpp \
|
||||
CCDevice.cpp \
|
||||
CCEGLView.cpp \
|
||||
CCGLView.cpp \
|
||||
CCFileUtilsAndroid.cpp \
|
||||
CCImage.cpp \
|
||||
nativeactivity.cpp \
|
||||
|
|
|
@ -22,11 +22,15 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "jni/JniHelper.h"
|
||||
#include "jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h"
|
||||
#include "CCApplication.h"
|
||||
#include "CCDirector.h"
|
||||
#include "CCEGLView.h"
|
||||
#include "CCGLView.h"
|
||||
#include <android/log.h>
|
||||
#include <jni.h>
|
||||
#include <cstring>
|
||||
|
@ -161,3 +165,6 @@ void Application::applicationScreenSizeChanged(int newWidth, int newHeight) {
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
|
|
|
@ -22,9 +22,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CC_APPLICATION_ANDROID_H__
|
||||
#define __CC_APPLICATION_ANDROID_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "platform/CCCommon.h"
|
||||
#include "platform/CCApplicationProtocol.h"
|
||||
|
||||
|
@ -87,4 +91,6 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif // __CC_APPLICATION_ANDROID_H__
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#endif // __CC_APPLICATION_ANDROID_H__
|
||||
|
|
|
@ -23,6 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "platform/CCCommon.h"
|
||||
#include "jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h"
|
||||
#include <android/log.h>
|
||||
|
@ -44,3 +47,6 @@ void LuaLog(const char * pszFormat)
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "platform/CCDevice.h"
|
||||
#include "jni/DPIJni.h"
|
||||
#include "nativeactivity.h"
|
||||
|
@ -56,3 +60,6 @@ void Device::setAccelerometerInterval(float interval)
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "CCFileUtilsAndroid.h"
|
||||
#include "platform/CCCommon.h"
|
||||
#include "jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h"
|
||||
|
@ -353,3 +357,5 @@ string FileUtilsAndroid::getWritablePath() const
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
|
|
@ -25,6 +25,9 @@ Copyright (c) 2013-2014 Chukong Technologies Inc.
|
|||
#ifndef __CC_FILEUTILS_ANDROID_H__
|
||||
#define __CC_FILEUTILS_ANDROID_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "CCPlatformMacros.h"
|
||||
#include "ccTypes.h"
|
||||
|
@ -86,4 +89,6 @@ private:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif // __CC_FILEUTILS_ANDROID_H__
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#endif // __CC_FILEUTILS_ANDROID_H__
|
||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CCGL_H__
|
||||
#define __CCGL_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#define glClearDepth glClearDepthf
|
||||
#define glDeleteVertexArrays glDeleteVertexArraysOES
|
||||
#define glGenVertexArrays glGenVertexArraysOES
|
||||
|
@ -63,4 +66,6 @@ extern PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT;
|
|||
#define glDeleteVertexArraysOES glDeleteVertexArraysOESEXT
|
||||
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#endif // __CCGL_H__
|
||||
|
|
|
@ -22,7 +22,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "CCEGLView.h"
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "CCGLView.h"
|
||||
#include "CCSet.h"
|
||||
#include "CCDirector.h"
|
||||
#include "ccMacros.h"
|
||||
|
@ -48,9 +52,9 @@ void initExtensions() {
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
EGLView* EGLView::createWithSize(const std::string& viewName, Size size, float frameZoomFactor)
|
||||
GLView* GLView::createWithSize(const std::string& viewName, Size size, float frameZoomFactor)
|
||||
{
|
||||
auto ret = new EGLView;
|
||||
auto ret = new GLView;
|
||||
if(ret && ret->initWithSize(viewName, size, frameZoomFactor)) {
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -59,9 +63,9 @@ EGLView* EGLView::createWithSize(const std::string& viewName, Size size, float f
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
EGLView* EGLView::create(const std::string& viewName)
|
||||
GLView* GLView::create(const std::string& viewName)
|
||||
{
|
||||
auto ret = new EGLView;
|
||||
auto ret = new GLView;
|
||||
if(ret && ret->initWithSize(viewName, Size(0,0), 0)) {
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -70,9 +74,9 @@ EGLView* EGLView::create(const std::string& viewName)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
EGLView* EGLView::createWithFullScreen(const std::string& viewName)
|
||||
GLView* GLView::createWithFullScreen(const std::string& viewName)
|
||||
{
|
||||
auto ret = new EGLView();
|
||||
auto ret = new GLView();
|
||||
if(ret && ret->initWithFullScreen(viewName)) {
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
|
@ -81,45 +85,46 @@ EGLView* EGLView::createWithFullScreen(const std::string& viewName)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
EGLView::EGLView()
|
||||
GLView::GLView()
|
||||
{
|
||||
initExtensions();
|
||||
}
|
||||
|
||||
EGLView::~EGLView()
|
||||
GLView::~GLView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool EGLView::initWithSize(const std::string& viewName, Size size, float frameZoomFactor)
|
||||
bool GLView::initWithSize(const std::string& viewName, Size size, float frameZoomFactor)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EGLView::initWithFullScreen(const std::string& viewName)
|
||||
bool GLView::initWithFullScreen(const std::string& viewName)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool EGLView::isOpenGLReady()
|
||||
bool GLView::isOpenGLReady()
|
||||
{
|
||||
return (_screenSize.width != 0 && _screenSize.height != 0);
|
||||
}
|
||||
|
||||
void EGLView::end()
|
||||
void GLView::end()
|
||||
{
|
||||
terminateProcessJNI();
|
||||
}
|
||||
|
||||
void EGLView::swapBuffers()
|
||||
void GLView::swapBuffers()
|
||||
{
|
||||
}
|
||||
|
||||
void EGLView::setIMEKeyboardState(bool bOpen)
|
||||
void GLView::setIMEKeyboardState(bool bOpen)
|
||||
{
|
||||
setKeyboardStateJNI((int)bOpen);
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
|
@ -26,20 +26,23 @@ THE SOFTWARE.
|
|||
#ifndef __CC_EGLVIEW_ANDROID_H__
|
||||
#define __CC_EGLVIEW_ANDROID_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "CCObject.h"
|
||||
#include "CCGeometry.h"
|
||||
#include "platform/CCEGLViewProtocol.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class CC_DLL EGLView : public Object, public EGLViewProtocol
|
||||
class CC_DLL GLView : public Object, public GLViewProtocol
|
||||
{
|
||||
public:
|
||||
|
||||
// static function
|
||||
static EGLView* create(const std::string &viewname);
|
||||
static EGLView* createWithSize(const std::string& viewName, Size size, float frameZoomFactor = 1.0f);
|
||||
static EGLView* createWithFullScreen(const std::string& viewName);
|
||||
static GLView* create(const std::string &viewname);
|
||||
static GLView* createWithSize(const std::string& viewName, Size size, float frameZoomFactor = 1.0f);
|
||||
static GLView* createWithFullScreen(const std::string& viewName);
|
||||
|
||||
bool isOpenGLReady() override;
|
||||
void end() override;
|
||||
|
@ -47,8 +50,8 @@ public:
|
|||
void setIMEKeyboardState(bool bOpen) override;
|
||||
|
||||
protected:
|
||||
EGLView();
|
||||
virtual ~EGLView();
|
||||
GLView();
|
||||
virtual ~GLView();
|
||||
|
||||
bool initWithSize(const std::string& viewName, Size size, float frameZoomFactor);
|
||||
bool initWithFullScreen(const std::string& viewName);
|
||||
|
@ -56,4 +59,7 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#endif // end of __CC_EGLVIEW_ANDROID_H__
|
||||
|
|
@ -23,7 +23,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
//#define COCOS2D_DEBUG 1
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#define __CC_PLATFORM_IMAGE_CPP__
|
||||
#include "platform/CCImageCommon_cpp.h"
|
||||
|
@ -246,3 +247,5 @@ extern "C"
|
|||
env->GetByteArrayRegion(pixels, 0, size, (jbyte*)bitmapDC._data);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CCPLATFORMDEFINE_H__
|
||||
#define __CCPLATFORMDEFINE_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "android/log.h"
|
||||
|
||||
#define CC_DLL
|
||||
|
@ -59,4 +62,6 @@ THE SOFTWARE.
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#endif /* __CCPLATFORMDEFINE_H__*/
|
||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CC_STD_C_H__
|
||||
#define __CC_STD_C_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "CCPlatformMacros.h"
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
|
@ -45,4 +48,6 @@ THE SOFTWARE.
|
|||
#define MAX(x,y) (((x) < (y)) ? (y) : (x))
|
||||
#endif // MAX
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#endif // __CC_STD_C_H__
|
||||
|
|
|
@ -21,6 +21,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#include "nativeactivity.h"
|
||||
|
||||
#include <jni.h>
|
||||
|
@ -43,7 +47,7 @@ THE SOFTWARE.
|
|||
#include "CCFileUtilsAndroid.h"
|
||||
#include "jni/JniHelper.h"
|
||||
|
||||
#include "CCEGLView.h"
|
||||
#include "CCGLView.h"
|
||||
#include "CCDrawingPrimitives.h"
|
||||
#include "CCShaderCache.h"
|
||||
#include "CCTextureCache.h"
|
||||
|
@ -755,3 +759,5 @@ void android_main(struct android_app* state) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
|
|
@ -24,6 +24,9 @@ THE SOFTWARE.
|
|||
#ifndef __COCOSNATIVEACTIVITY_H__
|
||||
#define __COCOSNATIVEACTIVITY_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
/**
|
||||
* This is the interface to the Android native activity
|
||||
*/
|
||||
|
@ -32,4 +35,6 @@ void enableAccelerometerJni(void);
|
|||
void disableAccelerometerJni(void);
|
||||
void setAccelerometerIntervalJni(float interval);
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#endif // __COCOSNATIVEACTIVITY_H__
|
||||
|
|
|
@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCEGLView.h"
|
||||
#include "CCGLView.h"
|
||||
|
||||
#include <unordered_map>
|
||||
|
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "CCObject.h"
|
||||
#include "platform/CCCommon.h"
|
||||
#include "platform/CCEGLViewProtocol.h"
|
||||
#include "platform/CCGLViewProtocol.h"
|
||||
#include "glfw3.h"
|
||||
|
||||
NS_CC_BEGIN
|
|
@ -65,7 +65,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
||||
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import "CCEGLView.h"
|
||||
#import "CCGLView.h"
|
||||
#import "CCEAGLView.h"
|
||||
#import "CCES2Renderer.h"
|
||||
#import "CCDirector.h"
|
||||
|
@ -73,7 +73,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
#import "CCTouch.h"
|
||||
#import "CCIMEDispatcher.h"
|
||||
#import "OpenGL_Internal.h"
|
||||
#import "CCEGLView.h"
|
||||
#import "CCGLView.h"
|
||||
//CLASS IMPLEMENTATIONS:
|
||||
|
||||
#define IOS_MAX_TOUCHES_COUNT 10
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include "CCObject.h"
|
||||
#include "platform/CCCommon.h"
|
||||
#include "platform/CCEGLViewProtocol.h"
|
||||
#include "platform/CCGLViewProtocol.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include "CCEAGLView.h"
|
||||
#include "CCDirectorCaller.h"
|
||||
#include "CCEGLView.h"
|
||||
#include "CCGLView.h"
|
||||
#include "CCSet.h"
|
||||
#include "CCTouch.h"
|
||||
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CC_APPLICATION_MAC_H__
|
||||
#define __CC_APPLICATION_MAC_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#include "platform/CCCommon.h"
|
||||
#include "platform/CCApplicationProtocol.h"
|
||||
#include <string>
|
||||
|
@ -107,4 +110,6 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#endif // end of __CC_APPLICATION_MAC_H__;
|
||||
|
|
|
@ -23,6 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#import "CCApplication.h"
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <algorithm>
|
||||
|
@ -30,7 +33,7 @@ THE SOFTWARE.
|
|||
#include "CCGeometry.h"
|
||||
#include "CCDirector.h"
|
||||
#import "CCDirectorCaller.h"
|
||||
#include "CCEGLView.h"
|
||||
#include "CCGLView.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -192,3 +195,5 @@ const std::string& Application::getStartupScriptFilename(void)
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
|
|
@ -22,10 +22,14 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#include "platform/CCCommon.h"
|
||||
|
||||
#include "CCDirector.h"
|
||||
#include "CCEGLView.h"
|
||||
#include "CCGLView.h"
|
||||
|
||||
#define GLFW_EXPOSE_NATIVE_NSGL
|
||||
#define GLFW_EXPOSE_NATIVE_COCOA
|
||||
|
@ -63,3 +67,6 @@ void MessageBox(const char * msg, const char * title)
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#include "platform/CCDevice.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -43,3 +47,5 @@ void Device::setAccelerometerInterval(float interval)
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
|
|
@ -22,6 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <QuartzCore/CVDisplayLink.h>
|
||||
|
||||
|
@ -38,3 +42,5 @@ THE SOFTWARE.
|
|||
|
||||
+(id) sharedDirectorCaller;
|
||||
@end
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
|
|
@ -23,6 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#import "CCDirectorCaller.h"
|
||||
#include "CCDirector.h"
|
||||
#include "CCAutoreleasePool.h"
|
||||
|
@ -200,3 +203,5 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif //s CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __PLATFORM_MAC_CCGL_H__
|
||||
#define __PLATFORM_MAC_CCGL_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#import <OpenGL/gl.h>
|
||||
#import <OpenGL/glu.h>
|
||||
#import <OpenGL/glext.h>
|
||||
|
@ -42,3 +45,5 @@ THE SOFTWARE.
|
|||
|
||||
|
||||
#endif // __PLATFORM_MAC_CCGL_H__
|
||||
|
||||
#endif //s CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
|
|
@ -23,6 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#include "CCImageCommon_cpp.h"
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <Cocoa/Cocoa.h>
|
||||
|
@ -231,3 +234,4 @@ bool Image::initWithString(
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CCPLATFORMDEFINE_H__
|
||||
#define __CCPLATFORMDEFINE_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#define CC_DLL
|
||||
|
@ -47,6 +50,6 @@ THE SOFTWARE.
|
|||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#endif /* __CCPLATFORMDEFINE_H__*/
|
||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CC_STD_C_H__
|
||||
#define __CC_STD_C_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#include "CCPlatformMacros.h"
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
|
@ -45,4 +48,6 @@ THE SOFTWARE.
|
|||
#define MAX(x,y) (((x) < (y)) ? (y) : (x))
|
||||
#endif // MAX
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#endif // __CC_STD_C_H__
|
||||
|
|
|
@ -22,8 +22,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#include "CCApplication.h"
|
||||
#include "CCEGLView.h"
|
||||
#include "CCGLView.h"
|
||||
#include "CCDirector.h"
|
||||
#include <algorithm>
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
@ -249,3 +253,5 @@ static void PVRFrameEnableControlWindow(bool bEnable)
|
|||
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
|
|
@ -25,6 +25,9 @@ THE SOFTWARE.
|
|||
#ifndef __CC_APPLICATION_WIN32_H__
|
||||
#define __CC_APPLICATION_WIN32_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#include "CCStdC.h"
|
||||
#include "platform/CCCommon.h"
|
||||
#include "platform/CCApplicationProtocol.h"
|
||||
|
@ -101,4 +104,6 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#endif // __CC_APPLICATION_WIN32_H__
|
||||
|
|
|
@ -22,6 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#include "platform/CCCommon.h"
|
||||
#include "CCStdC.h"
|
||||
|
||||
|
@ -55,3 +59,5 @@ void LuaLog(const char *pszMsg)
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
|
|
@ -22,6 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#include "platform/CCDevice.h"
|
||||
#include "CCStdC.h"
|
||||
|
||||
|
@ -47,4 +51,6 @@ void Device::setAccelerometerEnabled(bool isEnabled)
|
|||
void Device::setAccelerometerInterval(float interval)
|
||||
{}
|
||||
|
||||
NS_CC_END
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
|
|
@ -22,6 +22,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#include "CCFileUtilsWin32.h"
|
||||
#include "platform/CCCommon.h"
|
||||
#include <Shlobj.h>
|
||||
|
@ -303,3 +307,6 @@ string FileUtilsWin32::getWritablePath() const
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
|
|
|
@ -25,6 +25,9 @@ THE SOFTWARE.
|
|||
#ifndef __CC_FILEUTILS_WIN32_H__
|
||||
#define __CC_FILEUTILS_WIN32_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "CCPlatformMacros.h"
|
||||
#include "ccTypes.h"
|
||||
|
@ -101,5 +104,7 @@ protected:
|
|||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#endif // __CC_FILEUTILS_WIN32_H__
|
||||
|
||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CCGL_H__
|
||||
#define __CCGL_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#include "GL/glew.h"
|
||||
|
||||
#define CC_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8
|
||||
|
@ -36,4 +39,6 @@ THE SOFTWARE.
|
|||
#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
|
||||
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#endif // __CCGL_H__
|
||||
|
|
|
@ -23,6 +23,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#define __CC_PLATFORM_IMAGE_CPP__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#if _MSC_VER
|
||||
#include <cctype>
|
||||
#endif
|
||||
|
@ -440,3 +444,5 @@ bool Image::initWithString(
|
|||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
|
|
@ -25,6 +25,9 @@ THE SOFTWARE.
|
|||
#ifndef __CCPLATFORMDEFINE_H__
|
||||
#define __CCPLATFORMDEFINE_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
@ -55,6 +58,6 @@ THE SOFTWARE.
|
|||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#endif //s CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#endif /* __CCPLATFORMDEFINE_H__*/
|
||||
|
|
|
@ -25,6 +25,9 @@ THE SOFTWARE.
|
|||
|
||||
#include "CCStdC.h"
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#ifndef __MINGW32__
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -45,3 +48,5 @@ int gettimeofday(struct timeval * val, struct timezone *)
|
|||
NS_CC_END
|
||||
|
||||
#endif // __MINGW32__
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
|||
#ifndef __CC_STD_C_H__
|
||||
#define __CC_STD_C_H__
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
//typedef SSIZE_T ssize_t;
|
||||
// ssize_t was redefined as int in libwebsockets.h.
|
||||
// Therefore, to avoid conflict, we needs the same definition.
|
||||
|
@ -151,5 +154,9 @@ inline errno_t strcpy_s(char *strDestination, size_t numberOfElements,
|
|||
#undef min
|
||||
#undef max
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#endif // __CC_STD_C_H__
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -29,13 +29,16 @@
|
|||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MSC_STDINT_H_ // [
|
||||
#define _MSC_STDINT_H_
|
||||
|
||||
#include "CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#ifndef _MSC_VER // [
|
||||
#error "Use this header only with Microsoft Visual C++ compilers!"
|
||||
#endif // _MSC_VER ]
|
||||
|
||||
#ifndef _MSC_STDINT_H_ // [
|
||||
#define _MSC_STDINT_H_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif
|
||||
|
@ -243,5 +246,6 @@ typedef uint64_t uintmax_t;
|
|||
|
||||
#endif // __STDC_CONSTANT_MACROS ]
|
||||
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#endif // _MSC_STDINT_H_ ]
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "CCScrollView.h"
|
||||
#include "CCEGLView.h"
|
||||
#include "CCGLView.h"
|
||||
#include "platform/CCDevice.h"
|
||||
#include "CCActionInstant.h"
|
||||
#include "CCActionInterval.h"
|
||||
|
|
Loading…
Reference in New Issue