Commit Graph

44 Commits

Author SHA1 Message Date
halx99 41f5307d36 Refine director access [ci build] 2021-02-05 23:09:14 +08:00
HALX99 b342ebd7ae
Refactor programState management (#236)
1. Add custom program registery
2. Re-enable batch draw for custom program
2020-10-16 16:23:14 +08:00
halx99 a735abaf65 Take care _programState use 2020-07-21 23:11:03 +08:00
coulsonwang 912ba30e49 remove duplicated PrgramState instance in the derived class of Node (#20350) 2019-11-20 11:04:42 +08:00
coulsonwang 67ae2e756e fix ProgramState and Program performance (#20189)
* fix ProgramState and Program performance

* fix review

* fix

* add autorelease
2019-10-15 09:40:59 +08:00
coulsonwang c4e6ede197 move VertexLayout to ProgramState (#20029)
* move VertexLayout to ProgramState

* fix lua
2019-08-15 16:51:49 +08:00
coulsonwang 7b7cf55efb remove vertex step mode (#19921) 2019-07-17 13:59:37 +08:00
Arnold 98d5f37a30 fix lua-tests errors (#19646)
* enable test case

* save

* generate enum classes

* save

* autobindg backend interface

* safe

* fix typos

* fix setUniform

* enable draw primitives and fast tmx tiled map

* save all

* update

* fix compile error on mac

* fix locations

* fix locations

* deduce vertexlayout

* clean

* compile on mac

* fix resource path

* save

* update bindings-generator

* remove unused code

* rename ccbackend to ccb

* remove todo
2019-05-05 00:26:34 -07:00
Arnold 3a1b6f28b6 fix default FrontFace & Skybox DepthFunc (#19540) 2019-03-24 19:08:04 -07:00
coulsonwang a8e54b9b53 [Feature] update attribute setting 2019-03-12 21:05:03 +08:00
coulsonwang e69e7e0b30 [Feature] support cubeMapping in metal (#19469) 2019-03-07 11:08:12 +08:00
minggo 1e7a6f7fcf
Issue19416 (#19427)
* use more meaningful names

* remove unneeded types
2019-02-22 14:06:26 +08:00
minggo 480d964039
removed duplicated shaders (#19406) 2019-02-19 11:57:13 +08:00
Arnold fd1d5d2dd7 [3D] texture cubemap GL & skybox (#19401) 2019-02-19 10:15:24 +08:00
minggo 7dcee2bcf9
Remove ccglstatecache (#19013) 2018-09-11 14:39:30 +08:00
leeda 18a6d8241d update Copyright. might need manual fix later (#18659)
* Copyright use python script updated. might be fix by manual later

* Revert "Copyright use python script updated. might be fix by manual later"

This reverts commit 49e99418e4da1fd02afda448ddeb16210f5e8c71.

* re modify copyright, consider utf-8-sig encoding

* another situation, add Copyright before  "Permission is hereby granted"

* Revert "another situation, add Copyright before  "Permission is hereby granted""

This reverts commit ee82591d32353c7ce2e146fe51ef447433b47571.

* another situation, add Copyright before Permission is hereby granted

* change "Copyright (c) 2016-2016 Chukong Technologies Inc." to " Copyright (c) 2016 Chukong Technologies Inc."

* script modify copyright, consider is cocos copyright or not

* change "Copyright (c) 2017 Chukong Technologies Inc." to "Copyright (c) 2016 Chukong Technologies Inc."

* manual fix, not fix audio related

* change "2016-2016" to "2016"
2018-01-29 16:25:32 +08:00
CocosRobot d07794052f Update license to 2017 (#17362)
* Typo: CopyRight -> Copyright

* Copyright update: chukong-inc.com -> Chukong Technologies Inc.

* [js files] Copyright update: 2014 -> 2014-2017

* [cpp files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2015 -> 2015-2017

* [js files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2016 -> 2016-2017

* Copyright update: 2013 -> 2013-2017

* Copyright update: 201?-201? -> 201?-2017

* License year fixes.

* Liscene year fix in CCRay.cpp

* Updates license years in CCGLProgramState.h & CCGLProgramStateCache.h
2017-02-14 14:36:57 +08:00
mogemimi 1d2b73166e Fix typos in docs (#17132) 2017-01-11 09:31:45 +08:00
pyrosphere 663bb4d7ed No CC_UNUSED_PARAM (#16812)
* Added -Wno-unused-parameter and removed all uses of the CC_UNUSED_PARAM macro

* Commented unused parameter names in .cpp files which previously used CC_UNUSED_PARAM

* Reverted -Wno-unused-param flag.
Moved deprecated touch methods definitions to .cpp file.
Commented more unused parameter names.

* Fixed some errors and warnings caused by the previous commit.

* Commented remaining unused parameter names in .cpp files.

* Fixed unused parameter warnings in headers.

* Fixed some more unused parameter warnings.

* Fixed some more unused parameters warnings.

* Fixed mistake in previous commit, missing ComAudioReader:: in method. Other warnings.

* Fixed build errors.

* Added missing file to CMakeLists
2016-11-16 09:48:37 +08:00
Paul Gardiner 6b27f014fc Correct the Skybox fov (#16655)
* Remove undrawn quads from the skybox mesh

CCSkybox had been implemented using a combination of two
inconsistent techniques. The rendering was being achieved via use of
the vertex shader's inherent support for cubemaps. That technique requires
only a single screen-covering quad, but the implemtation defined a cube.
Defining a cube mesh would be appropriate if one were simply mapping the
cubemap's 6 textures to faces, but is unnecessary if using the shader's
cubemap feature.

Not only was the use of a cube mesh unnecessary, but the particular way
the cube was defined and used meant that only one face would ever
contribute to the rendering. One of the other faces would always be culled
and the other four would be viewed edge on, mapping the the infinitesimally
thin lines defining the edges of the screen.

This commit simply removes the never-rendered faces, and adds comments
explaining the technique.

* Within test code, remove setScale calls applied to skyboxes.

A Skybox is defined in such a way that it's position, rotation and
scaling has no effect on it's rendering, so setScale has no effect.
The calls are removed from test code to avoid confusing anyone using
it as a template for their own programs.

* Make the Skybox correctly account for the camera's fov

The Skybox does not use the model/view and projection matricies. Instead
a single quad that maps exactly to the screen is rendered and the camera's
world matrix is passed into a shader that renders using cubemap lookups.
The way that works hardwires the fov to 90deg in both the horizontal and
vertical. That shows up particularly badly when the camera is pointed
directly downwards and rotated: the image deforms as it rotates.

This commit corrects the problem by using scaling factors from the
camera's projection matrix to prescale the matrix passed into the shader.
2016-10-17 13:46:26 +08:00
yangxiao 7884138dcc disable blend when drawing skybox 2015-08-25 14:32:25 +08:00
yangxiao 7dcc3dd982 Move CCTextureCube From 3d to renderer to solve compilation issue 2015-08-24 14:01:50 +08:00
yangxiao 8f81267960 skybox is not transparent 2015-08-19 18:25:34 +08:00
yangxiao f4a81f0e53 optimize draw 2015-06-25 15:14:44 +08:00
yangxiao 63f948c822 modify skybox to projection space 2015-06-25 15:01:39 +08:00
Ricardo Quesada 2a3347dd49 RenderState: default state fixes
parts of cocos2d code calls GL directly.
This should be avoided since v3.7 since the
`RenderState::StateBlock::_defaultState` won't know that
and the state will be invalid.
In order to fix this issue, after calling GL directly, you should
update the `_defaultState` manually.
2015-06-12 15:03:48 -07: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
zhukaixy 6684491249 1: update cube texture for sky box
2: add mouse-controled camera for test case (skybox)
2015-04-14 01:39:23 +08:00
yangxiao 2cc9814702 modify 2015-04-01 17:58:41 +08:00
yangxiao 4b7ae430a8 Merge branch 'texturecube' of https://github.com/super626/cocos2d-x into texturecube 2015-04-01 17:37:55 +08:00
yangxiao 9540fd590f modify skybox 2015-04-01 17:34:57 +08:00
zhukaixy 5bff8f5bf3 Bugfix: for glcontext recreated 2015-03-27 17:20:46 +08:00
yangxiao c23746fbcd modify 2015-03-26 13:05:42 +08:00
yangxiao 000e34c6d0 merge cocos 2015-03-26 12:50:18 +08:00
yangxiao 84535feb0c merge cocos 2015-03-26 11:59:26 +08:00
zhukaixy aead9e5855 correct for code indent 2015-03-26 09:53:41 +08:00
zhukaixy 54472497a4 fix comments 2015-03-25 13:43:55 +08:00
zhukaixy 6eaa78d1cb add reload mechanism for TextureCube and Skybox 2015-03-24 15:43:59 +08:00
zhukaixy 0587122ccc Move Skybox.shader from Sprite3DTest to Shader3D folder 2015-03-19 15:11:24 +08:00
yangxiao 265e6fec1a fix index 2015-02-02 16:54:55 +08:00
yangxiao f608377bdb make vao work 2015-02-02 15:44:47 +08:00
zhukaixy 806a5011e5 solve the problems noted in comments 2015-01-30 17:23:30 +08:00
zhukaixy f3536056d8 Simpilify skybox 2015-01-29 19:01:10 +08:00
zhukaixy ee99700ec1 add test case TextureCube 2015-01-29 09:28:14 +08:00