Commit Graph

595 Commits

Author SHA1 Message Date
treert 2c4b634a50 reset UIGrayScale Shader when reload shaders
reset GLProgram for UIGrayScale Shader when reload shaders
2016-04-23 13:33:22 +08:00
minggo 5f6f35fb91 Merge pull request #15451 from xpol/fixes-format-warnings
Fixes format warnings.
2016-04-19 10:21:10 +08:00
minggo 93d331f1e8 Merge pull request #14965 from elloop/fix_opengl_log_function
fix opengl log function.
2016-04-18 18:32:00 +08:00
Xpol Wan dc0f7bf903 Fixes format warnings. 2016-04-18 17:52:58 +08:00
mogemimi 4f32df255d Fix return value of VertexAttribBinding::init() 2016-04-10 08:05:19 +09:00
minggo 4bee2c4e79 Merge pull request #15361 from stevetranby/iterator-erase
Iterator erase pattern
2016-04-07 10:34:55 +08:00
Ricardo Quesada ed42305c26 fix: works if no ';' is the the end of defines
Github issue #15376
2016-04-06 13:27:59 -07:00
Ricardo Quesada 9fae3a5ed3 Merge pull request #15204 from perminovVS/v3-dev-gl-program-feature
GLProgram replaceDefines correct and other feature
2016-04-06 10:34:44 -07:00
Steve Tranby 24fd25e143 Iterator erase pattern 2016-04-01 18:29:21 -06:00
mogemimi 44080a04d8 Fix typos in comments and strings 2016-03-29 10:52:17 +09:00
minggo 3c676d9712 Merge pull request #15037 from Shulepov/spriteframecache_pixel_format
SpriteFrameCache: take pixelFormat into account if specified
2016-03-23 09:48:35 +08:00
Xpol Wan 90456d29ba Fixes 1605 include path in 541 files
using the tools/coding-style/include-linter.py with -f options.
2016-03-20 21:53:44 +08:00
Vladimir Perminov 7011c3a7e4 GLProgram replaceDefines correct and other feature 2016-03-07 17:05:20 +03:00
mogemimi 2a8d84e7f9 Remove unnecessary const from return types 2016-02-29 16:48:07 +09:00
mogemimi 1d9e688707 Fix typos in documentation 2016-02-18 16:16:36 +09:00
Mikhail Shulepov 15f0aaa598 Texture2D::getStringForFormat - added missed formats 2016-02-12 19:04:30 +03:00
Mikhail Shulepov 112fceae81 Texture2D: RGB888 -> A8 conversion (white - full opacity, black - full transparency) 2016-02-12 17:23:56 +03: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
elloop 341575aa4c 1. We should define `std::string ret` in where we really need it. According to my test on android platform the function returns at `return "";`, which makes the `ret` unnecessary.
2. `charsWritten` is not used, we should either delete it or use it. Because we don't check the bytes written, I think we can just delete it.
3.  We don't need (logLength+1) space for `logBytes`, because `logBytes`  returned by calling glGetShaderInfoLog(shader, logLength, nullptr, logBytes) takes `logLength` bytes at most, including the ending null character,  i.e. `(strlen(logBytes) + 1 ==  logLength)` always yield true. According to the offical opengles sdk docs: https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetShaderInfoLog.xml.
and
https://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetShaderiv.xml

4. We don't need `logBytes[logLength] = '\0';`, because `logBytes` returned is already null-terminated.
2016-01-25 12:22:30 +08:00
James Chen 057db2444c Removes unused code in Material::initWithFile. 2016-01-15 00:55:10 +08:00
zilongshanren 7d943f200f fix scale9sprite gray state opacity issue.
Ticket: https://github.com/cocos2d/cocos2d-x/issues/14378
2016-01-07 17:17:55 +08:00
pandamicro 022bcc24f1 Merge branch 'v3.10' of github.com:cocos2d/cocos2d-x into v3
Conflicts:
	cocos/scripting/js-bindings/manual/chipmunk/js_bindings_chipmunk_manual.cpp
	cocos/scripting/js-bindings/manual/component/CCComponentJS.cpp
	cocos/scripting/js-bindings/manual/js_bindings_opengl.cpp
2015-12-20 22:56:33 +08:00
Liam fb312a761c update for 3D object render, revert old changes 2015-12-18 11:23:33 +08:00
Wenhai Lin 4fa58602a8 Adds `std::nothrow` to the `new` statements 2015-12-16 14:02:55 +08:00
mogemimi f280a31323 Fix typo in documentation and comments 2015-12-09 01:48:24 +09:00
Ricardo Quesada aebfefd7a8 Merge branch 'v3' into js_more_conversions 2015-12-04 19:01:20 -08:00
Ricardo Quesada cd8631ef09 sfunction "create" uses new optimized code
...although this code should never be called
2015-12-04 18:42:31 -08:00
Ricardo Quesada f6c2758801 Merge pull request #14409 from xiaofeng11/v3_combine_opengl
Combine Studio change for openGL related operation
2015-12-03 23:03:40 -08:00
Liam 07bc48c1b8 revert glprogram 2015-12-03 16:29:02 +08:00
XiaoYang 867664197e Merge pull request #14526 from super626/v3
3D Normal Map Support
2015-12-02 14:22:20 +08:00
yangxiao ebd5c1cca7 resolve conflict and fix checktexture bug 2015-12-02 11:26:05 +08:00
pandamicro 70dd2af5d5 Merge pull request #14518 from mogemimi/fix-memory-leak-texture-cache
Fix memory leak when initWithImage() failed
2015-12-02 10:20:04 +08:00
xiaofeng11 18666a9b41 Merge pull request #14393 from xiaofeng11/v3_combine_3d
Combine Studio change for 3d components
2015-12-02 09:47:12 +08:00
mogemimi d539e6c797 Fix memory leak when initWithImage() failed 2015-12-01 12:48:54 +09:00
yangxiao 11f1bd6e28 builtin material normal map support 2015-12-01 10:37:53 +08:00
XiaoFeng 150d907636 Add missing changes to Particle 3d 2015-11-27 19:01:30 +08:00
XiaoFeng 2d28b78e41 Add 3 missing class export
Change clearShader logic.
2015-11-27 14:58:18 +08:00
songchengjiang b55f040ec6 fix macro definition error 2015-11-27 14:23:17 +08:00
XiaoFeng 8e4276469c Add comment to new function 2015-11-27 14:08:27 +08:00
songchengjiang 642e19baef unify (No)Normal Mapping shaders 2015-11-27 13:15:33 +08:00
XiaoYang 92d7ccfbca Merge pull request #14471 from super626/v3
release default fbo
2015-11-27 11:33:07 +08:00
songchengjiang fc4c3ec650 Merge branch 'v3' of https://github.com/super626/cocos2d-x into v3 2015-11-27 09:34:31 +08:00
XiaoFeng 09606e96cd Add comment for new function 2015-11-25 11:33:24 +08:00
XiaoFeng d0cd640ac8 Update 2015-11-25 11:15:17 +08:00
songchengjiang 9241797acb support normal mapping material 2015-11-25 10:45:03 +08:00
XiaoFeng 722f20c4b6 Update implement remove condition macro check. 2015-11-24 18:29:58 +08:00
yangxiao aa38dfba89 release default fbo 2015-11-24 18:11:16 +08:00
XiaoFeng 50889c1c6c Save _vertShader & _fragShader for PC platform only to decrease memory usage for mobile platform. 2015-11-17 14:29:56 +08:00
XiaoFeng acd3b5cbc4 Combine Studio change for openGL related operation 2015-11-17 13:38:42 +08:00
XiaoFeng eb644ee79f Combine Studio change for 3d components 2015-11-16 15:05:43 +08:00