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
442c149053
Implements Application::restart and some fixes. ( #1253 )
...
* Implements Application::restart.
* SAFE_DEC_REF should reset pointer to nullptr.
* Class::cleanup should be after of JSGlobalContextRelease.
* WebGLObject needs to be released if ScriptEngine is in cleanup process.
* Fixes memory leak in JSB_glGetActiveAttrib
2018-05-21 18:46:12 +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
357d87d8bc
WebGLObject inherits from cocos2d::Ref. autorelease it instead of deleting it to avoid to use invalid WebGL objects. ( #1243 )
2018-05-16 10:18:58 +08:00
James Chen
6ff58a79df
FlipPixelsY logic fix. ( #1239 )
2018-05-11 21:42:43 +08:00
James Chen
ad94db2c71
Binds getFramebufferAttachmentParameter and fix memory issues in uniform[1234]v. ( #1204 )
...
* Binds getFramebufferAttachmentParameter and fix memory issues in uniform[1234]v.
* FPS uses integer.
* revert.
* Removes unused import package.
2018-04-20 17:25:10 +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
a6c1a1301f
Removes glClear fixme.
2018-04-19 13:47:16 +08:00
James Chen
207605bbff
Bind getVertexAttrib & getVertexAttribOffset
2018-04-17 23:10:25 +08:00
James Chen
8294fd9776
tex[Sub]Image2D supports passing nullptr as data.
2018-04-16 15:56:41 +08:00
James Chen
fde80e75b2
flushCommands -> _flushCommands
2018-04-14 21:16:51 +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
746dc35354
Uses custom framebufferRenderbuffer, renderbufferStorage.
2018-04-13 14:25:54 +08:00
James Chen
22c9dd2b5a
FPS output., file:// scheme check. glTexSubImage2D binding fix.
2018-04-12 14:57:34 +08:00
James Chen
f9f1228e51
bindFramebuffer fix.
2018-04-10 19:05:06 +08:00
James Chen
508f7aabdd
Adds gl optimaization support.
2018-04-10 17:39:57 +08:00
James Chen
29ac7a11a4
Reverts glViewPoint binding.
2018-04-09 13:57:42 +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
8dc0f35714
[ios] Fixes bugs about multisampling and GL_DEPTCH_STENCIL_ATTACHMENT ( #1175 )
...
* [ios] Fixes bugs about multisampling.
* [ios] Should use opengl es2
* Fixes compilation issues in DeviceGraphics after switching back to opengles2.
* glFramebufferRenderbuffer GL_DEPTH_STENCIL_ATTACHMENT fix in webgl binding.
* Comment some code of invoking opengles3.0 methods in gfx/Texture2D.cpp.
2018-03-30 17:44:08 +08:00
James Chen
deda8af50a
premultiply alpha works. ( #1169 )
...
* premultiply alpha works.
* GL_UNPACK_COLORSPACE_CONVERSION_WEBGL isn't supported.
2018-03-27 15:38:47 +08:00
James Chen
5d0f97697e
Fixed some webgl binding issues. ( #1168 )
...
* Fixes wrong conversion, lots of opengl should pass in `float` but we passed `int` value.
* [ios] Initialize Application should be in firstStart: method.
* Implements unpackFlipY for GL_RGBA & GL_RGB format texture.
* FIxed some webgl binding issues.
2018-03-26 18:23:20 +08:00
James Chen
7667b00f87
More WebGL binding fixes. ( #1160 )
...
* Less opengl binding files.
* recreateBuffer in CanvasRendereringContext2D constructor.
* gl.bindFrameBuffer(gl.FRAME_BUFFER, null) needs to set to default frame buffer .
* Fixes JSB_glGetActiveUniform use GL_ACTIVE_ATTRIBUTE_MAX_LENGTH to get the max length, we need to use GL_ACTIVE_UNIFORM_MAX_LENGTH instead.
* glBufferSubData supports typedarray with 0 length. Adds more API for CanvasRenderingContext2D.
2018-03-22 16:03:34 +08:00
James Chen
fe91680060
Adds ctx.fillRect interface, JSB_get_arraybufferview_dataptr supports null or undefine converstion.
2018-03-12 15:25:47 +08:00
James Chen
0dc072baab
More WebGL binding fixes.
2018-03-07 10:04:20 +08:00
James Chen
2483633303
webgl bindings fix.
2018-03-06 10:41:39 +08:00
James Chen
e83be4b12f
fix missing getFileOperationDelegate for v8.
2018-03-05 17:42:50 +08:00
James Chen
235ad32f5e
Updates opengl bindings
2018-03-02 11:02:13 +08:00
Jare Guo
d9bd3d763c
update license ( #1089 )
...
* updating license
* update license
2018-02-01 15:20:01 +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
0fe0580b5f
deletes unused files.
2017-08-11 11:42:13 +08:00
pandamicro
0b4dc3605f
Remove Chipmunk
2017-06-30 18:02:01 +08:00
pandamicro
f72d66db24
Refactor JSFunctionWrapper & Use MutableHandleValue for conversion’s return value
...
Upgrade to Spidermonkey v52. pass 8
2017-06-30 18:01:58 +08:00
pandamicro
40248c0c73
Upgrade to Spidermonkey v52. pass 4
2017-06-30 18:01:54 +08:00
pandamicro
9f321538cf
Upgrade to Spidermonkey v52. pass 2
2017-06-30 18:01:53 +08:00
pandamicro
17c5e5d779
Upgrade to spider monkey 52, pass 1
2017-06-30 18:01:51 +08:00
pandamicro
f4e3341115
Sync js bindings code from cocos2d-x v3.14
2017-01-06 16:59:40 +08:00
pandamicro
f05b67e287
Upgrade cocos/scripting to v3.13
2016-08-09 18:17:42 +08:00
Wenhai Lin
94c95d5838
Withespaces does matter.
2016-03-31 23:50:02 +08:00
Wenhai Lin
a6dbf31dcf
cocos 2d lite version
2016-03-29 17:55:48 +08:00