Closed m0ppers closed 6 years ago
Hi M0ppers. I have had a short review of the code. Everything seems to be alright. I have just one concern, you have swapped the whole engine to work with RGBA values whereas 90% of the OS it supports work with ABGR values instead. Also WIN bitmaps (native format of picture representation in engine) are ABGR too.
I understand the little / big endian problematic but could the word be swapped just for big endian systems? Is there a performance problem?
I have the engine integrated with a QT application now that also need ABGR values. And it does not make use of the window / draw classes (only renders to bitmap). So it makes it incompatible now.
fix under way :) you are right
This is sufficient for now I think.
Right now the code seems to work for all platforms.
The amiga version right now takes RGBA. This is good because the way the int rasterizer works (colors in first three bytes) right now works as expected :)
Once I go for the native AMMX framebuffer I have to recheck but as the rasterization will be implemented in ASM code the code path is different anyway.
So yeah. Maybe that's it for now?
Right now this is what color.h looks like in my amiga branch:
https://github.com/m0ppers/le3d/blob/ammx-experiments/engine/color.h
This is the only required change. Nothing in the engine code (maybe that changes once I really need ARGB).
What do you think?
This is still not mergeable. There are glitches when the crate is rotating. have to investigate.
glitching finally fixed. ready when you are and you are fine with it?
as far as I know it should be possible to squash merge a pull request from the UI (so my commits appear as 1 commit in the main repo). I think that would make sense.
Ok I merged with the main branch. Now I gonna be testing this with different projects.
So it compiles and runs fine with VS 2017.
I am now checking with mingw64.
Currently checking:
There is something weird though. The executables (from mingw64) are now mega fett 800kB instead of 150kB before, any idea?
Any weird C++ feature that would require a load of runtime checks, tables or so?
WIP - do not merge yet (unless you know immediately how to fix it or you )
enabling SSE2 results in cyan 👎
rest seems ok
with this change I see the same triangle problems that I have on the Amiga (let the cube rotate for a while - suddenly colors are off).
Will check if I can find out why it is broken and add to this pull request.
Todos: