mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Don't align transform_blend vertex column to 4 byte boundary
Somewhat improves performance of CPU vertex animation
This commit is contained in:
parent
b303962e96
commit
a1749b2f07
@ -2313,7 +2313,7 @@ make_vertex_data(const EggRenderState *render_state,
|
||||
PT(GeomVertexArrayFormat) anim_array_format = new GeomVertexArrayFormat;
|
||||
anim_array_format->add_column
|
||||
(InternalName::get_transform_blend(), 1,
|
||||
Geom::NT_uint16, Geom::C_index);
|
||||
Geom::NT_uint16, Geom::C_index, 0, 2);
|
||||
temp_format->add_array(anim_array_format);
|
||||
|
||||
pmap<string, BitArray> slider_names;
|
||||
|
@ -403,7 +403,8 @@ align_columns_for_animation() {
|
||||
add_column(column->get_name(), 4, column->get_numeric_type(), column->get_contents(), -1, 16);
|
||||
} else {
|
||||
add_column(column->get_name(), column->get_num_components(),
|
||||
column->get_numeric_type(), column->get_contents());
|
||||
column->get_numeric_type(), column->get_contents(),
|
||||
-1, column->get_column_alignment());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -244,9 +244,9 @@ convert_vd(const VertexTransform *transform, const GeomVertexData *orig) {
|
||||
|
||||
PT(GeomVertexFormat) format = new GeomVertexFormat(*orig->get_format());
|
||||
if (!orig->get_format()->has_column(InternalName::get_transform_blend())) {
|
||||
PT(GeomVertexArrayFormat) af =
|
||||
new GeomVertexArrayFormat(InternalName::get_transform_blend(), 1,
|
||||
Geom::NT_uint16, Geom::C_index);
|
||||
PT(GeomVertexArrayFormat) af = new GeomVertexArrayFormat();
|
||||
af->add_column(InternalName::get_transform_blend(), 1,
|
||||
Geom::NT_uint16, Geom::C_index, 0, 2);
|
||||
format->add_array(af);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user