Commit Graph

254 Commits

Author SHA1 Message Date
CocosRobot d07794052f Update license to 2017 (#17362)
* Typo: CopyRight -> Copyright

* Copyright update: chukong-inc.com -> Chukong Technologies Inc.

* [js files] Copyright update: 2014 -> 2014-2017

* [cpp files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2015 -> 2015-2017

* [js files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2016 -> 2016-2017

* Copyright update: 2013 -> 2013-2017

* Copyright update: 201?-201? -> 201?-2017

* License year fixes.

* Liscene year fix in CCRay.cpp

* Updates license years in CCGLProgramState.h & CCGLProgramStateCache.h
2017-02-14 14:36:57 +08:00
James Chen 27e2012cf1 fixed #16871: Material second shader texture will be lost when removeUnusedTextures is invoked. (#16884)
* fixed #16871: Material second shader texture will be lost when removeUnusedTextures is invoked.

* issue #16871: Adds test case for issue #16871.

* issue #16871: Checks whether current texture is the same as which is passed in. And more comments for release stuffs.

* Removes unused nullptr check of _value.tex.texture

CC_SAFE_RETAIN will check it.
And some indention fixes.
2017-02-10 14:01:26 +08:00
mogemimi d160d79d5b Fix typos in comments and strings (#17333) 2017-02-10 10:35:52 +08:00
Ricardo Quesada 323ea7c0d4 Sprite scale9 (#16702)
* Adds slice9 support for Sprite.

how to use it:

// points coords
sprite->setCenterRect(Rect(x,y,w,h));

// normalized coords
sprite->setCenterRectNormalized(Rect(x,y,w,h));
starts scale9sprite in sprite

more slice 9 changes

sprite 9 slice works?

kind of works

correct anchor point

slice 9 works, at least with non-rotated atlases

streched works ok

better Y invert code.

cleaner, compatible with the previous code

yay, scaling workings...

need a better api now

sets scale correctly

yay! works as expected!

more fixes and tests

better test for box

setContentSize() changes size in non-9-slice mode sprites as well

setCenterRect() -> setCenterRectNormalized()

yet another test

adds setPositionNormalized()

adds setCenterRect() tests

remove devel team from xcode

tests: add one more tests

fun test!

improved test

yet another test for slice 9

* fixes anchorPoint issues

* adds documentation

* fix: using top-left coordinate for setRect

* sprite: fixes related to scale9 and tiled

* Sprite: slice 9 fixes

works Ok with rotated frames
uses `setCapInsets` instead of `setCenterRect` to be more familiar
with `UIScale9Sprite`

* fixes js and lua bindings for Autopolygon
2016-10-26 18:45:40 -07:00
Ricardo Quesada f174dd1141 fix: improves test for issue #16155 (#16418)
improves test for github issue #16155
2016-08-23 09:47:55 +08:00
Ricardo Quesada 016e7b0dfc fix: release texture in RenderState (#16396)
memory leak fixed in RenderState

fixes github issue #16155
2016-08-19 00:22:57 -07:00
James Chen b135d512d2 Update copyright to 2016. (#16311) 2016-08-05 09:42:15 +08:00
Xpol Wan 1cc0130bdd Fixes signed/unsigned mismatch warnings.
```
2d\CCFontFNT.cpp(328): warning C4018: '<' : signed/unsigned mismatch
2d\CCLabel.cpp(782): warning C4018: '>' : signed/unsigned mismatch
2d\CCLabel.cpp(784): warning C4018: '<' : signed/unsigned mismatch
scripting\js-bindings\manual\cocos2d_specifics.cpp(2741): warning C4018: '<' : signed/unsigned mismatch
tests\cpp-tests\Classes\Sprite3DTest\Sprite3DTest.cpp(1969): warning C4018: '>=' : signed/unsigned mismatch
tests\cpp-tests\Classes\TextInputTest\TextInputTest.cpp(264): warning C4018: '>=' : signed/unsigned mismatch
ui\UIEditBox\UIEditBoxImpl-common.cpp(113): warning C4018: '<' : signed/unsigned mismatch
ui\UIRichText.cpp(1573): warning C4018: '<=' : signed/unsigned mismatch
ui\UITextField.cpp(89): warning C4018: '>=' : signed/unsigned mismatch
```
2016-04-26 17:53:25 +08:00
mogemimi f9f751834a Add missing float suffix to avoid warning C4305 2016-04-20 03:54:47 +09:00
Xpol Wan dc0f7bf903 Fixes format warnings. 2016-04-18 17:52:58 +08:00
Ricardo Quesada 4a318c0048 Renderer improvments: TriangleCommand and QuadCommand merged
- more options for batching (faster)
- less flushing in between commands (faster)
- less renderer code (easier to maintain)
- less VBO/VAO (less memory)
- uses temporary buffer for faster rendering (more memory)
  - QuadCommand is just a subclass of TriangleCommand (simpler)
  - but statically it allocates indices internally (like any TriangleCommand) (more
    memory, but not that much)
- adds more tests for SpritePolygon
- adds test for batching Tri + Quad command
- and fixes some other bugs

Squashed commit of the following:

commit cce893a9114da5dda91a895e4e661894f365e2c7
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon Feb 8 06:56:57 2016 -0800

    QuadCommand: indices are static

    thanks @Darinex

commit e5fd1c14e93d2f07b8266bfec03cf7206d348f59
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sun Feb 7 19:18:42 2016 -0800

    little improvements in xcode proj management

commit 6cd29764e01ad300f4e89e62aa6b399f73e94f01
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sun Feb 7 19:05:52 2016 -0800

    Renderer improvments: TriangleCommand and QuadCommand merged

    - more options for batching (faster)
    - less flushing in between commands (faster)
    - less renderer code (easier to maintain)
    - less VBO/VAO (less memory)
    - uses temporary buffer for faster rendering (more memory)

    and fixes some other bugs

    Squashed commit of the following:

    commit af7a209435c5f2430c31ab3ebcc7f45051eacb1a
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Sun Feb 7 18:55:27 2016 -0800

        adds test for batching quads and tris

    commit 25816e3eaeffd4b0cfe5fa15e97ff84e9013b8be
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Sun Feb 7 18:40:15 2016 -0800

        cleanup renderer

    commit 7f9785056681756c865d603516c7e14c46040e82
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Sun Feb 7 15:34:48 2016 -0800

        clean up docs

    commit 92a8b679dd404e4ca2839d85e2bd925195b12996
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Sun Feb 7 15:18:52 2016 -0800

        QuadCommand converted to Triangles command

    commit 7e21ec12d3781f6964b4d639cfa4bdc79eb8ae80
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Fri Feb 5 16:17:29 2016 -0800

        adds missing files... new test as well

    commit d1bd4391785515bdc2e1bebbeb3f321f983b51f2
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Fri Feb 5 14:35:41 2016 -0800

        more tests for poly sprites

    commit 5775a25b1046671bd0f5af4c5ab52b308b34bb39
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Fri Feb 5 00:30:13 2016 -0800

        malloc instead of std::vector

    commit 14a5d45cc978c55a182c03f181ca2bc603776561
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Thu Feb 4 21:40:46 2016 -0800

        little optimization

    commit 5667cb2b62416f8a439a54c3973d5841fbe1b68b
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Thu Feb 4 19:13:13 2016 -0800

        quad works as expected

    commit 462aef05baa6586591882faa366839bead4be068
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Thu Feb 4 15:22:59 2016 -0800

        works

    commit c789e6c42811278563c7682b5620296ae8d84aeb
    Merge: d6c3729 de62924
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Thu Feb 4 14:08:49 2016 -0800

        Merge branch 'v3' into uniform_matrix_auto

    commit d6c37297954af752ebf42ec5f71e5e2fe28c9cc2
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Thu Feb 4 13:54:07 2016 -0800

        works ok...

    commit 45c288631989ea735cc31ec5aa683d9d41aacab3
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Thu Feb 4 12:58:34 2016 -0800

        quad works!

    commit 7137cff51df09adee7129738cea2b69da090756e
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Wed Feb 3 16:19:34 2016 -0800

        more optimizations... WIP... doesn't work yet

    commit a8324c1a9acb6b82102e05eee6e5e5f341306c7b
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Tue Feb 2 21:59:42 2016 -0800

        compiles in release mode

        more tests... better threshold

    commit 884ffc756e7520fcbb9252260181538ec81b8368
    Author: Ricardo Quesada <ricardoquesada@gmail.com>
    Date:   Tue Feb 2 17:21:32 2016 -0800

        initial uniform_auto_matrix commit

        Changes the CC_matrix uniform in runtime depending on whether the command can be batched or not.

        Lot of things missing, though... like performance tests.
2016-02-08 11:25:37 -08:00
Liam fb312a761c update for 3D object render, revert old changes 2015-12-18 11:23:33 +08:00
XiaoFeng 32b81a69f5 Add test for new API
remove Sprite::setOffsetPosFromCenter api add by cocos studio, and reset _unflippedOffsetPositionFromCenter to zero in Sprite::setTexture
2015-12-03 14:21:00 +08:00
yangxiao bb23015f73 make sure attributes greater than 8 before use normal map 2015-12-02 12:03:31 +08:00
yangxiao ebd5c1cca7 resolve conflict and fix checktexture bug 2015-12-02 11:26:05 +08:00
Liam 34da2aabb2 fix compile error 2015-11-30 17:34:49 +08:00
Liam e0349ae975 update sprite 3d test 2015-11-30 14:48:19 +08:00
songchengjiang 9241797acb support normal mapping material 2015-11-25 10:45:03 +08:00
yangxiao 85f40de424 fix obb performance test 2015-10-14 13:43:02 +08:00
yangxiao 36d4f5564d merge cocos 2015-09-18 14:08:33 +08:00
yangxiao ff85173b4b remove cached material switch test demo 2015-09-09 11:13:17 +08:00
yangxiao f944750627 add material cache 2015-09-08 15:29:54 +08:00
yangxiao 2076071e8f outline test using material file 2015-09-08 14:13:53 +08:00
yangxiao a74e051b56 fix android back to foreground 2015-09-08 10:53:36 +08:00
yangxiao c3ac446f35 resolve conflict 2015-09-07 14:45:09 +08:00
songchengjiang cc6e2077f4 replace custom shaders by material files
add Sprite3DVertexColorTest
2015-09-02 16:30:24 +08:00
yangxiao 8499400514 motionstreak3d test demo 2015-09-01 10:39:31 +08:00
pandamicro 350182c1aa Refactor BackGround to Background 2015-08-21 10:43:59 +08:00
yangxiao 3e2001bdb1 Add CCCameraBackgroundBrush
including Color, Depth, SkyBox brushes

Squashed from https://github.com/cocos2d/cocos2d-x/pull/13490
2015-08-21 10:43:59 +08:00
yangxiao 7b04dbca88 modify CCLOG to cocos2d::log 2015-08-11 11:54:08 +08:00
yangxiao 544c96385a fix background to foreground 2015-08-07 16:16:43 +08:00
pandamicro 00a3d572d1 Merge pull request #12899 from super626/v3
Animate3D Callback and Bug fix
2015-08-01 18:24:05 +08:00
yangxiao ad80c11235 sync render state 2015-07-29 10:35:37 +08:00
yangxiao ef49e5a169 merge cocos 2015-07-17 17:43:32 +08:00
yangxiao bf20145e35 animate3d callback and test 2015-07-17 11:08:27 +08:00
songchengjiang 282dc23bb2 modify interfaces of Animate3DCallback 2015-07-15 17:34:14 +08:00
andyque e4cad50c2f fix tons of warnings 2015-07-15 12:04:48 +08:00
songchengjiang 6c83e8d81c Merge branch 'v3' of https://github.com/super626/cocos2d-x into v3
Conflicts:
	tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp
2015-07-15 11:13:27 +08:00
songchengjiang 5a16748273 optimize Animate3DCallback
add Animate3DCallbackTest
2015-07-13 11:43:13 +08:00
pandamicro c167e249cd Merge pull request #12790 from pandamicro/shaderNormal
Use shader with normal while creating mesh with normals
2015-07-12 21:47:05 +08:00
pandamicro 600568fdba Migrate test case from #10692 @babcca 2015-07-12 11:33:22 +08:00
songchengjiang 21a8a8d567 fix mirrored Effect3DOutline 2015-07-10 16:30:45 +08:00
songchengjiang a1956e2210 fix issue#9310 issue#10151 issue#12551 2015-07-09 18:05:47 +08:00
yangxiao 10fe728eee animation quality default to low, do not interpolation 2015-07-09 17:54:21 +08:00
yangxiao d35bf2305f add clipping test 2015-07-01 14:48:37 +08:00
yangxiao 63f948c822 modify skybox to projection space 2015-06-25 15:01:39 +08:00
Ricardo Quesada d9b0b2ca38 more fixes 2015-06-12 15:28:29 -07:00
Dale Stammen 2a71407501 fixed double to float conversion compiler warning 2015-05-28 15:00:49 -07:00
yangxiao ec69a34c51 add issue9767 test 2015-05-13 16:16:45 +08:00
Ricardo Quesada c693573d77 more samples
and API fixes
2015-05-12 22:24:52 -07:00