mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
another fix
This commit is contained in:
parent
776d09f31a
commit
7ab42fafae
@ -241,15 +241,17 @@ premunge_format_impl(const GeomVertexFormat *orig) {
|
|||||||
// the stages of the attrib and get the index numbers in the
|
// the stages of the attrib and get the index numbers in the
|
||||||
// appropriate order.
|
// appropriate order.
|
||||||
int si, tc_index;
|
int si, tc_index;
|
||||||
|
int max_tc_index = 0;
|
||||||
for (si = 0; si < num_stages; ++si) {
|
for (si = 0; si < num_stages; ++si) {
|
||||||
int tc_index = _filtered_texture->get_ff_tc_index(si);
|
int tc_index = _filtered_texture->get_ff_tc_index(si);
|
||||||
ff_tc_index[tc_index] = si;
|
ff_tc_index[tc_index] = si;
|
||||||
|
max_tc_index = max(tc_index, max_tc_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now walk through the texture coordinates in the order they will
|
// Now walk through the texture coordinates in the order they will
|
||||||
// appear on the final geometry. For each one, get the texture
|
// appear on the final geometry. For each one, get the texture
|
||||||
// coordinate name from the associated stage.
|
// coordinate name from the associated stage.
|
||||||
for (tc_index = 0; tc_index < num_stages; ++tc_index) {
|
for (tc_index = 0; tc_index <= max_tc_index; ++tc_index) {
|
||||||
si = ff_tc_index[tc_index];
|
si = ff_tc_index[tc_index];
|
||||||
TextureStage *stage = _filtered_texture->get_on_ff_stage(si);
|
TextureStage *stage = _filtered_texture->get_on_ff_stage(si);
|
||||||
InternalName *name = stage->get_texcoord_name();
|
InternalName *name = stage->get_texcoord_name();
|
||||||
|
@ -241,15 +241,17 @@ premunge_format_impl(const GeomVertexFormat *orig) {
|
|||||||
// the stages of the attrib and get the index numbers in the
|
// the stages of the attrib and get the index numbers in the
|
||||||
// appropriate order.
|
// appropriate order.
|
||||||
int si, tc_index;
|
int si, tc_index;
|
||||||
|
int max_tc_index = 0;
|
||||||
for (si = 0; si < num_stages; ++si) {
|
for (si = 0; si < num_stages; ++si) {
|
||||||
int tc_index = _filtered_texture->get_ff_tc_index(si);
|
int tc_index = _filtered_texture->get_ff_tc_index(si);
|
||||||
ff_tc_index[tc_index] = si;
|
ff_tc_index[tc_index] = si;
|
||||||
|
max_tc_index = max(tc_index, max_tc_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now walk through the texture coordinates in the order they will
|
// Now walk through the texture coordinates in the order they will
|
||||||
// appear on the final geometry. For each one, get the texture
|
// appear on the final geometry. For each one, get the texture
|
||||||
// coordinate name from the associated stage.
|
// coordinate name from the associated stage.
|
||||||
for (tc_index = 0; tc_index < num_stages; ++tc_index) {
|
for (tc_index = 0; tc_index <= max_tc_index; ++tc_index) {
|
||||||
si = ff_tc_index[tc_index];
|
si = ff_tc_index[tc_index];
|
||||||
TextureStage *stage = _filtered_texture->get_on_ff_stage(si);
|
TextureStage *stage = _filtered_texture->get_on_ff_stage(si);
|
||||||
InternalName *name = stage->get_texcoord_name();
|
InternalName *name = stage->get_texcoord_name();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user