Commit Graph

679 Commits

Author SHA1 Message Date
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
pandamicro 6fc7aca423 Merge pull request #14153 from Fraggle/patch-1
PMA Handling issue
2015-11-11 14:14:22 +08:00
yangxiao 9d2fca6d34 fix cull face for render queue 2015-11-09 10:42:12 +08:00
pandamicro b58e656620 Merge pull request #14264 from super626/v3
Fix: Mesh::setGLProgramState may modify state block
2015-10-30 10:11:23 +08:00
yangxiao 16d9cf1af9 setStateBlock implement 2015-10-29 14:21:25 +08:00
mogemimi 9df30d2454 Fix typos in documentation 2015-10-23 16:59:51 +09:00
pandamicro f2898ecf30 Merge pull request #14207 from super626/terrain
fix shader on pc
2015-10-22 10:10:10 +08:00
yangxiao cca25f5b5c fix shader on pc 2015-10-22 09:29:12 +08:00
Dale Stammen ce88dbdee4 removed WP8.1 shader code 2015-10-16 14:48:03 -07:00
Dale Stammen 414a34f3f9 removed old WP8.1 shaders for gl_PointSize 2015-10-16 14:47:02 -07:00
Sebastien Flory bd83fc1474 PMA Handling issue
Hi,

I compared to cocos2D-x v2.x and it seems that there is an issue with the _hasPremultipliedAlpha flag not beeing set correctly for mipmaps and compressed textures.
I guess it's a mistake due to the reorganization of the code between the old CCTexture2D and the new one.
In our tests, this fixes the issue.

Best,

Sebastien
2015-10-15 15:48:21 +02:00
yangxiao 907189ed14 correct wrong presion, which leads to failed on some devices 2015-10-15 11:59:38 +08:00
Martin Taylor 62e36e8006 fix typos and syntax error. A thorough check by tool VSSpellChecker. 2015-09-22 16:08:23 +08:00
yangxiao ea538cd9da merge cocos 2015-09-16 10:37:24 +08:00
yangxiao ca24e6eba3 fix clone 2015-09-11 15:08:59 +08:00
yangxiao 6fd9784fce setParent for RenderState 2015-09-11 11:47:36 +08:00
yangxiao d5fab0bd38 merge cocos 2015-09-10 10:44:09 +08:00
yangxiao 8f5cd6cdc8 remove setParent 2015-09-10 09:28:01 +08:00
yangxiao 64471fab85 fix material clone 2015-09-10 09:23:02 +08:00
Nathanael Weiss 14b9c2e75c Fix crash in FrameBuffer if no DepthStencil
This fixes a debug-config crash if a FrameBuffer has no `RenderTargetDepthStencil`.
2015-09-08 13:13:38 -07:00
yangxiao c3ac446f35 resolve conflict 2015-09-07 14:45:09 +08:00
yangxiao 137d180dc9 fix material clone 2015-09-07 13:59:08 +08:00
WenhaiLin a3b5becb45 Sync v3.8 to v3 2015-08-31 22:05:37 +08:00
yangxiao bc07d7954a fix render state 2015-08-28 23:00:45 +08:00
pandamicro d6045fdbea Merge branch 'v3.8' of github.com:cocos2d/cocos2d-x into v3
Conflicts:
	cocos/audio/winrt/Audio.cpp
	cocos/platform/winrt/CCCommon.cpp
	cocos/platform/winrt/CCWinRTUtils.cpp
	cocos/platform/winrt/CCWinRTUtils.h
2015-08-27 10:40:04 +08:00
Ricardo Quesada d5d1be93cc make it compile on win32 2015-08-26 10:16:50 -07:00
yangxiao d17c04cf0e tmp 2015-08-26 16:35:42 +08:00
Ricardo Quesada dfed33f6f2 Adds `PrimitiveCommand` test 2015-08-25 15:07:03 -07:00
yangxiao 7dcc3dd982 Move CCTextureCube From 3d to renderer to solve compilation issue 2015-08-24 14:01:50 +08:00
fusijie cbd7eed9c4 fixed renderTexture crash bug. 2015-08-21 17:38:56 +08:00
yangxiao 8a6c49b5a3 merge cocos 2015-08-03 09:54:29 +08:00
pandamicro a011fa4c8a Merge pull request #12852 from super626/issue10242
fix #10242, reload shader when light number changed
2015-07-30 12:57:32 +08:00
tangziwen e4cf89e1c4 terrain update: can set Light direction manually, set light map, fix a bug which height map is not exist cause crash when destructing. 2015-07-29 13:24:12 +08:00
yangxiao 92ec9ab5f2 add config loaded event 2015-07-24 16:38:30 +08:00
andyque 7c665e6447 remove EMSCRIPTEN related code 2015-07-16 14:15:41 +08:00
yangxiao 69e79ed164 fix #10242, reload shader when light number changed 2015-07-15 11:36:53 +08:00
andyque 91dfb07a8c add more descriptive message to ASSET macro. 2015-07-14 15:28:36 +08:00
Vincent Yang d9bc8b7c1b fix bug: don't decrease _asyncRefCount correct in addImageAsyncCallback. 2015-07-09 17:06:55 +08:00
Vincent Yang 1f8b46e911 Fixbug: Need to replace thread unsafe code from TextureCache::addImageAsync. 2015-07-08 15:13:48 +08:00
yangxiao 269feeb1f9 remove stencil from Renderstate 2015-07-01 14:06:37 +08:00
yangxiao 13dbd44250 remove unused variable 2015-06-25 15:05:21 +08:00
yangxiao 63f948c822 modify skybox to projection space 2015-06-25 15:01:39 +08:00
pandamicro cc00cbedbe Merge pull request #12482 from yangws/fixbug_20214
fixbug: cpp-test -> NewRenderer (drag the layer to test the result of…
2015-06-23 21:09:59 +08:00
pandamicro 60372056ce Merge pull request #12484 from andyque/fix-nine-patch-image-error
fix nine patch image parser error on Windows.
2015-06-23 18:26:16 +08:00
pandamicro 2a0c2b6e32 Merge pull request #12250 from hawkwood/patch-10
Fails if file does not exist
2015-06-23 17:32:47 +08:00
andyque 7fff2bd3c4 fix nine patch image parser error on Windows. 2015-06-23 15:42:58 +08:00
Vincent Yang 4b768c5fd8 fixbug: cpp-test -> NewRenderer (drag the layer to test the result of culling), some object will be culling before out of screen. 2015-06-23 15:22:27 +08:00
pandamicro a2deddcf59 Merge pull request #12361 from dabingnn/v3_androidBugForVertexAttrib
fix android background and foreground bug with VertexAttributeBinding
2015-06-17 09:34:47 +08:00
Justin Hawkwood 90db6fe5d6 Added check that callback is set 2015-06-15 23:36:04 -07:00
Justin Hawkwood 9378b6704c Moved file check to alternate location 2015-06-15 23:31:52 -07:00
Huabing.Xu 19982aae00 fix android background and foreground bug with VertexAttributeBinding 2015-06-16 14:04:50 +08:00
Ricardo Quesada b167ab3e78 StateBlock() is public 2015-06-15 17:43:37 -07:00
Ricardo Quesada ca3da86da7 StateBlock::restore() is public
It is possible to restore to default state
2015-06-15 14:12:44 -07:00
pandamicro d0db40c4a6 Merge pull request #12080 from linshun/v3
issue #12078 added audio, network, physics, platform and storage group.
2015-06-15 12:45:11 +08:00
Ricardo Quesada 5c419ff7bc compiles on windows 2015-06-12 20:49:20 -07:00
Ricardo Quesada 9b7c12aa38 updates invalidate documentation 2015-06-12 17:44:48 -07:00
Ricardo Quesada a8cf72dc43 pass bits to invalidate 2015-06-12 17:14:09 -07:00
Ricardo Quesada 4278bf51b1 Adds RenderState::StateBlock::invalidate();
handy function to restore the GL state to the default one.
Only use it if calling GL calls directly
2015-06-12 16:47:08 -07:00
Vincent Yang 097bf455c2 Rename CCRenderBufferObject to CCRenderBuffer in windows projects. 2015-06-11 11:45:10 +08:00
Huabing.Xu 10352c40b2 Merge branch 'v3' into v3FrameBufferObject
# Conflicts:
#	cocos/2d/CCCamera.h
2015-06-10 10:16:42 +08:00
Justin Hawkwood 852639cfe7 Added empty string check 2015-06-09 09:19:04 -07:00
Huabing.Xu 67a94c4485 compiles on android and linux 2015-06-09 17:57:07 +08:00
Huabing.Xu ef4978f0cd move viewport to experimental namespace 2015-06-09 16:21:50 +08:00
Huabing.Xu 3e331128c6 file rename CCFrameBufferObject->CCFrameBuffer 2015-06-09 15:32:12 +08:00
Huabing.Xu 9acab65e4f rename FrameBufferObject->FrameBuffer
Move FrameBufferObject related class to experimental namespace
2015-06-09 10:59:43 +08:00
Justin Hawkwood eca488b85a Fails if file does not exist
This adds a callback with nullptr if the file does not exists.  Checking this before checking cache means that if a file is cached then deleted, the async call will fail.  To allow a cached but deleted file to return the texture, move the isFileExist check to ALTERNATIVE.

If leaving check where it is, on failure should it also check if the file was cached and remove it?
2015-06-08 17:14:15 -07:00
Michael Sotnikov dae8f788c1 improve rendering of inner shapes when outline is used 2015-06-08 12:56:43 +03:00
Huabing.Xu 133ef90c09 Merge branch 'v3Viewport' into v3FrameBufferObject
# Conflicts:
#	cocos/renderer/CCFrameBufferObject.h
2015-06-06 18:16:22 +08:00
Ricardo Quesada 453a3d93bc samplers are treated as uniforms 2015-06-05 14:55:33 -07:00
Huabing.Xu d35a8a3a9e add default FBO 2015-06-04 15:53:13 +08:00
Huabing.Xu ad1f7c472c add render buffer render target for color attachment 2015-06-04 11:18:35 +08:00
Ricardo Quesada b8957b176a fixes win compilation issues 2015-06-02 23:31:57 -07:00
Ricardo Quesada 872e4f5a4f removes logging 2015-06-02 17:50:34 -07:00
Ricardo Quesada 87a3a1844a Adds support for Autobindings in Shader
...part of Material
2015-06-02 16:56:59 -07:00
linshun 09b52331d1 issue #12078: added renderer group and removed core and support group. 2015-06-01 13:43:56 +08:00
Huabing.Xu 9bf15877e5 add applyViewport in camera. 2015-05-29 15:52:06 +08:00
Huabing.Xu 22ddf53539 Merge branch 'v3FrameBufferObject' into v3 2015-05-29 10:38:42 +08:00
Huabing.Xu 2d6d1b7a8c add android background and foreground switch support for framebufferobject 2015-05-28 17:08:36 +08:00
Huabing.Xu 9ffbe39f18 DepthStencil RenderTarget could be null, which can be used to detach the old DepthStencil RenderTarget 2015-05-27 18:16:05 +08:00
Huabing.Xu 9d4e50f3a5 add optional params for RenderTarget creation 2015-05-27 16:59:54 +08:00
Huabing.Xu 471547e0b0 refactor FrameBufferObject to FrameBufferObject and RenderTarget 2015-05-27 11:40:12 +08:00
Vincent Yang 246913c092 Fix bug: skybox can't move to other position except origin point in world space. 2015-05-26 17:14:26 +08:00
Huabing.Xu 83bae15caf Merge branch 'v3FrameBufferObject' of github.com:dabingnn/cocos2d-x into v3FrameBufferObject
# Conflicts:
#	cocos/2d/libcocos2d.vcxproj.filters
#	cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters
2015-05-26 12:06:05 +08:00
Huabing.Xu c22a8e81ce Merge branch 'v3' into v3FrameBufferObject 2015-05-25 16:56:22 +08:00
minggo 273ac5d00a Merge pull request #12002 from WenhaiLin/v3-texturecache-unbindfix
Fixed TextureCache::unbindImageAsync fails to unbind all asynchronous callback for a specified bound image.
2015-05-25 16:29:43 +08:00
WenhaiLin 234ad668ec Fixed TextureCache::unbindImageAsync fails to unbind all asynchronous callback for a specified bound image. 2015-05-25 11:47:37 +08:00
andyque 0352a7a3ea add Android 9-patch image format support
commit c214c4a7a457275785d6377031b5a267d543ffbb
Author: andyque <guanghui8827@126.com>
Date:   Mon May 18 17:16:09 2015 +0800

    Add Android 9-patch format support.

    Squashed commit of the following:

    commit a5a5a7a8f25b5bddae0ba21c56676a3f8d84102a
    Author: andyque <guanghui8827@126.com>
    Date:   Mon May 18 17:08:05 2015 +0800

        finish refactoring

    commit 730bf817f833de56999c616779fc0279890e14bf
    Author: andyque <guanghui8827@126.com>
    Date:   Mon May 18 11:47:08 2015 +0800

        refactoring 9-patch

    commit b45be6d54ac6e70a3fb9aa3eb700b252e4e72a54
    Author: andyque <guanghui8827@126.com>
    Date:   Mon May 18 09:42:06 2015 +0800

        refactor

    commit 384110193f1d581c4a0fb7a2c771c55f1db63cbf
    Author: andyque <guanghui8827@126.com>
    Date:   Fri May 15 17:59:21 2015 +0800

        fix lua and Android compile error

    commit 2877538fb3a436f95400b2ad637ea147b9df81d7
    Author: andyque <guanghui8827@126.com>
    Date:   Fri May 15 11:32:43 2015 +0800

         Add Android 9-patch image format support.

        The 9-patch format is used for creating Scale9Sprite.
2015-05-21 16:04:37 +08:00
Ricardo Quesada f2d3ecad48 Removes state from MeshCommand.
MeshCommand can be reused from other objects either by passing a
`Material` or a `RenderState::StateBlock`
2015-05-20 15:57:26 -07:00
Ricardo Quesada ac54dad9a0 MeshCommand uses StateBlock
When MeshCommand is used with GLProgramState, it will use the StateBlock
internally, instead of the manual and error prone way of keeping state
2015-05-19 18:13:18 -07:00
Ricardo Quesada aa027fbe0f Properties fixes
`createNonRefCounted` instead of `CrateWithoutAutorelease`
`readlines()` code is easier to read. Same performance
2015-05-19 13:51:52 -07:00
Vincent Yang 8d3ade78ca Add CC_DLL to Class FrameBufferObject. 2015-05-19 13:50:10 +08:00
Huabing.Xu 75f740add5 linux works 2015-05-18 18:08:15 +08:00
minggo 7b76d5fc41 Merge pull request #11871 from walzer/v3
fixed #11821, after release StateBlock::_defaultState, set it to null.
2015-05-18 14:47:16 +08:00
Huabing.Xu f96e704f7d Merge branch 'v3' into v3FrameBufferObject
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
	cocos/cocos2d.h
	cocos/renderer/CCGLProgramCache.cpp
2015-05-18 13:48:50 +08:00
walzer 02f295dfbf fixed #11821, after release StateBlock::_defaultState, set it to null, because developers would reconstruct it. 2015-05-18 10:44:49 +08:00
Huabing.Xu fbe49f538d remove WP8 code which is added by accident when resolve merge conflicts 2015-05-15 10:06:44 +08:00
Huabing.Xu c994f28914 Merge branch 'v3' into v3_CameraMaskFor2DAnd3DRendering 2015-05-15 09:55:51 +08:00
Ricardo Quesada 989848a358 fixes memory leak
improves performance a little bit
2015-05-14 17:24:27 -07:00
Huabing.Xu 84540c1ff4 Merge branch 'v3' into v3_CameraMaskFor2DAnd3DRendering
Conflicts:
	cocos/renderer/CCGLProgramCache.cpp
	tests/cpp-tests/Classes/controller.cpp
2015-05-14 11:55:10 +08:00
Huabing.Xu 57a3fa256a Fix memory leak for FrameBufferObject 2015-05-14 11:19:13 +08:00
Huabing.Xu e6e0a1d15c refactor: FrameBufferObject will contain an Texture2D instead of inheriting from Texture2D 2015-05-14 10:36:49 +08:00
Ricardo Quesada fde5f8d63c Adds better sample
adds clone support as well
2015-05-13 17:39:39 -07:00
Ricardo Quesada aeea7ade14 RenderState can be part of Material and Technique 2015-05-13 14:12:37 -07:00
Ricardo Quesada e95de4de62 fixes mipmap issue with parsing Sampler 2015-05-13 10:24:32 -07:00
Huabing.Xu 8311cf8920 Fix clearcolor overwrite bug
change test case for FrameBufferObject
2015-05-13 17:40:10 +08:00
Huabing.Xu 6097b4ddd2 add clearAllFBOs function in FrameBufferObject 2015-05-13 17:17:54 +08:00
Huabing.Xu 42514ee62f FrameBufferObject works 2015-05-13 14:24:53 +08:00
Ricardo Quesada c693573d77 more samples
and API fixes
2015-05-12 22:24:52 -07:00
Ricardo Quesada a83c10fdbf Merge pull request #11807 from ricardoquesada/material_vertexattrib
Adds support of VertexAttribBinding per Pass
2015-05-12 21:05:02 -07:00
Ricardo Quesada d23ff0ea2c Adds support of VertexAttribBinding per Pass 2015-05-12 19:58:09 -07:00
minggo a587b28e38 Merge pull request #11792 from super626/v3
particle3d can not be seen when added to scene with terrain
2015-05-13 09:38:21 +08:00
Huabing.Xu f0acf7ee7b original version of frame buffer object 2015-05-12 16:43:17 +08:00
Ricardo Quesada 1937431596 Material uses new file format
The new file format is easier to read and less error prone
It also fixes many bugs and adds new test cases
2015-05-11 21:31:33 -07:00
yangxiao 4d71175318 resove conflict 2015-05-12 12:12:29 +08:00
Huabing.Xu cc0b3ffd2e Merge branch 'v3' into v3_addClearforCamera
Conflicts:
	cocos/renderer/CCGLProgramCache.cpp
	tests/cpp-tests/Classes/controller.cpp
2015-05-12 09:49:15 +08:00
songchengjiang f25c02f230 fix bugs of terrain 2015-05-11 12:02:32 +08:00
Dale Stammen 351a898a70 removed CC_PLATFORM_WP8 2015-05-08 09:19:13 -07:00