-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spine/dragonbones renderdata use rgba8 color format #12619
Conversation
Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -2864,8 +2864,9 @@
* 2. 二维贴图 UV 属性(Float32)
* 3. RGBA 颜色属性(Float32)
*/
export const vfmtPosUvColor: gfx.Attribute[];
+ export const vfmtPosUvColor4B: gfx.Attribute[];
/**
* @en Vertex format with the following layout
* 1. Vector 3 position attribute (Float32)
* 2. Vector 2 uv attribute (Float32)
@@ -2877,8 +2878,9 @@
* 3. 第一套 RGBA 颜色属性(Float32)
* 3. 第二套 RGBA 颜色属性(Float32)
*/
export const vfmtPosUvTwoColor: gfx.Attribute[];
+ export const vfmtPosUvTwoColor4B: gfx.Attribute[];
}
/**
* @zh
* UI 渲染流程
|
@@ -227,7 +227,7 @@ export class BaseRenderData { | |||
*/ | |||
export class RenderData extends BaseRenderData { | |||
public static add (vertexFormat = vfmtPosUvColor, accessor?: StaticVBAccessor) { | |||
const rd = new RenderData(vertexFormat); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RenderData's contructor do not accept accessor parameter
cocos/2d/renderer/mesh-buffer.ts
Outdated
} else if (attrs === vfmtPosUvTwoColor4B) { | ||
vfm = Vertex2DFormat.V3F_T2F_C4B_C4B; | ||
} | ||
this._nativeObj.initialize(device, vfm, vFloatCount, iCount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't pass attributes array
void UIMeshBuffer::initialize(gfx::Device* /*device*/, ccstd::vector<gfx::Attribute*>&& attrs, uint32_t /*vFloatCount*/, uint32_t /*iCount*/) { | ||
if (attrs.size() == 4) { | ||
_attributes.push_back(gfx::Attribute{gfx::ATTR_NAME_COLOR2, gfx::Format::RGBA32F}); | ||
void UIMeshBuffer::initialize(gfx::Device* /*device*/,Vertex2DFormat vfm, uint32_t /*vFloatCount*/, uint32_t /*iCount*/) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to figure out why can not pass array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in c++ get a item value with null vector. i think jsb not convert class.
i have no time to find root cause, so use a simple way to avoid this problem
spine and dragonbones use simple color 4byte