From 440b2c48b80782424423d11041355804368ea2fa Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Jan 2022 15:40:06 +0100 Subject: [PATCH] egg2pg: Slight cleanup [skip ci] --- panda/src/egg2pg/eggRenderState.cxx | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/panda/src/egg2pg/eggRenderState.cxx b/panda/src/egg2pg/eggRenderState.cxx index 4c5baf6e3a..1cf000cc35 100644 --- a/panda/src/egg2pg/eggRenderState.cxx +++ b/panda/src/egg2pg/eggRenderState.cxx @@ -162,18 +162,17 @@ fill_state(EggPrimitive *egg_prim) { // transform, never bake it in. In fact, we don't even care about its // UV's in this case, since we won't be using them. tex_mat_attrib = apply_tex_mat(tex_mat_attrib, def._stage, egg_tex); - - } else { -/* - * Otherwise, we need to record that there is at least one texture on this - * particular UV name and with this particular texture matrix. If there are - * no other textures, or if all of the other textures use the same texture - * matrix, then tex_mats[uv_name].size() will remain 1 (which tells us we can - * bake in the texture matrix to the UV's). On the other hand, if there is - * another texture on the same uv name but with a different transform, it will - * increase tex_mats[uv_name].size() to at least 2, indicating we can't bake - * in the texture matrix. - */ + } + else { + // Otherwise, we need to record that there is at least one texture on + // this particular UV name and with this particular texture matrix. + // If there are no other textures, or if all of the other textures use + // the same texture matrix, then tex_mats[uv_name].size() will remain + // 1 (which tells us we can bake in the texture matrix to the UV's). + // On the other hand, if there is another texture on the same uv name + // but with a different transform, it will increase + // tex_mats[uv_name].size() to at least 2, indicating we can't bake in + // the texture matrix. tex_mats[uv_name][egg_tex->get_transform3d()].push_back(&def); } }