Commit Graph

405 Commits

Author SHA1 Message Date
minggo 658bffbb69 issue #2430:use upper letter for enum item in ccGLStateCache.h 2013-07-25 15:04:13 +08:00
James Chen e5c2ad0cb8 issue #2404: Mark Texture2D::setTexParameters(const ccTexParams* texParams) as deprecated. 2013-07-24 17:54:17 +08:00
minggo aac1a4c78a Merge pull request #3214 from bmanGH/develop
修复CCTexturePVR创建GLTexture时没有使用GLStateCache
2013-07-23 20:02:56 -07:00
James Chen d942de1ae1 issue #2378: Variables to protected for Texture2D. 2013-07-23 20:42:43 +08:00
James Chen d6f15bc79f issue #2378: Setter/Getter for TextureAtlas, removing CC_PROPERTY_XXX macros. 2013-07-23 14:18:35 +08:00
James Chen 75a0cb6a29 issue #2378: Setter/Getter for CCTexture2D, removing CC_PROPERTY_XXX macros. 2013-07-23 14:05:05 +08:00
minggo f6cfe3007f issue #2412:fix merging conflict 2013-07-23 10:41:11 +08:00
bmanGH b983830bec 修复CCTexturePVR创建GLTexture时没有使用GLStateCache导致下一个Sprite::draw的时候可能会使用不正确的纹理 2013-07-23 02:23:40 +08:00
James Chen 50c280fb9d Fixing complication errors in CCTextureAtlas.cpp and jsb_cocos2dx_auto.cpp. 2013-07-21 19:10:22 +08:00
Ricardo Quesada 89d210bdb3 CCAssert -> CCASSERT
and other best pracitces like:

capacity and "index" are ints and not unsigned int (google's recomendation).
 It is easier to detect underflow bugs like this

plus other minor improvements
2013-07-19 22:01:27 -07:00
Ricardo Quesada 1f0dac4ed0 Removes CC_PROPERTY / CC_SYNTHESIZE from some parts of the code
As agreed previously, CC_PROPERTY_XXX and CC_SYNTHESIZE_XXX should
not be used in the code.
This patch removes some of them. There are still many more to remove
2013-07-19 13:16:38 -07:00
James Chen 7c7d21dd03 issue #2407: more best practices fixes, more getter and const.. 2013-07-19 14:57:54 +08:00
minggo 7704ab9161 issue #2412:remove platform.cpp/.h 2013-07-19 13:42:45 +08:00
Ricardo Quesada 6e25301b43 more best practices fixes
- Adds more `const` in getters
- Overriden methods have the `override` keyword
- Reorganizes the structure of the class:
  # creators first, then constructor, destructors, init
  # then overridden methods
  # variables at the end
- removes Hungarian notation from parts of the code
2013-07-17 16:56:19 -07:00
James Chen 209392085c issue #2410: Reverting some changes about VAO. And adding CC_ENABLE_CACHE_TEXTURE_DATA to 'EVNET_COME_TO_FOREGROUND' in DrawNode. 2013-07-17 13:53:16 +08:00
James Chen 56419b9e90 issue #2410: [Android] Adding listener for CCDrawNode when application resume from background.
Reset the order of reloading shaders and textures in main.cpp.
2013-07-17 12:53:30 +08:00
James Chen 5b06824036 closed #2410: Formatting codes in Texture2D::initWithString. 2013-07-16 16:47:35 +08:00
James Chen 510b29a2ff Merge branch 'android-textures-fix' of https://github.com/jotel/cocos2d-x into shared-codes
Conflicts:
	cocos2dx/textures/CCTextureCache.cpp
2013-07-16 16:33:02 +08:00
Ricardo Quesada 9958e0d7f9 Adds more readability to the class internals.
Changes:
  - creator (static) methods, and singleton methods (static) are always at the top of the class
  - Constructors, destructros, and init methods comes next
  - Then the instance methods for the class
  - Then the overriden methods
  - and finally the ivars

Also, overriden methos have the "override" context keyword
2013-07-15 12:43:22 -07:00
Jason Lust 5455d20fc1 Fix Issue #2354
Once a Texture Atlas VAO has deallocated by glDeleteVertexArrays. The GLStateCache may have been recently set to that vaoID. When shortly after a new glGenVertexArrays gets the same vaoID but the glBindVertexArray is bypassed because of the GLStateCache is not aware the VAO was just invalidated, and new vertex are copied to the old freed address.
2013-07-12 19:51:42 -07:00
minggo 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +08:00
minggo 15096b0716 issue #2393:mark CCPointMake CCSizeMake CCRectMake as deprecated 2013-07-12 14:30:26 +08:00
Ricardo Quesada cf262c28e2 getInstance() / destroyInstance() are used...
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.

common files + Mac files + iOS files + tests/samples files were updated.

The old methods are deprecated now.
2013-07-11 15:24:23 -07:00
James Chen ad8a3ac1b5 issue #2388: One more static_cast. 2013-07-10 10:08:07 +08:00
Jaroslaw Lewandowski 1fcd6883f1 fixing Linux build 2013-07-09 23:32:10 +01:00
Jaroslaw Lewandowski 626ba2686f Solving 'black screen' on android 2013-07-09 21:21:43 +01:00
James Chen 596c4c3cf2 issue #2387: Using static_cast instead of C style cast while iterating CCDictionary. 2013-07-09 14:40:43 +08:00
dumganhar b41dd9277d issue #2300: Warning fixes. 2013-07-08 23:12:11 +08:00
minggo 87125e4b2a issue #2129:use capital words for static const member variables 2013-07-08 18:11:32 +08:00
James Chen d64fb7339c issue #2129: FontDefinition* --> const FontDefinition& 2013-07-08 15:18:16 +08:00
James Chen 1eacab0278 Merge branch 'iss2129-remove_prefix' of https://github.com/minggo/cocos2d-x into minggo-iss2129-remove_prefix 2013-07-08 10:51:07 +08:00
Ricardo Quesada c65b6f1417 Adds const to more getters
adds `const` to more getters.
2013-07-06 22:01:21 -07:00
minggo 04465622b7 issue #2129:remove prefix of types in ccTypes.h 2013-07-05 16:49:22 +08:00
Ricardo Quesada 1d011510af setTexParams() is passed as a const reference
All structs (PODs), should be passed as const reference.
eg: Size, Point, ccTexParams, etc... should be passed as const reference.
2013-07-03 17:59:22 -07:00
Ricardo Quesada 216c6eada5 Adds more const in getters
In Sprite and Texture2D
2013-07-03 17:44:41 -07:00
Huabing.Xu 5929c7662c issue #2328 refractor etc support:
1. GL_ETC1_RGB8_OES not defined will return not support hardware etc
2. remove some space and comments
2013-07-02 15:36:47 +08:00
Huabing.Xu 041bef148a Merge branch 'origin/develop'
Conflicts:
	cocos2dx/proj.ios/cocos2dx.xcodeproj/project.pbxproj
	cocos2dx/proj.win32/cocos2d.vcxproj.filters
2013-07-02 13:47:02 +08:00
Huabing.Xu 9642930779 give Texture2D::_pixelFormat a default value in construction 2013-07-01 18:16:56 +08:00
Huabing.Xu 4e9e893c8e 1. Add C++ code to decode ETC file
2. Configuration and function supportsETC()
2013-07-01 17:40:57 +08:00
James Chen b76798505c closed #2342: Fixing indention. 2013-06-29 15:04:43 +08:00
James Chen bb2f19535b closed #2342: Fixing compilation errors when CC_ENABLE_CACHE_TEXTURE_DATA is enabled. 2013-06-29 15:01:50 +08:00
Justin Hawkwood 37ca32e75c Corrected code to use textDefinition properties 2013-06-29 15:00:17 +08:00
minggo ca2966745e closed #2305: fix a running time error 2013-06-26 15:11:13 +08:00
minggo 9d44b52ebf issue #2305:use c++11 thread correctly 2013-06-26 14:48:19 +08:00
James Chen 62902ad212 Fixing compilation errors for Emscripten port. 2013-06-24 10:21:36 +08:00
minggo b434190a70 issue #2305: tab -> 4 spaces 2013-06-21 15:49:45 +08:00
minggo ef7fd16f76 issue #2305: tab -> 4 spaces 2013-06-21 15:43:17 +08:00
minggo 68559dfa00 issue #2305: use c++11 thread instead of pthread in CCTextureCache 2013-06-21 15:29:21 +08:00
James Chen 93b6328303 issue #2129: Removing CC prefix for cocos2dx module. 2013-06-20 14:13:12 +08:00
James Chen 136a9743d4 issue #2129: [Removing CC Prefix] Removing backward compatible macros, since they are conflict with no CC Prefix ones. 2013-06-20 12:56:51 +08:00