Commit Graph

526 Commits

Author SHA1 Message Date
minggo 4acd231f89 merge v3.6 2015-04-30 13:46:08 +08:00
Dale Stammen 904abeab87 added CC_WINDOWS_PHONE_8_1 to preprocessor defines 2015-04-29 09:48:14 -07:00
Dale Stammen f64012d77b special shaders for Windows Phone 8.1 with no gl_PointSprite 2015-04-29 09:47:44 -07:00
Danut Chereches 5f692962b9 fixed 'seperate' typo
issue #8408
2015-04-25 00:02:39 +03:00
minggo f6276dd4b3 Merge pull request #10983 from perminovVS/v3-texture-init-check-error
Clean possible GL error init Texture2D
2015-04-21 09:50:54 +08:00
andyque e02dad3489 fix ui grayscale shader memory release issue 2015-04-20 17:00:40 +08:00
yangxiao 8c8058a9be merge cocos resolve conflict 2015-04-14 13:56:05 +08:00
zhukaixy 6684491249 1: update cube texture for sky box
2: add mouse-controled camera for test case (skybox)
2015-04-14 01:39:23 +08:00
minggo 0aef6b9446 Merge pull request #11295 from Almax27/v3
RenderQueue command buffer optimisation
2015-04-10 09:33:43 +08:00
minggo 353c2b0d75 Merge pull request #11288 from perminovVS/v3-dev-optimize-vec3
Optimize Vec3
2015-04-07 14:04:57 +08:00
Aaron Baumbach 9edfa5bb29 RenderQueue command buffer optimisation
Made _commands an array of vectors that is no longer reallocated every frame
Provided method to reallocate queues manually and reserve memory in order to minimise std::vector dynamic reallocation
2015-04-06 14:45:19 +01:00
Vladimir Perminov 105bac2d55 Optimize Vec3
small function Vec3 move to Vec3.inl
Added:
add(float xx, float yy, float zz);
setZero();

Change all code:
_vec3 = Vec3(x, y, z);   ->   _vec3.set(x, y, z);
Vec3 vec3 = Vec3(x, y, z);   ->  Vec3 vec3(x, y, z);
_vec3 += Vec3(x, y, z);   ->   _vec3.add(x, y, z);
_vec3 = Vec3::ZERO;   ->   _vec3.setZero();
2015-04-05 13:09:50 +03:00
tangziwen 0193420dfc Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into terrain
Resovle Conflicts:
	cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters
2015-04-03 15:45:51 +08:00
tangziwen e4ae88ef15 add new line at end of file 2015-04-03 09:11:09 +08:00
samuele3hu 6c528c4a42 Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_5_test 2015-03-30 15:51:01 +08:00
samuele3hu c3ad458a26 Update comment for Lua 2015-03-30 15:47:47 +08:00
yangxiao c6a86ac287 move shader to shaders 2015-03-30 13:45:50 +08:00
minggo 59441adc2c Merge pull request #11213 from super626/texturecube
Texturecube bug fix
2015-03-30 10:48:10 +08:00
minggo b03900bbbf fix doxygen comment 2015-03-27 17:09:54 +08:00
zhukaixy a1bad14c1e Update ccShader_3D_Skybox.frag 2015-03-27 17:07:30 +08:00
Huabing.Xu 0367d752af Merge branch 'v3' into v3_comments
Conflicts:
	cocos/renderer/ccShaders.h
2015-03-27 12:05:15 +08:00
Huabing.Xu 3d657df9f6 [ci skip]add group base to files in renderer folder 2015-03-27 11:54:40 +08:00
minggo d9680b2c74 Merge pull request #11178 from calfjohn/v3
[ci skip]fixed doxygen warning for physics and texture2d
2015-03-27 11:11:28 +08:00
Huabing.Xu 49bf8d5e13 Merge pull request #11181 from dabingnn/v3_comments
V3 comments
2015-03-27 11:09:17 +08:00
minggo 24aef7c6bb Merge pull request #11164 from super626/texturecube
Texturecube
2015-03-27 11:06:28 +08:00
Huabing.Xu cbcdef11c3 [ci skip]fix warning for doxygen 2015-03-27 11:05:01 +08:00
Huabing.Xu f18fac48ed [ci skip]fix warning for doxygen 2015-03-27 11:03:21 +08:00
calfjohn 0af4f9f1ed fixed doxygen warning for physics and texture2d 2015-03-27 10:34:01 +08:00
minggo 4eadd1ce47 Merge pull request #11165 from calfjohn/v3
[ci skip]Modify group name for physics and Texture2d, Texture2dCache, TextureAtla...
2015-03-26 15:29:17 +08:00
calfjohn 587931faaa Modify group name for physics and Texture2d, Texture2dCache, TextureAtlas. 2015-03-26 15:20:25 +08:00
yangxiao 84535feb0c merge cocos 2015-03-26 11:59:26 +08:00
WenhaiLin 153d697f1a [ci skip]Update comments. 2015-03-25 10:59:04 +08:00
WenhaiLin 9dd778edb0 [ci skip]Update comments 2015-03-24 20:23:51 +08:00
minggo 7f60b1cea2 Merge pull request #11078 from calfjohn/v3
[ci skip] Add documents for Texture2D\TextureAtlas\TextureCache
2015-03-23 22:16:56 +08:00
Huabing.Xu 044c954155 [ci skip] update comments CCGLGroupCommand.h 2015-03-23 21:36:01 +08:00
Huabing.Xu 027106c9ee [ci skip] update comments CCGLProgramStateCache.h, CCPrimitive.h CCPrimitiveCommand.h 2015-03-23 21:19:02 +08:00
Huabing.Xu 126186e413 [ci skip]update comments CCMathBase.h CCGLProgramState.h CCRenderer.h 2015-03-23 20:30:37 +08:00
Huabing.Xu 2dde1e69e3 Merge branch 'v3' into v3_comments 2015-03-23 20:00:31 +08:00
calfjohn 657f270855 Merge branch 'v3' of github.com:cocos2d/cocos2d-x into v3 2015-03-23 17:50:53 +08:00
calfjohn ff0e852044 Add document for Texture2D\TextureAtlas\TextureCache 2015-03-23 17:50:22 +08:00
minggo 27c4104ca7 Merge pull request #11049 from MSOpenTech/v3-wp8-shaders
Edit V3 updated precompiled shaders for WP8
2015-03-23 11:28:18 +08:00
minggo dda85fcb02 Merge pull request #11027 from tangziwen/doc
add 3D doc, fixed typo
2015-03-23 10:45:41 +08:00
Dale Stammen fc94659fd5 updated precompiled shaders for WP8 2015-03-20 23:50:48 -07:00
tangziwen 814490ab44 add 3D doc, fixed typo 2015-03-20 17:20:22 +08:00
Huabing.Xu abaa8dba77 update comments 2015-03-20 11:24:52 +08:00
Huabing.Xu d075a2bf86 Merge pull request #11009 from dabingnn/v3_comments
[ci skip] update comments in renderer folder
2015-03-20 09:47:30 +08:00
Huabing.Xu 055b71569a [ci skip] update comments in renderer folder 2015-03-20 09:46:08 +08:00
dingpinglv 1b179c2b02 Issue : added js annotates to SimpleAudioEngine, CCVertexIndexBuffer.h, CCVertexIndexData.h 2015-03-19 20:20:16 +08:00
Vladimir Perminov 133be7e57f Clean possible GL error
CHECK_GL_ERROR_DEBUG work debug only.
Clean need for correct check glTexImage2D and glCompressedTexImage2D

Release now work: If gl error before any code, initWithMipmaps return
false always
2015-03-19 11:10:49 +03:00
Huabing.Xu 0c8218581f [ci skip] update comments CCRenderCommand.h 2015-03-18 20:30:52 +08:00
Huabing.Xu 431b3593a7 [ci skip] update comments CCQuadCommand.h 2015-03-18 20:12:34 +08:00
Huabing.Xu a87c5755e9 [ci skip] update comments CCTrianglesCommand.h 2015-03-18 19:52:08 +08:00
Huabing.Xu 4ae4500a68 [ci skip]adjust comments 2015-03-18 19:32:10 +08:00
Huabing.Xu fb1d9899c7 [ci skip]adjust comments CCVertexIndexBuffer.h and CCVertexIndexData.h 2015-03-18 17:40:10 +08:00
Huabing.Xu a71fb9f946 [ci skip]update comments CCVertexIndexBuffer.h 2015-03-18 17:18:25 +08:00
Huabing.Xu eb2786f40d [ci skip]update comments CCVertexIndexData.h 2015-03-18 14:43:44 +08:00
minggo 1e271a9d96 Merge pull request #10899 from super626/v3
Bug fix
2015-03-17 19:29:21 +08:00
songchengjiang 73caf536da fix the bug of lighting shader 2015-03-17 16:43:08 +08:00
Dale Stammen 08ceae3de2 removed no-gl_PointSize shaders for Windows Phone 8.1 2015-03-16 08:08:02 -07:00
yangxiao 8b3e116ed6 check running scene 2015-03-16 18:04:50 +08:00
yangxiao 874f7c7f99 fix transparent render bug 2015-03-03 10:42:47 +08:00
yangxiao 9b117bf87c resolve conflict 2015-02-13 15:46:19 +08:00
yangxiao 2789ad1393 remove unused code 2015-02-13 09:48:27 +08:00
kompjoefriek a2ef1abef3 Fixed unwanted changes 2015-02-12 23:07:24 +01:00
yangxiao 79a0c0152a add 3d particle (Particle Universe) 2015-02-11 18:14:22 +08:00
KompjoeFriek 7f28230311 Fixed merge error 2015-02-10 21:37:18 +01:00
kompjoefriek 00edc542cb Merged with upstream/v3
Merged with upstream/v3 and resolved merge conflicts
2015-02-10 21:27:20 +01:00
yangxiao 2ac0b35283 fix render state 2015-02-06 10:09:23 +08:00
Nite Luo e9b4e4e19c Merge branch 'patch-13' of https://github.com/G17hao/cocos2d-x into G17hao-patch-12 2015-01-31 09:46:59 -08:00
Nite Luo 07cda0db37 Merge branch 'patch-12' of https://github.com/G17hao/cocos2d-x into G17hao-patch-12 2015-01-31 09:46:31 -08:00
zhukaixy 806a5011e5 solve the problems noted in comments 2015-01-30 17:23:30 +08:00
kompjoefriek 89152b2856 Tabs to spaces
Changed indenting tabs to spaces
2015-01-29 10:40:00 +01:00
Nite Luo f914297703 Fix force depth write logic 2015-01-28 23:55:26 -08:00
minggo 2f04e7a6ac Merge pull request #10239 from super626/v3
fix bug on uniform cache
2015-01-29 10:13:11 +08:00
zhukaixy ee99700ec1 add test case TextureCube 2015-01-29 09:28:14 +08:00
kompjoefriek 0c70660551 Fixed warnings
- signed/unsigned mismatch
- printing enum with %d
- using int as bool
2015-01-29 01:36:22 +01:00
Nite Luo c0ff8d1177 Don't clear depth between queues 2015-01-28 15:28:14 -08:00
Huabing.Xu c8a783e4ac use const auto& 2015-01-28 10:59:29 +08:00
Huabing.Xu 5f5c00b7d2 remove duplicated QUEUE_GROUP::QUEUE_COUNT and QUEUE_GROUP::QUEUE_GROUP_SIZE 2015-01-28 10:32:22 +08:00
Nite Luo be6ca1b6d2 add force depth write 2015-01-27 17:05:51 -08:00
Nite Luo c364323bbc Not using static value to save previous render state since other commands like custom command could change them 2015-01-27 16:26:31 -08:00
Nite Luo 8f539a0107 Make PositionZ independent from global Z 2015-01-27 15:41:58 -08:00
Nite Luo b89e255099 Finish organize the render queue 2015-01-27 14:41:16 -08:00
Nite Luo 78d8a694c8 Merge branch 'v3' into v3_fixRenderer
Conflicts:
	cocos/renderer/CCRenderer.cpp
	cocos/renderer/CCRenderer.h
2015-01-27 11:23:48 -08:00
Nite Luo 3c635d044e Add Queue_count for render queues 2015-01-27 11:12:51 -08:00
yangxiao 220b34d105 Merge branch 'newcode' into v3 2015-01-27 16:35:54 +08:00
yangxiao fad8f9f1da format 2015-01-27 16:31:15 +08:00
yangxiao af8a6c16b1 Merge branch 'v3' of https://github.com/super626/cocos2d-x into v3 2015-01-27 16:24:07 +08:00
lvlong 57970da398 Do some optimize 2015-01-27 15:50:05 +08:00
Huabing.Xu a38b210803 add depth in renderCommand
refactor rendering order of renderQueue
2015-01-27 14:29:09 +08:00
Nite Luo 15adaf2877 save/restore render state 2015-01-26 16:37:11 -08:00
lvlong bb419719aa fix bug: about caching uniform. 2015-01-26 18:40:00 +08:00
Huabing.Xu 285a280bb4 enable attribute cache as before 2015-01-23 18:19:25 +08:00
Huabing.Xu 421310f3a8 Merge branch 'v3' into v3_fixCrashNoVAO
Conflicts:
	cocos/renderer/ccGLStateCache.cpp
2015-01-23 14:50:21 +08:00
Huabing.Xu 550fc44187 disbale cache for s_attributeFlags 2015-01-23 14:32:36 +08:00
kompjoefriek ca48c5e5dd Fixed lots of compiler warnings
- signed / unsigned mismatches
- using int as bool
- Removed throw() from CCFrame.h, why is explained here:
http://www.gotw.ca/publications/mill22.htm
2015-01-23 02:02:33 +01:00
Huabing.Xu 0ca47ab40f fix crash for textureAtlas 2015-01-21 14:14:53 +08:00
G17hao 29c4f83fd8 Update CCGroupCommand.cpp
add a vector container for save unused id.
traversal unordered_map is too slow, use vector to replace it
2015-01-20 19:28:30 +08:00
G17hao ff1731eded Update CCGroupCommand.h
add a vector container for save unused id.
traversal unordered_map is too slow, use vector to replace it
2015-01-20 19:27:01 +08:00
Huabing.Xu 65b6500491 Merge branch 'v3' into FixCrashOnWin32
Conflicts:
	cocos/2d/CCDrawNode.cpp
	cocos/renderer/ccShaders.cpp
2015-01-20 18:09:11 +08:00
Huabing.Xu 79eee9b145 fix crash on windows 2015-01-20 16:50:51 +08:00
Dale Stammen 86567afa5f added kShaderType_PositionColor_noMVP_GrayScale for WP8 to support UIScale9Sprite 2015-01-16 15:02:05 -08:00
Dale Stammen 2c6ec3eebe added ccShader_PositionColorPointsize-no-gl_PointSize.vert for WP8.1 2015-01-16 11:19:00 -08:00
Nite Luo d43a8cf9ca Move setDepthTest to renderer 2015-01-15 16:54:27 -08:00
Nite Luo 9848a8133b Fix Vertex Z issue 2015-01-15 16:41:07 -08:00
Nite Luo 9d7604cab7 undeprecate init for custom command 2015-01-15 15:56:44 -08:00
Nite Luo 0bddeb88c8 Disable 3D rendering support for commands that needs to execute in order 2015-01-15 14:57:51 -08:00
Nite Luo 4a440e66c9 Refactor draw command 2015-01-15 14:00:49 -08:00
minggo 5459149279 Merge pull request #9969 from huangshiwu/pointSize
DrawNode enable draw different size points
2015-01-14 11:38:31 +08:00
huangshiwu 9fd000895c modify file copyright information 2015-01-14 11:20:33 +08:00
Nite Luo 4335328e3d Add support for creating empty sprite3D 2015-01-13 16:41:24 -08:00
huangshiwu fea492ab4f DrawNode enable draw different size points 2015-01-13 22:30:50 +08:00
Nite Luo 45562f3203 optimize based on review commends 2015-01-12 22:52:20 -08:00
Nite Luo 1c10ae43bc Merge branch 'v3' into renderFix
Conflicts:
	tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.cpp
	tests/cpp-tests/Classes/Camera3DTest/Camera3DTest.h
2015-01-12 20:43:55 -08:00
Nite Luo fee8bc1b28 Remove Transparent Queue, Move transform calculation of Billboard to visit 2015-01-12 18:17:47 -08:00
minggo 74e9fc6382 Merge pull request #9932 from dabingnn/v3_addParamForVertexIndexBufferUsage
add param for usage in class VertexBuffer and IndexBuffer
2015-01-12 19:33:18 +08:00
Huabing.Xu 2b79ff1d87 add param for usage in class VertexBuffer and IndexBuffer 2015-01-12 14:59:12 +08:00
Huabing.Xu d5416d8a7a refresh attributes and uniforms in glprogramstate 2015-01-12 14:43:31 +08:00
Nite Luo 7741daf091 Billboard Render correctly 2015-01-11 22:20:41 -08:00
Nite Luo 6dfc021c02 Merge renderqueue to one 2015-01-09 14:06:21 -08:00
Nite Luo e7480a7efb Enable tansparent queue and create camera rotation demo 2015-01-08 16:30:00 -08:00
Nite Luo b675a2ca61 Turn off Depth Write by default, only 3D opaque object will write to Depth buffer 2015-01-07 16:35:08 -08:00
Huabing.Xu 8dde42b66a code adjust, delay deprecated flag specification 2015-01-05 13:52:22 +08:00
Huabing.Xu 63e6557165 fix GLProgram log crash on windows 2015-01-04 21:51:22 +08:00
minggo 51c89c3a22 Merge pull request #9720 from dabingnn/v3_perf
V3 perf
2014-12-31 10:02:59 +08:00
minggo 274d7d2276 Merge pull request #9718 from darkdukey/depthWriteFix
Disable write to depth buffer for transparent objects
2014-12-31 10:00:48 +08:00
Nite Luo a68dfa13ec Disable Depth Write for transparent objects 2014-12-30 13:35:29 -08:00
Huabing.Xu c60c3fb2b1 refresh uniforms and attributes when access uniform or attribute table 2014-12-30 18:32:09 +08:00
Huabing.Xu b92802a770 optimise Renderer::fillQuads() 2014-12-30 15:07:50 +08:00
Huabing.Xu 6576c16fe1 optimise QuadCommand::init() 2014-12-30 14:21:33 +08:00
Huabing.Xu 485c72651d exextract updateUniformsAndAttributes 2014-12-30 11:13:14 +08:00
Huabing.Xu 2348e5c247 optimize rendering code 2014-12-29 18:45:55 +08:00
tjunxin 561350c2bc comment line 83
As known,  _glProgramStates is a cocos2d::Map container,it will call object->retain() when insert, and call position->second->release() when erase, so the statement of line 83 is redundant.
If i don't comment line 83, the application will crash when GLProgramStateCache::removeUnusedGLProgramState() is called.
2014-12-18 13:49:54 +08:00
XiaoYang b106b2f7ce Merge pull request #175 from lvlonggame/v3
fix bug: same model in mirror state cullFace problem.
2014-12-12 09:52:01 +07:00
lvlong d0ce99413d fix bug: same model in mirror state cullFace problem. 2014-12-11 14:24:26 +08:00
Huabing.Xu 697e1fd75e Merge pull request #9377 from dabingnn/v3.3Perf
performance improvement
2014-12-04 21:08:24 +08:00
Huabing.Xu 27ff06b1d2 performance improvement 2014-12-04 18:37:57 +08:00
minggo 7fd037c416 Merge pull request #9359 from super626/v3
Initialize variable when defined
2014-12-04 13:40:21 +08:00
tangziwen da8dc13601 avoid the case that "hasAmbient" use before assign 2014-12-03 16:00:52 +08:00
minggo 4e84b4d4f6 Merge pull request #9130 from samael65535/patch-1
Add shader linking log
2014-11-26 13:51:15 +08:00
Dale Stammen a5b1faa379 added winrt and wp8 support for EVENT_RENDERER_RECREATED 2014-11-21 10:00:34 -08:00
samael f60b6bbd91 Update CCGLProgram.cpp
add shader linking log
2014-11-20 11:41:16 +08:00
samael 26b95d3dae add shader linking log
add shader linking log
2014-11-15 12:15:56 +08:00
Ricardo Quesada 3d448e86ef fixes some compiler warnings
don't call deprecated functions
2014-11-06 12:25:55 -08:00
minggo 8a49ae0b07 Merge pull request #8981 from vovkasm/clean-order-of-fields-initialization
Cleanup order of fields initialization.
2014-11-05 17:51:58 +08:00
Ricardo Quesada 3a34d6eb9d Performance improvements
`Director::getMatrix()` returns `const Mat4`
2014-11-04 16:46:14 -08:00
Vladimir Timofeev 2835b094da Cleanup order of fields initialization.
Make initialization order to match declarations.
This change twice reduces number of warnings when compiling on MacOS X with Xcode 6.1
Warnings was like "Field 'XXXX' will be initialized after field 'YYYY'"
2014-10-30 17:28:41 +03:00
Dale Stammen 32a5a2cbb8 Merge branch 'v3' into wp8-shader-fix 2014-10-28 22:08:04 -07:00
Dale Stammen ee83a8a6e0 disabled distanceFieldEnabled for WP8 as the shader crashes some older windows phones 2014-10-28 20:57:40 -07:00
minggo f1ac0df761 Merge pull request #8921 from TimothyZhang/fix-program-cache-add
release old program with the same key before adding glprogram
2014-10-27 11:22:00 +08:00