Commit Graph

4010 Commits

Author SHA1 Message Date
halx99 de8334416d Improve Sprite programState update logic 2021-06-27 21:43:21 +08:00
halx99 a84067eb74 Refactor dual sampler shader [ci build]
Since not only etc1 could use sepreate RGB, A to two texture samplers, we unify the shader name.
2021-06-27 20:58:50 +08:00
halx99 a40c60d261
More compatible 2021-06-24 10:21:41 +08:00
halx99 581a792155 Delay scene default camera init, see also
This change will make sure user can change window or design size before scene init
2021-06-24 02:23:02 +08:00
halx99 bafcac20c1 Add some comment for pr 2021-06-17 21:56:38 +08:00
RH d052cc8a48
Use TTF scaled metrics to calculate line height () 2021-06-17 21:15:50 +08:00
RH eff5d1705b
Set global Z value of label debug layer to be the same as the parent label to fix display issue () 2021-06-16 09:18:43 +08:00
halx99 c0f88c46e1
Improve progress timer () 2021-06-13 10:05:30 +08:00
RH fe26435e06
Ensure label underline node has the same global Z value as the label node to fix visibility issue when global Z is not 0. () 2021-06-09 12:09:01 +08:00
RH d17e7b442a
FileStream::size() implemented ()
* Add FileStream::size()
Add ZipFile::zfsize()

* Use FileStream::size()
2021-05-31 15:08:44 +08:00
halx99 2870c39fb2 Better code style 2021-05-24 13:26:56 +08:00
rh101 19995f863b Get the raw pointer on creation of the FileStream to avoid any accidental usage of the unique_ptr. 2021-04-26 17:31:34 +10:00
rh101 ef6bedd069 Use unique_ptr for FileUtils::openFileStream
Fix OGG audio playback due to incorrect tell() method
Fix unzip close() override method not deleting FileStream pointer.
2021-04-26 14:21:56 +10:00
rh101 bcafad58ea Ensure code uses FileStream::tell() to get size if required after using FileStream::seek(0, SET_END) 2021-04-26 10:28:33 +10:00
rh101 e1a9141a00 openFileStream now returns a nullptr if it fails 2021-04-24 09:22:27 +10:00
rh101 5b3b0989b4 Remove redundant std::move 2021-04-23 22:00:33 +10:00
RH b7506fed0c
Merge pull request from rh101/master
Sync with master
2021-04-22 21:49:43 +10:00
rh101 8de1099614 Add support for virtual file system via custom FileStream and FileUtils implementations. 2021-04-22 03:15:49 +10:00
halx99 41f5307d36 Refine director access [ci build] 2021-02-05 23:09:14 +08:00
halx99 04b87dfe5d Fix 2021-01-27 12:03:42 +08:00
halx99 ab8cde3e95 Fix ParticleBatchNode texture not bind [ci build] 2021-01-19 23:53:22 +08:00
halx99 57c767a66d fix [ci build] 2020-11-16 12:21:27 +08:00
halx99 9d0cb09f5d Remove Sprite::updateShaders [ci build] 2020-10-31 20:08:32 +08:00
halx99 119740da15 Sprite::setTexture, programType >= ProgramType::HSV needs update by user manually. 2020-10-27 11:14:36 +08:00
HALX99 e5a05ab7b8
Refine DrawNode, should not use Node::_programState for private use ()
The follow classes should not reuse Node::_programState, otherwise needs override Node::setProgramState to update programState of pipelineDescriptor:
- DrawNode
- LayerColor
- LayerRadialGradient
- ParticleBatchNode
- ParticleSystemQuad
2020-10-26 14:49:14 +08:00
halx99 27bdca35f8 Don't update sprite shader when it's not default 2020-10-26 13:08:02 +08:00
halx99 5fc71649a7 fix clear flow for rendertexture and grid since we use clearCommand to clear renderTarget, see 2020-10-16 16:25:10 +08:00
HALX99 b342ebd7ae
Refactor programState management ()
1. Add custom program registery
2. Re-enable batch draw for custom program
2020-10-16 16:23:14 +08:00
halx99 755a0fb45a fix 2020-10-15 10:22:18 +08:00
halx99 e28a292ec3 API qualifiers improments 2020-10-07 00:07:53 +08:00
halx99 2b8514fdc4 fix warning 2020-10-06 12:31:17 +08:00
HALX99 1090f732c9
Clearly texture usage and TextureGL initWithZeros usage ()
* Clearly texture usage and TextureGL initWithZeros usage

* More properly function name
2020-09-25 15:04:55 +08:00
HALX99 235f09f635
Refactor pixel format manipulate ()
* PixelFormat use table

* Correct PixelFormat name to match 'GL_LUMINANCE'

* Up

* fix cube update texture enum

* linux build

* Refine ci

* fix linux build

* Remove unused function, match mtl framebuffer pixel format

* readPixels always RGBA format

* fix ci for linux

* fix linux build

* Remove unused functions

* fix travis

* fix android ci

* Update config.json

* linux glad

* Update CCGLViewImpl-desktop.cpp

* fix linux build

* Fix linux build

* Link issue [skip appveyor][skip travis]

* Update CMakeLists.txt

* Refine GL enums use

* Update test case name [skip appveyor][skip travis]

* fix linux link issue

* for mtl

* fix ci

* Tidy pixelformat enums

* fix ci

* fix rgba8 to abgr4 error

* fix ci

* fix ci for GLES

* Fix linux build, require glibc-2.27+

* Use properly dist for travis [skip appveyor]

* fix linux build [skip appveyor]

* Update install-deps-linux.sh

* Remove unused members for pixel block info, update external to v73

* Sync from compile linux warnings

* Remove unused check, and PixelFormat::A8 is ordinary format, not compressed format

* metal doesn't support rgb8 ()

* Update CCTexture2D.cpp

* Refine code

* Pixel Format Descriptor Table

* fix ci

* BGR5A1

* Simplfy texture format convert function name

* Update

* rgba4 match mtl render format

* Add note about RGBA4

* Remove unused function

* fix osx

* Already converted at texture2d

* Clearly comment

* fixup
2020-09-25 11:07:56 +08:00
halx99 158b12e452 fix AtlasNode, needs update atlas values when ignore content scale factor changed 2020-09-22 16:35:24 +08:00
HALX99 5a32bcfdaf
RenderTarget abstract, in-progress ()
RenderTarget abstract
2020-09-21 22:10:50 +08:00
HALX99 b9ea114b9c
Merge pull request from halx99/delete-copy-stubs
Explicit delete copy stubs for CustomCommand
2020-09-16 22:45:38 -07:00
halx99 ebd19a07b3 fix ci 2020-09-17 12:10:08 +08:00
halx99 22a4586af9 Sync pr from https://github.com/cocos2d/cocos2d-x/pull/20580 2020-09-17 12:05:31 +08:00
halx99 dbf23f4826 Explicit delete copy stubs for CustomCommand 2020-09-17 11:41:14 +08:00
halx99 fdb29d65c2 Needs recalculate max items when AtlasNode::setIgnoreContentScaleFactor 2020-09-16 13:34:20 +08:00
halx99 c5d6f35d9d Refine code 2020-09-13 19:16:59 +08:00
halx99 782e0c61bb No need CaptureCommand for capture screen or node 2020-09-13 13:27:50 +08:00
halx99 efc5a00b60 Remove comment 2020-09-11 12:39:16 +08:00
halx99 04358791ec v4 captureScreen API compatiable, gl needs flip always for capture 2020-09-11 11:57:55 +08:00
HALX99 d346204936
Update CCRenderTexture.cpp 2020-09-11 01:46:12 +08:00
halx99 6497a92ec7 finish gl backend 2020-09-11 01:19:10 +08:00
halx99 874946fccb Tidy code 2020-09-11 00:10:44 +08:00
halx99 2a50ae6cf8 Refine code 2020-09-10 21:38:24 +08:00
halx99 f6a8d993fc Refactor capture, fix data race for apple metal reanderer backend 2020-09-10 21:14:28 +08:00
halx99 f89763b416 Tidy, update programState texture at attachProgramState 2020-09-09 15:29:56 +08:00