Match failure.

Match failure.

only pad images in create texture

Reporter: fundies  |  Status: closed  |  Last Modified: August 07, 2020, 06:10:31 PM

moved image padding logic exclusively to graphics_create_texture

fixes #2003
fixes #1936
Currently only png works, need help fixing bmp/gif

RobertBColton  
With my last commit there to fix the fonts, the space cleaner game works fine on this branch again now.
Space Cleaner Image Pad Branch

fundies  

With my last commit there to fix the fonts, the space cleaner game works fine on this branch again now.

pngs should be fine in this branch but bmps and gifs are broken. I have a test in this PR you can run to check things.

RobertBColton  

Ok so 84161d3 fixes the subimages but there's still more problems.

The background transparency is wrong and I'm not sure it was correct to begin with. In GIF the background color should not appear if it equals the subimage's transparent color, but in our implementation it is because we clear the initial buffer to the background color regardless of whether it is the transparent color of the first subimage.

All of "Phase 2" can actually be deleted now because of Josh's refactor we aren't writing them to one giant buffer. When we see a subimage block, we can just allocate the raw image then and push it to the images vector.

I'm not exactly sure I'm amused with the refactor though because ultimately the subimages of a sprite should all be on the same texture page anyway. This will introduce needless splitting when we do have working texture pages, so at the very least this isn't anymore efficient than before. Again we could always use a library for this, because it's not the simplest of image formats.

Edit: Actually the transparent background stuff seems to be an ambiguity in the GIF spec and may result in cross-browser incompatibilities.
https://stackoverflow.com/a/48669313

codecov[bot]  

Codecov Report

Merging #2008 into master will increase coverage by 1.63%.
The diff coverage is 77.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2008      +/-   ##
==========================================
+ Coverage   30.90%   32.54%   +1.63%     
==========================================
  Files         197      197              
  Lines       19075    19043      -32     
==========================================
+ Hits         5896     6197     +301     
+ Misses      13179    12846     -333     
Impacted Files Coverage Δ
...m/SHELL/Graphics_Systems/General/texture_atlas.cpp 0.00% <0.00%> (ø)
...m/SHELL/Graphics_Systems/OpenGL-Common/surface.cpp 34.61% <0.00%> (ø)
ENIGMAsystem/SHELL/SHELLmain.cpp 100.00% <ø> (ø)
...Extensions/ParticleSystems/PS_particle_sprites.cpp 0.00% <0.00%> (ø)
...em/SHELL/Universal_System/Resources/fontstruct.cpp 0.00% <0.00%> (ø)
...HELL/Universal_System/Resources/sprites_internal.h 86.66% <ø> (ø)
.../SHELL/Graphics_Systems/OpenGL-Desktop/surface.cpp 30.37% <25.00%> (ø)
...ystem/SHELL/Graphics_Systems/General/GSsurface.cpp 22.35% <55.55%> (-0.52%) ⬇️
...stem/SHELL/Graphics_Systems/General/GStextures.cpp 47.20% <57.14%> (+1.16%) ⬆️
...system/SHELL/Graphics_Systems/General/GSscreen.cpp 61.70% <75.00%> (-1.11%) ⬇️
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cfabdf2...61350c9. Read the comment docs.

EnigmaBot  

UNMATCHED: Warning: The following images are found in the pull request but not master (new tests?):

enigma_image_load_save_test[SDL][OpenGL1][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[SDL][OpenGL1][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[SDL][OpenGL3][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[SDL][OpenGL3][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[xlib][OpenGL1][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[xlib][OpenGL1][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[xlib][OpenGL3][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[xlib][OpenGL3][OpenAL][Precise][None][None][Paths_libpng].png
Regression tests have indicated that graphical changes have been introduced. Carefully review the following image comparison for anomalies and adjust the changeset accordingly.

3c2d6bc Master Diff
Image Diff Image Diff Screen Save

EnigmaBot  

UNMATCHED: Warning: The following images are found in the pull request but not master (new tests?):

enigma_image_load_save_test[SDL][OpenGL1][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[SDL][OpenGL1][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[SDL][OpenGL3][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[SDL][OpenGL3][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[xlib][OpenGL1][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[xlib][OpenGL1][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[xlib][OpenGL3][OpenAL][Precise][None][None][Paths_libpng].png

enigma_image_load_save_test[xlib][OpenGL3][OpenAL][Precise][None][None][Paths_libpng].png

Please sign in to post comments, or you can view this issue on GitHub.