Commit Graph

52 Commits

Author SHA1 Message Date
James Chen 07cc734c8c setAnimationInterval -> setPreferredFramesPerSecond and binds setPreferredFramesPerSeconds. (#1244)
* setAnimationInterval -> setPreferredFramesPerSecond.

* Binds setPreferredFramesPerSeconds.

* typo fix in CCApplication-win32.cpp
2018-05-16 18:06:26 +08:00
James Chen 727a4911d4 [runtime] Adds jsb.openURL, __getOSVersion, __getCurrentLanguage interfaces. (#1238) 2018-05-11 16:03:17 +08:00
James Chen 57f8268e14 Display whether GL Opt mode is enabled! (#1216) 2018-04-26 16:46:40 +08:00
James Chen ae5c569345 Adds jsb.openDebugView interface, supports to display JSB invocation count. (#1214)
* Adds jsb.openDebugView interface, supports to display JSB invocation count.

* Removes unused log in JniImp.cpp.

* Removes unused log in Cocos2dxRenderer.java
2018-04-26 15:59:20 +08:00
minggo 87a4301d8f unify js_loadImage (#1210)
* fix Texture2D::addSubImage()

* unify the logic of js_loadImage

* simplify codes
2018-04-24 16:27:03 +08:00
James Chen 4d9d82ecee fix memory issue in jsb.loadImage. (#1206) 2018-04-20 19:32:13 +08:00
James Chen f944be8574 Adds DebugView support. (#1203) 2018-04-20 14:53:16 +08:00
James Chen a1321302b4 Rename __gl to __ccgl to avoid conflict. Memory issue fixes in JSB_glGetProgramInfoLog and JSB_glGetShaderInfoLog (#1201)
* Revert "Removes FPS display code in Cocos2dxRenderer.java."

This reverts commit 71984ef41c.

* Rename __gl to __ccgl to avoid conflict.

* memory issue fixes in JSB_glGetProgramInfoLog and JSB_glGetShaderInfoLog

* Adds FIXME for FPS display in Cocos2dxRenderer.java.
2018-04-20 10:35:33 +08:00
James Chen c1a0786234 remove unused comments, register gl functions inside __gl variable. 2018-04-14 20:53:00 +08:00
James Chen 22c9dd2b5a FPS output., file:// scheme check. glTexSubImage2D binding fix. 2018-04-12 14:57:34 +08:00
James Chen a750c0ec4c More standard WebGL Binding.
WebGLRenderingContext, WebGLTexture, WebGLBuffer, WebGLRenderBuffer, WebGLFramebuffer, WebGLProgram, WebGLShader.
2018-04-08 21:32:43 +08:00
James Chen 016553cdf3 [mac] Shader version should be at least 120 to fix "GLSL 110 does not allow sub- or super-matrix constructors" issue. (#1179)
* Don't use regex match for getting base64 string. Uses string pointer offset instead.

* [mac] Shader version should be at least 120 to fix "GLSL 110 does not allow sub- or super-matrix constructors" issue.

* bug fix of shaderSource.find("#version", ...);
2018-04-03 10:09:13 +08:00
James Chen d92ab3cbe7 touch event should also pass pageX, pageY. jsb.loadImage supports data base64 string. (#1174)
* touch event should also pass pageX, pageY.

* jsb.loadImage supports data base64 string.
2018-03-30 07:41:59 +08:00
James Chen fa440b83c2 getImageInfo -> loadImage, compatible with new renderer. 2018-03-23 15:51:22 +08:00
James Chen 4ee7981630 Merge branch 'new-renderer' of git://github.com/cocos-creator/cocos2d-x-lite into runtime
# Conflicts:
#	cocos/platform/mac/CCCanvasRenderingContext2D-mac.mm
#	cocos/scripting/js-bindings/manual/jsb_gfx_manual.cpp
2018-03-23 15:42:12 +08:00
minggo 0be49352d0 H5 adapt merge (#1164)
* h5 adpator

* adapt to h5 engine
2018-03-23 15:26:09 +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 9b2aaf1cd0 getImageInfo is async method now. Clear autoreleasepool at the end of frame. (#1150) 2018-03-17 09:48:32 +08:00
James Chen c3602eb1e3 [runtime] Android testcase works. (#1148)
* Adds jsb_run_script_module for CommonJS module, reverts original `require`.

* Uses window.gameTick for sending tick event.

* Removes unused scripts.

* Android testcase works.
2018-03-15 18:12:38 +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 992594b865 module fix. 2018-03-11 21:39:22 +08:00
James Chen 7914353483 Better log display for require 2018-03-07 10:01:35 +08:00
James Chen 318678be29 common js module fix. 2018-03-06 10:41:24 +08:00
James Chen e83be4b12f fix missing getFileOperationDelegate for v8. 2018-03-05 17:42:50 +08:00
James Chen 88123dbb7b Updates opengl binding and module fix. 2018-03-05 11:00:02 +08:00
James Chen 235ad32f5e Updates opengl bindings 2018-03-02 11:02:13 +08:00
James Chen 154bbd29ce Removes code for debugging. 2018-03-01 13:49:47 +08:00
James Chen 983e87e9a6 module cache works. 2018-03-01 10:31:27 +08:00
James Chen 3f88e14de9 require supports module.exports. 2018-02-27 17:03:28 +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
yinkaile 3fb0cc276d support zip compress js files (#1001) 2017-11-21 16:08:17 +08:00
James Chen 4a61e1423f Re-binds OpenGL interfaces. (#976)
* Adds opengl bindings code.

* Register OPENGL module.

* Updates Android.mk

* Updates win32 project configuration.

* Supports boolean -> integer conversion.

* glXXXXv count fix.

* GLNode needs to inherit from Node.

* Updates bindings.

* size fix in JSB_glGetUniformfv.

* JSB_glGetSupportedExtensions fix.
2017-11-14 18:05:14 +08:00
James Chen 7d0979da3c Unify jsc parsing flow for SpiderMonkey. 2017-11-02 11:12:39 +08:00
James Chen f0d2eeb2b3 Adds jsb_set_extend_property for easily setting extend property.
Adds jsb_init_file_operation_delegate and jsb_enable_debugger for easily use in AppDelegate.cpp.
2017-10-09 14:57:14 +08:00
2youyouo2 5cfc3ec097 change onGetDataFromFile param to callback function 2017-09-28 17:06:55 +08:00
2youyouo2 f4fcf75547 Adds static keyword for removeFileExt function. 2017-09-28 15:32:00 +08:00
2youyouo2 bc8c5c1bee add xxtea support 2017-09-27 16:03:07 +08:00
James Chen 6c40f2783f More renames: gc -> garbageCollect, isInGC -> isGarbageCollecting, _setInGC -> _setGarbageCollecting 2017-08-31 15:52:58 +08:00
James Chen f21fea4344 executeScriptBuffer -> evalString, executeScriptFile -> runScript. 2017-08-31 15:00:23 +08:00
James Chen 53250dad49 se::Ref -> se::RefCounter, addRef -> incRef, release -> decRef
This is for distinguishing from cocos2d::Ref.
2017-08-31 14:24:34 +08:00
James Chen 7268053a4f SpiderMonkey bytecode works again. 2017-08-21 18:10:10 +08:00
James Chen 2fab54c612 fix ios crash after closing app in task manager. 2017-08-18 14:34:55 +08:00
James Chen 73e45e92e4 Adds MappingUtils file, box2d works again. 2017-08-18 14:34:55 +08:00
James Chen 1a029399f9 Adds BaseJSAction and cleanup. 2017-08-16 15:42:26 +08:00
James Chen f80802f97e more se::HandleObject use. 2017-07-31 16:18:01 +08:00
James Chen 854aa81c0d JSB_PRECONDITION2->SE_PRECONDITION2 2017-07-31 10:57:59 +08:00
James Chen e5edd5d6cf cleanup. 2017-07-20 17:50:40 +08:00
James Chen b3db0a842a add modules register 2017-07-12 11:15:46 +08:00
James Chen 2808497a88 clearException after manually registration. 2017-07-11 13:40:04 +08:00