Commit Graph

178 Commits

Author SHA1 Message Date
coulsonwang c7020fbb5f fix C4244 warning (#20173) 2019-10-09 17:50:32 +08:00
coulsonwang 9dc04bf228 remove opengl codes (#19797) 2019-06-05 02:58:33 -07:00
John c259918d03 Optimize cases where loop variable is unecessarily copied in a range-for loop. (#19637) (#19640)
Pass by const reference when appropriate.
2019-04-27 18:20:22 -07:00
minggo fd792813d2
Optimize calls to std::string::find() and friends (#19624) 2019-04-21 18:44:19 -07:00
minggo 1e7a6f7fcf
Issue19416 (#19427)
* use more meaningful names

* remove unneeded types
2019-02-22 14:06:26 +08:00
minggo 06d7e4eda7
remove CCGLProgram related files (#19408)
* remove CCGLProgram related files

* remove CCGLProgram related header files
2019-02-19 16:06:17 +08:00
Arnold fe497933f8 3d support: some test cases works
* hack to make sprite3d test work

* support cull face

* support setting front face winding

* convert depth compare function type

* clean codes

* remove usage of glprogramstate

* pass needed information to Material::draw()

* add 3d textures

* enable animation

* 3D: compile on windows  (#179)

* exclude source files from extensions/

* enable assets and 3D

* run on windows

* update comments

* use std::vector instead of raw pointer void *

* compile on mac

* revert cmake

* fix bufferdata

* add todos

* remove dirty flag from uniform buffer

* argument type const &

* enable more tests

* update shader

* save: failed to compile

* pass compilation

* fix type convert

* save stage

* save stage 2

* remove VertexData & IndexBuffer & VertexBuffer

* comment out _meshCommand

* comment bindPredefinedVertexAttribs()

* fix xcode project file

* simple refactor

* remove unused files

* revert sprite3d testcase position

* revert change

* remove ProgramGL::bindPredefinedVertexAttribs()

* add header <string>

* fix uniform size
2019-01-30 09:35:17 +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 92dfdad12b Fix typo in ModelData: `matrial` to `material` (#17308) 2017-02-08 09:45:05 +08:00
yahont 0c664ebc99 some warnings fixed: unused variables, signed-unsigned comparison (#16878) 2016-11-21 15:03:41 +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
James Chen 7e14812240 fixed #16492: RapidJSON Crashes in Release mode on Android. (#16792)
* fixed #16492: RapidJSON Crashes in Release mode on Android.

* Updates external/config.json

* json/filestream.h -> json/filereadstream.h
2016-11-04 09:36:59 +08:00
Wilson E. Alvarez c0e1e91373 Performance tweak: Use range-based for-loops and allocate std::vector size() and *end() on the stack where favorable. (#16716)
* Use range-based for-loops and allocate std::vector size(), end(), cend(), rend(), crend() on the stack where favorable.

Other minor trivial changes were applied.

* Fixed Android compilation error

* Fixed windows-universal compilation error
2016-10-27 15:10:24 +08:00
mogemimi 5b8919829c Fix typos in local variables (#16712) 2016-10-20 18:17:37 +08:00
mogemimi 2b9ac2c950 Remove redundant semicolons (#16558) 2016-09-12 09:45:34 +08:00
mogemimi 093ef3a14f Fix typos in variable names 2016-07-26 04:06:01 +09:00
mogemimi c0f2194961 Fix some minor typos in local variable names 2016-06-29 11:04:11 +09:00
Xpol Wan 90456d29ba Fixes 1605 include path in 541 files
using the tools/coding-style/include-linter.py with -f options.
2016-03-20 21:53:44 +08:00
Wenhai Lin 4992037c5c Avoid creating temporary string objects 2016-02-03 23:12:37 +08:00
James Chen b04e4754d7 Refactor CCBundle3D, remove wrong use of getDataFromFile. _jsonBuffer is std::string, _binaryBuffer is Data instance now. 2016-01-15 00:55:10 +08:00
Wenhai Lin 4fa58602a8 Adds `std::nothrow` to the `new` statements 2015-12-16 14:02:55 +08:00
Shun Lin d0ce2473a1 Merge pull request #14499 from xiaofeng11/v3_combine_safety
Change ASSERT to safety mode
2015-12-04 00:04:36 +08:00
XiaoFeng f5f09133e6 Change ASSERT to safety mode 2015-11-26 16:49:01 +08:00
songchengjiang 9241797acb support normal mapping material 2015-11-25 10:45:03 +08:00
Martin Taylor e592a1a02d fix typos 2015-09-09 11:37:41 +08:00
Vladimir Perminov 7cacdaeaf1 Add getFileExtension to FileUtils
Gets filename extension is a suffix (separated from the base filename by
a dot) in lower case.

More code need get filename extension, everyone does it differently.
use check UPPER and lower case, use . and no(example ".csb", ".CSB",
"csb" )

And bag in AudioEngineImpl: find point from left( ext =
strchr(filePath.c_str(), '.'); )
If file path contains point. always unsupported media type
2015-08-05 22:21:16 +03:00
yangxiao f7cdd7162b adapter according to latest objloader 2015-07-08 15:33:43 +08:00
yangxiao db2b2cf0b8 getTrianglesList for obj file 2015-05-29 16:37:37 +08:00
andyque c668001e73 fix assert failure of NinePatchImageParser and rapidjson 2015-05-26 17:20:10 +08:00
yangxiao e659373648 add getTriangleList to bundle 2015-05-14 10:30:20 +08:00
songchengjiang 2aee4abd66 fix https://github.com/cocos2d/cocos2d-x/issues/11203
fix the error of CCBundle3D
2015-04-24 15:31:50 +08:00
lvlong 4f96037e15 1. Merge branch 'v3' of github.com:super626/cocos2d-x into v3
2. fix bug: memory leak!
2015-04-21 19:38:38 +08:00
lvlong cae82fcdeb fix bug: memory leak 2015-04-21 15:02:09 +08:00
Vladimir Perminov 105bac2d55 Optimize Vec3
small function Vec3 move to Vec3.inl
Added:
add(float xx, float yy, float zz);
setZero();

Change all code:
_vec3 = Vec3(x, y, z);   ->   _vec3.set(x, y, z);
Vec3 vec3 = Vec3(x, y, z);   ->  Vec3 vec3(x, y, z);
_vec3 += Vec3(x, y, z);   ->   _vec3.add(x, y, z);
_vec3 = Vec3::ZERO;   ->   _vec3.setZero();
2015-04-05 13:09:50 +03:00
lvlong b2a7a753c2 add comments 2015-03-30 11:44:30 +08:00
lvlong 5ce4fbe6df merge node transform problem!!! 2015-03-24 17:59:24 +08:00
yangxiao fad4fb8e6f fix memory leak 2015-03-24 10:22:55 +08:00
yangxiao 45bd6180ad fix create bundle using empty path 2015-03-09 17:09:18 +08:00
kompjoefriek 89152b2856 Tabs to spaces
Changed indenting tabs to spaces
2015-01-29 10:40:00 +01:00
kompjoefriek 0c70660551 Fixed warnings
- signed/unsigned mismatch
- printing enum with %d
- using int as bool
2015-01-29 01:36:22 +01:00
minggo 44bcee60c7 Merge pull request #10182 from super626/v3
Fix bug on loading .obj's .mtl file
2015-01-23 12:02:00 +08:00
kompjoefriek ca48c5e5dd Fixed lots of compiler warnings
- signed / unsigned mismatches
- using int as bool
- Removed throw() from CCFrame.h, why is explained here:
http://www.gotw.ca/publications/mill22.htm
2015-01-23 02:02:33 +01:00
lvlong 662117e878 mtlPath 2015-01-22 17:33:24 +08:00
lvlong c5f955466a fixbug: load obj file's material. 2015-01-22 17:28:35 +08:00
lvlong f9b0c9bc92 fix bug. 2015-01-07 11:09:09 +08:00
yangxiao d23eb83ba1 Merge branch 'v3' of https://github.com/super626/cocos2d-x into v3 2014-12-31 11:40:37 +08:00
XiaoYang 8b95c591b1 Merge pull request #189 from songchengjiang/v3
read AABB from file(v0.6+)
2014-12-26 16:15:56 +07:00
lvlong f592671df6 Merge branch 'v3' of github.com:cocos2d/cocos2d-x into frustum
Conflicts:
	cocos/2d/libcocos2d.vcxproj.filters
	cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp
2014-12-26 13:42:13 +08:00
minggo 4cac8e2cb4 Merge pull request #9595 from super626/v3
Do not try to load empty texture
2014-12-24 10:31:44 +08:00