Commit Graph

130 Commits

Author SHA1 Message Date
minggo 0fe162ad88 fix typo (#1559) 2018-10-23 18:04:14 +08:00
minggo a8770252e4 fix bug that rendertexture can not work correctly sometimes (#1556) 2018-10-23 09:48:38 +08:00
leda dada2eb244 move "cocos2d::experimental::" to "cocos2d::" on Audio (#1549)
* remove “experimental” in audio dir

* update audio bindings

* fix "{" match error

* no need "experimental" for thread pool

* remove both out-of-date js api files
2018-10-18 13:34:12 +08:00
leda 71d8cf11ad refine native module separate (#1547)
* refine module separate -> gfx renderer

* refine module separate

* modify Application.mk, add macro

* “#if USE_GFX_RENDERER” means “#if USE_GFX_RENDERER > 0”

* improve macro define in binding code
2018-10-18 09:10:05 +08:00
wen xing liao a08759368b complete check parameters (#1542)
* [bug] framebuffer-test.js complete check parameters

* [bug] complete check parameters

* [bug] framebuffer-object-attachment.js complete check parameters

* [bug] tex-input-validation.js complete check parameters

* [bug] read-pixels-test.js complete check parameters

* [bug] drawArrays complete check parameters

* Remove macro definition

* Remove macro definition
2018-10-12 14:13:18 +08:00
W-MTZing d27e5a798c remove log names about cocos (#1496) 2018-09-05 10:51:42 +08:00
leda 19ab61b252 refine TODO & FIXME flag (#1450)
* change TODO to REFINE

* change REFINE:cjh to REFINE

* change FIXME to IDEA

* improve format
2018-08-10 12:52:00 +08:00
leda ccb40bdeda move CCAsyncTaskPool from cocos/base into extensions folder (#1422)
* move CCAsyncTaskPool path

* move CCAsyncTaskPool path for ios & mac project

* change header path

* adapt CCAsyncTaskPool path for win32

* divide win32 build object files into Debug and Release folder
2018-07-26 10:11:55 +08:00
leda b3b37cf457 Add AssetsManager to iOS & Mac & Android & win32 (#1405)
* Add incomplete AssetsManager to iOS & Mac

* remove Android.mk refer on Xcode project config

* re-add assetmanager for android

* re-add assetmanager for win32 project config

* remove unused macro define for win32

* remove unused marco define COCOS2D_JAVASCRIPT

* added header include for assetsManager

* Add CCAsyncTaskPool

* Fix AssetsManager event trigger issue

* update win32 project config, added CCAsyncTaskPool

* add CCAsyncTaskPool to extensions Android.mk
2018-07-23 17:50:04 +08:00
leda 723f52a472 win32 link/default template compile and link pass, but not works when run (#1321)
* modify file changes on project config

* correct libcocos2d compile

* add win32 props back

* Revert "fix windows link template (#1138)"

This reverts commit 332d95e5b8.

* correct compile error

* many link errors need to be solved

* added part lack methods

* add empty impl for canvas rendering context 2d

* update main.cpp

* correct audio/network compile and link error

* sync win32 application logic with mac

* remove wrong change on application-win32

* correct win32 default-template compile and link error

* win32 simulator part compile error fixed

* editbox define changes
2018-06-22 10:19:31 +08:00
James Chen da45e32ada Removes unused files and code. (#1277) 2018-05-31 17:58:35 +08:00
James Chen 712173a8de Supports DeviceMotionEvent and removes more unused code. (#1275)
* Binds Device class

* Removes ccFPSImage.c/h

* Updates Android.mk

* Supports DeviceMotionEvent and removes more unused code.

* Uses fprintf to implement SE_LOGD & SE_LOGE .
2018-05-31 14:08:20 +08:00
James Chen 1556a16e27 ccVertexAttribPoiner fix. (#1266) 2018-05-24 17:20:32 +08:00
James Chen 1bb1806099 Supports Compressed Textures. (#1260)
* Updates CCConfiguration.h/.cpp.

* Supports Compressed Textures.

* Constructs Configuration singleton in Application constructor.

* Move Configuration::getInstance after createView.
2018-05-23 19:10:49 +08:00
James Chen 5f4e814ade Supports mouse event for desktop platforms. (#1256) 2018-05-22 14:03:54 +08:00
James Chen ee5faac763 Move logic of flipY and premultiplyAlpha from jsb_opengl_manual.cpp to CCGLUtils.cpp. (#1249)
* Native Renderer supports GL_UNPACK_FLIP_Y_WEBGL & GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL.
And adds ccFlipYOrPremultiptyAlphaIfNeeded, ccIsUnpackFlipY, ccIsPremultiplyAlpha, ccPixelStorei GL utils.

* seval_to_TextureSubImageOption: uint16_t* -> uint32_t* since width * height * 4 may bigger than 65536 bytes.

* Move logic of flipY and premultiplyAlpha from jsb_opengl_manual.cpp to CCGLUtils.cpp.

* Reverts.
2018-05-18 15:53:28 +08:00
minggo 8a76997242 adapt mac resolution (#1248) 2018-05-18 11:57:12 +08:00
minggo 4a13d0e15e Downsample (#1245)
* support render texture

* use texture unit 0

* add functions to set device pixel ratio

* add ccDeleteBuffers again

* fix according comments
2018-05-17 14:05:05 +08:00
James Chen 6b4594f666 Adds fixme to CCGLUtils.cpp. 2018-04-19 10:59:26 +08:00
James Chen 144175449f ccDeleteBuffers should consider CC_ENABLE_GL_STATE_CACHE. 2018-04-19 10:57:29 +08:00
James Chen c1a0786234 remove unused comments, register gl functions inside __gl variable. 2018-04-14 20:53:00 +08:00
James Chen 58310293f2 more cache fix. 2018-04-14 15:59:18 +08:00
James Chen fb0eb1bd48 ENABLE GL STATE CACHE by default. Uses JSB_GL_CHECK_VOID in glFlushCommand 2018-04-14 15:15:42 +08:00
James Chen 3dfe05f4cc glBindXXX glActiveTexture cache. 2018-04-14 13:43:44 +08:00
James Chen b648d0d41e Fixes thread race issue in getImageInfo method. (#1153)
NOTE: FileUtils::getInstance()->fullPathForFilename isn't a threadsafe method, Image::initWithImageFile will call fullPathForFilename internally which may cause thread race issues. Therefore, we get the full path of file before going into task callback. So be careful of invoking any Cocos2d-x interface in a sub-thread.
2018-03-19 18:11:13 +08:00
James Chen bf1b4f7124 [runtime] Audio works. (#1151) 2018-03-17 11:22:56 +08:00
James Chen 9b2aaf1cd0 getImageInfo is async method now. Clear autoreleasepool at the end of frame. (#1150) 2018-03-17 09:48:32 +08:00
James Chen f0a79242d7 Android compile ok. (#1145)
* Android compile ok.

* Fixes for Android build .
2018-03-14 10:28:03 +08:00
James Chen 26e8259389 Merge branch 'new-renderer' of git://github.com/cocos-creator/cocos2d-x-lite into new-renderer 2018-03-12 15:34:45 +08:00
minggo 0d483a9b07 add back network (#1141)
* add back network

* add network back on windows
2018-03-09 16:20:48 +08:00
James Chen 4faf331229 Adds csscolorparser lib. 2018-03-09 12:37:27 +08:00
James Chen 626f13ff2d fastSet needs to clear data at first. 2018-03-08 17:36:30 +08:00
minggo aebdc1c77f fix compiling isssue of link template on iOS, Mac and Android (#1139) 2018-03-07 17:06:15 +08:00
minggo c4c24c9d54 windows works with new renderer (#1137) 2018-03-07 14:31:46 +08:00
minggo aa3d6f0cde remove unneed files (#1135) 2018-02-28 17:24:34 +08:00
minggo 15b34c81dc dispatch touch event on iOS (#1101) 2018-02-09 09:26:44 +08:00
minggo 802e48080e New renderer (#1097)
* build work on mac

* build ok on iOS

* fix compiling error on android

* fix android link error
2018-02-08 10:40:29 +08:00
Jare Guo d9bd3d763c update license (#1089)
* updating license

* update license
2018-02-01 15:20:01 +08:00
James Chen cc40611944 fixed #1041: Potential crash in invokeJSTouchOneByOneCallback. (#1043)
And fixed potential invalid se::Object after invoking cc.director.getScheduler/getActionManager/getEventDispatcher, cc.SpriteFrame/Sprite.getTexture.
Added hook functions in EventDispatcher, TextureCache to prevent using dangerous se::Object.
Stop propagation for TouchOneByOne event should only affect current Touch point.
Fixed updateListener may not be invoked.
2018-01-02 13:56:26 +08:00
James Chen c22673d440 Provides an interface for getting SafeArea (#1008)
* Provides an interface for getting SafeArea

* @available(iOS 11.0, *) isn't supported in Xcode8. So we use the old way.
2017-11-23 13:39:35 +08:00
James Chen f8b9f8134c bug fixs from #959 but except changes in CCSpriteBatchNode.cpp. (#991)
* bug fixs

* Reverts changes in CCSpriteBatchNode.cpp
2017-11-16 14:00:11 +08:00
James Chen 94840bb5c2 Fixes potential crash in eventDispatcher.removeListener(listener). (#982)
It may invoke `releaseListener` two times if it's dispatching event. `releaseListener` will call releaseScriptObject internally which may cause the `listener` being garbage collected.
It's hard to reproduce this issue in v1.6 since v1.6 uses SpiderMonkey as its JS engine which is not sensitive to do a GC operation.
2017-11-14 14:50:05 +08:00
yinkaile 169a60b157 refine code 2017-11-01 11:36:55 +08:00
yinkaile 879c6488a5 refine code 2017-11-01 10:55:14 +08:00
yinkaile fd73955d10 fixed MatrixStack::pop 2017-11-01 09:35:03 +08:00
yinkaile d7fa1f9e13 rename director culling functions 2017-10-31 18:23:13 +08:00
yinkaile 40432bda34 add MatrixStack class 2017-10-31 18:14:11 +08:00
yinkaile 26ff253d8c support dynamic enable/disable culling 2017-10-31 15:37:12 +08:00
yinkaile b784973426 optimize director matrix operation 2017-10-31 15:36:20 +08:00
pandamicro ace6e0bee3 Merge pull request #871 from pandamicro/develop
Add CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL_TMX to control texture shrink…
2017-10-01 20:49:47 +08:00