mirror of https://github.com/axmolengine/axmol.git
fixed memory leak from CCGLProgram.cpp
enable retina for win32
This commit is contained in:
parent
a05757f741
commit
b8e6d9c589
|
@ -49,7 +49,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\Classes;"$(SolutionDir)\lua\cocos2dx_support";"$(SolutionDir)\lua\CocosDenshion_support";"$(SolutionDir)\lua\lua";"$(SolutionDir)\lua\tolua";"$(SolutionDir)\lua\src";.;"$(SolutionDir)\cocos2dx";"$(SolutionDir)\cocos2dx\include";"$(SolutionDir)\cocos2dx\platform";"$(SolutionDir)\cocos2dx\platform\third_party\win32\OGLES";"$(SolutionDir)\CocosDenshion\Include""
|
AdditionalIncludeDirectories="..\Classes;"$(SolutionDir)\lua\cocos2dx_support";"$(SolutionDir)\lua\CocosDenshion_support";"$(SolutionDir)\lua\lua";"$(SolutionDir)\lua\tolua";"$(SolutionDir)\lua\src";.;"$(SolutionDir)\cocos2dx";"$(SolutionDir)\cocos2dx\include";"$(SolutionDir)\cocos2dx\platform";"$(SolutionDir)\cocos2dx\platform\third_party\win32\OGLES";"$(SolutionDir)\CocosDenshion\Include";"$(SolutionDir)\cocos2dx\kazmath\include""
|
||||||
PreprocessorDefinitions="WIN32;_WINDOWS;STRICT;_DEBUG;COCOS2D_DEBUG=1"
|
PreprocessorDefinitions="WIN32;_WINDOWS;STRICT;_DEBUG;COCOS2D_DEBUG=1"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
|
|
|
@ -96,7 +96,7 @@ bool AppDelegate::applicationDidFinishLaunching() {
|
||||||
pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());
|
pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());
|
||||||
|
|
||||||
// enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices.
|
// enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices.
|
||||||
// pDirector->enableRetinaDisplay(true);
|
pDirector->enableRetinaDisplay(true);
|
||||||
|
|
||||||
// turn on display FPS
|
// turn on display FPS
|
||||||
pDirector->setDisplayFPS(true);
|
pDirector->setDisplayFPS(true);
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
bool canSetContentScaleFactor();
|
bool canSetContentScaleFactor();
|
||||||
void setContentScaleFactor(float contentScaleFactor);
|
void setContentScaleFactor(float contentScaleFactor);
|
||||||
|
|
||||||
float getMainScreenScale() { return 1.0f; }
|
float getMainScreenScale() { return -1.0f; }
|
||||||
|
|
||||||
virtual bool Create(LPCTSTR pTitle, int w, int h);
|
virtual bool Create(LPCTSTR pTitle, int w, int h);
|
||||||
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
|
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
|
@ -114,8 +114,10 @@ bool CCGLProgram::initWithVertexShaderFilename(const char* vShaderFilename, cons
|
||||||
{
|
{
|
||||||
const GLchar * vertexSource = (GLchar*) CCString::stringWithContentsOfFile(CCFileUtils::fullPathFromRelativePath(vShaderFilename));
|
const GLchar * vertexSource = (GLchar*) CCString::stringWithContentsOfFile(CCFileUtils::fullPathFromRelativePath(vShaderFilename));
|
||||||
const GLchar * fragmentSource = (GLchar*) CCString::stringWithContentsOfFile(CCFileUtils::fullPathFromRelativePath(fShaderFilename));
|
const GLchar * fragmentSource = (GLchar*) CCString::stringWithContentsOfFile(CCFileUtils::fullPathFromRelativePath(fShaderFilename));
|
||||||
|
bool ret = initWithVertexShaderByteArray(vertexSource, fragmentSource);
|
||||||
return initWithVertexShaderByteArray(vertexSource, fragmentSource);
|
CC_SAFE_DELETE_ARRAY(vertexSource);
|
||||||
|
CC_SAFE_DELETE_ARRAY(fragmentSource);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* CCGLProgram::description()
|
const char* CCGLProgram::description()
|
||||||
|
|
Loading…
Reference in New Issue