drfrag666 / gzdoom

GZDoom adds an OpenGL renderer to the ZDoom source port.
http://gzdoom.drdteam.org
GNU General Public License v3.0
73 stars 15 forks source link

SoftPoly: Fixed the md3 models, you can now correctly display the fra… #19

Closed Erick194 closed 3 years ago

Erick194 commented 3 years ago

…me of the model, in addition, interpolation is added to the model.

This error is mentioned by drfrag in the following link https://forum.zdoom.org/viewtopic.php?f=336&t=71228

drfrag666 commented 3 years ago

Thanks. I think it's better that we accept the PR and fix it later. What do you suggest? Doing the static_cast( )? AFAIK the values should fit. For reference:

/home/runner/work/gzdoom/gzdoom/src/common/rendering/polyrenderer/backend/poly_buffers.cpp:113:26: error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'uint32_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
        uint32_t offsets[2] = { frame0 * Stride, frame1 * Stride };
                                ^~~~~~~~~~~~~~~
alexey-lysiuk commented 3 years ago

long is 64-bit on POSIX systems. If it’s OK to narrow it down, static_cast is fine.

Regardless of compilation issues, I don’t quite understand why SoftPoly PRs are made here instead of GZDoom repository.

drfrag666 commented 3 years ago

The problem is that Stride is size_t. I think it's fine to narrow it, on VS we get the same warning and it works. Erick is just learning Git so i'm helping him for now, i merged his previous PR manually (it was bad). Besides he wants to help with LZDoom and Graf said he was going to remove SoftPoly so we were not sure.