cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
6.5k stars 1.71k forks source link

TS device add new api InvalidateState #12568

Closed oahc09 closed 1 week ago

oahc09 commented 2 years ago

Use Case

for example:

Device.InvalidateState

Invalidate the internally cached render state.

This invalidates any cached render state tied to the active graphics API. If for example a (native) plugin alters the render state settings then rendering engine must be made aware of that.

use case : Android Platform : draw video texture/camera texture to 3d ui in component's update, we call c++ function updateTexture (in this function we execute gl draw command to render external texture to normal texture used by 3d ui), after this operation we need call invalidatestate api to notify render engine the render state has changed.

Problem Description

none

Proposed Solution

No response

How it works

No response

Alternatives Considered

none

Additional Information

No response

pandamicro commented 1 year ago

Related request: https://github.com/cocos/cocos-engine/issues/13832

star-e commented 1 week ago

Currently not supporting video texture.