New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D Shapes Drawing Test #1350

Merged
merged 3 commits into from Aug 7, 2018

Conversation

Projects
None yet
3 participants
@RobertBColton
Member

RobertBColton commented Aug 6, 2018

Before we can generify models and shape drawing with the new vertex and index buffer abstractions, we need a test to ensure that nothing breaks. This pull request adds such a test that will show us all 6 shape drawing functions transformed to show all 6 sides in 3D space. For the sake of testing, the test actually shows 8 transformations even if 2 of the sides shown are shown twice.

I can not guarantee that all of these functions are actually rendering correctly even on master right now, so some changes may be introduced later with these specific drawing functions. Eventually, we'll also need a 3D lighting test as well.

@codecov

This comment has been minimized.

codecov bot commented Aug 6, 2018

Codecov Report

Merging #1350 into master will increase coverage by 1.57%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1350      +/-   ##
=========================================
+ Coverage   13.63%   15.2%   +1.57%     
=========================================
  Files         168     168              
  Lines       17434   17434              
=========================================
+ Hits         2377    2651     +274     
+ Misses      15057   14783     -274
Impacted Files Coverage Δ
...system/SHELL/Graphics_Systems/General/GSscreen.cpp 35.96% <0%> (+0.87%) ⬆️
ENIGMAsystem/SHELL/Universal_System/var4.cpp 16.24% <0%> (+1.59%) ⬆️
...system/SHELL/Universal_System/backgroundstruct.cpp 41.72% <0%> (+1.98%) ⬆️
...system/SHELL/Graphics_Systems/OpenGL1/GLmatrix.cpp 13.95% <0%> (+6.2%) ⬆️
...IGMAsystem/SHELL/Graphics_Systems/General/GSmath.h 27.69% <0%> (+8.45%) ⬆️
...GMAsystem/SHELL/Graphics_Systems/OpenGL1/GLd3d.cpp 17.29% <0%> (+12.65%) ⬆️
...em/SHELL/Graphics_Systems/OpenGL1/GLprimitives.cpp 69.56% <0%> (+67.22%) ⬆️

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 1ca0e67...54bd287. Read the comment docs.

@RobertBColton RobertBColton force-pushed the d3d-shapes-test branch 2 times, most recently from 11387bb to 2607134 Aug 6, 2018

@EnigmaBot

This comment has been minimized.

EnigmaBot commented Aug 6, 2018

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

enigma_draw_3d_shapes_test.png

enigma_draw_3d_shapes_test.png

@RobertBColton RobertBColton force-pushed the d3d-shapes-test branch 5 times, most recently from 28358ed to 1aea52a Aug 6, 2018

@RobertBColton RobertBColton force-pushed the d3d-shapes-test branch from 1aea52a to 05270d2 Aug 7, 2018

@JoshDreamland

Thank you for carrying on the tradition of not checking in garbage bits of a GMX.

@RobertBColton RobertBColton force-pushed the d3d-shapes-test branch from 8ee25d0 to 54bd287 Aug 7, 2018

@EnigmaBot

This comment has been minimized.

EnigmaBot commented Aug 7, 2018

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

enigma_draw_3d_shapes_test.png

enigma_draw_3d_shapes_test.png

@RobertBColton

This comment has been minimized.

Member

RobertBColton commented Aug 7, 2018

@JoshDreamland you're welcome. Anyway, I am going to now merge this as-is so I can begin writing a new 3D models class. I did attempt this morning to do isometric projections of the shapes, but only discovered our transforms in GL1 are totally messed up so the Isometric projection only works in D3D9 right now. We have to look into the transform issues and clean up all of that like I wanted to do as a separate task. For now, this is the best way I can test 3D shapes consistently.

This was what I tried:

//d3d_transform_set_rotation_x(-45);
//d3d_transform_add_rotation_y(-45);
d3d_transform_set_rotation_axis(1, 1, 0, -45);
d3d_transform_add_translation(45, 45, 0);
d3d_draw_shape(0, 20, test_texture);

Direct3D9 (Correct)

D3D9 Isometric

OpenGL1 (Wrong)

GL1 Isometric

Anyway, going to merge this now, best to not conflate shapes with transforms and projection tests for now anyway.

@RobertBColton RobertBColton merged commit 42b7d98 into master Aug 7, 2018

4 checks passed

codecov/patch Coverage not affected when comparing 1ca0e67...54bd287
Details
codecov/project 15.2% (+1.57%) compared to 1ca0e67
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@RobertBColton RobertBColton deleted the d3d-shapes-test branch Aug 7, 2018

JoshDreamland added a commit that referenced this pull request Nov 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment