Kp
bf7995ade2
Fold render call to g3_set_view_matrix
...
Remove support for JOHN_ZOOM. It was present in the initial release,
but never activated.
2016-09-26 00:50:08 +00:00
Kp
62b58e9890
Move OGL to dxxsconf.h; rename to DXX_USE_OGL
...
Rename symbol OGL to DXX_USE_OGL to show that it is a DXX
symbol, not one inherited from a library. Move it to dxxsconf.h to
shorten the command line.
This is a mostly automated transform, but the changes to SConstruct were
manual.
git grep -lzw OGL -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGL/\1 DXX_USE_OGL/' -e 's/\(\s*#\s*if\)ndef OGL/\1 !DXX_USE_OGL/' -e 's/\(\s*#\s*if !\?\)defined(OGL)/\1DXX_USE_OGL/'
2016-09-24 18:06:11 +00:00
Kp
0bff113335
Fix triangle rendering problem
...
Unlike many uses of index_sequence<N...>, this set of N... is not the
result of make_tree_index_sequence. Some callers pass sequences with
`Nn != n` for some n, so vp is not initialized as a copy of all elements
of ovp in the same order as ovp.
Fixes: fa5475aa54
("Remove unnecessary copy of vertex points")
2016-09-14 01:59:33 +00:00
Kp
6a3ded191f
Move EDITOR to dxxsconf.h; rename to DXX_USE_EDITOR
...
Rename symbol EDITOR to DXX_USE_EDITOR to show that it is a DXX
symbol, not one inherited from a library. Move it to dxxsconf.h to
shorten the command line.
This is a mostly automated transform, but the changes to SConstruct were
manual.
git grep -wl EDITOR -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(EDITOR\)\>/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(EDITOR\))/#\1if \2DXX_USE_\3/' -e 's/^\s*#ifndef \(EDITOR\)\>/#if !DXX_USE_\1/'
2016-09-11 18:49:16 +00:00
Kp
0249358ccc
Fold render_face flashing light tests
2016-09-11 18:49:15 +00:00
Kp
2952857461
Unify calculating green/blue when control_center_destroyed
2016-09-11 18:49:14 +00:00
Kp
4ed4ceece6
Cache references to array elements in render_face
...
Make the code easier to read by assuring the reader that each array
is always accessed at exactly one index per pass of the loop.
2016-09-11 18:49:14 +00:00
Kp
090852d6cd
Defer initializing dyn_light in render_face
...
Cloaked faces do not require dyn_light. Defer it to a later loop that
covers the same extents.
2016-09-11 18:49:14 +00:00
Kp
1f1be05d10
Simplify bm2 initialization in render_face
2016-09-11 18:49:14 +00:00
Kp
fa5475aa54
Remove unnecessary copy of vertex points
2016-09-11 18:49:14 +00:00
Kp
ee1003f29f
Move conditionally compiled code into namespace dsx
2016-08-25 04:05:32 +00:00
Kp
3550f2d7ff
Flatten render type hierarchy
2016-07-16 16:52:04 +00:00
Kp
c636dc4b98
Convert various static const
expressions to constexpr
2016-07-16 16:52:04 +00:00
Kp
f48247d5c7
Fix -Wshadow warnings in render_compare_context_t
2016-05-21 17:24:51 +00:00
Kp
560401e1ff
Fix -Wshadow warnings in check_face
2016-05-21 17:24:51 +00:00
Kp
f4e1ebb576
Remove unnecessary gr_setcolor calls
2016-02-12 04:02:28 +00:00
Kp
1b4b6673ee
Pass color to g3_draw_poly
2016-02-12 04:02:28 +00:00
Kp
8c24eaa721
Pass color to g3_draw_line
2016-02-12 04:02:28 +00:00
Kp
36bd39babe
Pass color to gr_line
2016-02-12 04:02:28 +00:00
Kp
23047b1165
Pass color to gr_rect
2016-02-12 04:02:28 +00:00
Kp
f235d6b12b
Pass color to gr_pixel
2016-02-12 04:02:28 +00:00
Kp
553b313099
Use vwallptr
2016-02-12 04:02:28 +00:00
Kp
b57f08c798
Use partial_const_range
2016-02-12 04:02:28 +00:00
Kp
08f7d850e0
Fix SDL build failure
2016-01-26 03:45:06 +00:00
Kp
a3ae630829
Remove default argument for basic_ptridx(index)
2016-01-09 16:38:14 +00:00
Kp
cefc79f869
Construct find_point_seg segptridx explicitly
2016-01-09 16:38:13 +00:00
Kp
98f5afa9f8
Remove default argument for basic_ptr(pointer,array &)
2016-01-09 16:38:13 +00:00
Kp
d7890e37cb
Skip copying segment normals in render_side
2016-01-03 20:21:35 +00:00
Kp
2e8900ab73
Remove unused lcnt_save,scnt_save
2016-01-03 20:21:35 +00:00
Kp
3428ea6392
Remove Show_only_curside
...
Show_only_curside was locked to 0 in EDITOR builds, but only EDITOR
builds could render the current side.
2016-01-03 20:21:35 +00:00
Kp
c57db299ba
Make first_terminal_seg local
2016-01-03 20:21:34 +00:00
Kp
d479819931
Use absolute_sibling to reduce global references for ptridx
2015-12-22 04:18:51 +00:00
Kp
db9fb0ed42
Move more symbols into namespace dcx/dsx
2015-12-22 04:18:50 +00:00
Kp
28ee4c1804
Move DbgUseOldTextureMerge to CArg
2015-12-18 04:08:24 +00:00
Kp
dc8c0323d8
Uninline namespace dcx
2015-12-13 18:00:49 +00:00
Kp
e784fd96fa
Use inline namespace dcx for common/texmap
2015-12-05 22:57:24 +00:00
Kp
0c75aecc45
Check most uses of object id
2015-11-27 03:56:13 +00:00
zico
bd391e2363
Reduced the level rendering from 3 passes to 2 while maintinaing the original function (may need optimization, tho); Rendering level parts with transparency effects (force fields, energy center sparks) in same pass as objects to prevent them from making objects invisible behind them; Changed object sorting to they render back to front to prevent rendering issues (robots disappearing behind explosions, further away powerup rendered over a closer one, etc)
2015-10-25 18:16:34 +01:00
Kp
1f63bfeee5
Reduce lifetime of returned get_seg_masks result
2015-10-18 21:01:19 +00:00
Kp
4163510b09
Move compare_func into render_compare_context_t
2015-10-18 21:01:19 +00:00
Kp
c172d2c4c4
Omit OBJ_PLAYER from window.rendered_robots
...
The only user of rendered_robots filters for type OBJ_ROBOT.
2015-10-18 21:01:19 +00:00
Kp
6d714520ee
Skip rendering Viewer sooner
...
Move the skip-Viewer check from render_object up to build_object_lists
so that, instead of skipping the viewer, the viewer is not scheduled
to be rendered.
2015-10-18 21:01:19 +00:00
Kp
5d79694584
Cache rotate_list global references
2015-10-18 21:01:18 +00:00
Kp
faf698703e
Make rotate_list result anonymous
2015-10-18 21:01:18 +00:00
Kp
d767f7cd5e
Pass vcsegptridx to render_face
2015-10-18 21:01:18 +00:00
Kp
2f927c68f9
Improve support for using exact_type with valptridx
2015-09-15 02:48:04 +00:00
Kp
64ff1cda89
Only restore non-alpha when alpha was used
2015-08-21 03:12:35 +00:00
Kp
17b1943c5e
Mark various per-file structures as static
2015-08-12 03:11:46 +00:00
Kp
555ff20ae9
Move render_state.h up for gcc-4.7 static_assert
...
In gcc-4.7, <bits/hashtable.h> uses static_assert in a way that the
preprocessor considers to have 3 arguments. Move render_state.h up to
ensure that <bits/hashtable.h> is included before
"compiler-static_assert.h" converts static_assert into a 2 argument
macro.
2015-08-03 03:11:25 +00:00
Kp
1658e05604
Fix SDL-only build for valptridx changes
...
Fixes: fa8dcc9113
("Explicitly delete basic_ptridx(pointer_type); require array")
2015-07-21 02:57:27 +00:00
Kp
fa8dcc9113
Explicitly delete basic_ptridx(pointer_type); require array
...
Require the array argument for basic_ptridx, which is supplied
automatically when the factory is used.
2015-07-13 01:09:37 +00:00
Kp
810fb3ea4f
Use valptr for render.cpp
2015-07-12 01:04:21 +00:00
Kp
1b6999ff4d
Switch get_seg_masks from vcsegptridx_t to vcsegptr_t
...
The index component is not needed.
2015-07-12 01:04:17 +00:00
Kp
ec453dcb28
Merge "Clang fixes" from btb
...
clang whines about some innocuous constructs. Preprocess them out to
silence it.
Requested-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/63 >
2015-05-24 17:13:13 +00:00
Kp
02c6f2a9f3
Fix gcc-4.6 render range error
...
gcc-4.6 fails to synthesize a move constructor to initialize
reversed_render_range; later gcc accept this.
Switch to capturing the value by const auto &&, which works in both old
and new gcc.
2015-05-22 03:33:21 +00:00
Bradley Bell
a02d0cffb5
NDEBUG constant used only in EDITOR.
...
Fixes: similar/main/render.cpp:128:36: error: unused variable 'Show_only_curside'
2015-05-05 21:11:52 -07:00
Kp
23af709aa0
Remove unused Outline_mode
...
clang whines for unused `static const` variables. Remove unused
Outline_mode to eliminate the warning.
Reported-by: btb <21f6d0d52b
>
2015-04-30 03:32:27 +00:00
Kp
eedfaab822
Remove OGL Max_linear_depth
2015-04-22 02:44:29 +00:00
Kp
b0ec49f8e5
Remove unused file+line from get_seg_masks
2015-04-02 02:36:56 +00:00
Kp
75680578e1
Move CROSS_* into guard
...
Suggested-by: btb <c3efc342bc
>
2015-03-26 02:42:26 +00:00
Kp
945914f1d6
Enable -Wuninitialized, -Wempty-body, -Wignored-qualifiers, -Wunused
2015-03-22 18:49:21 +00:00
Kp
f17458d353
Explicitly delete valptridx inequality operators
2015-02-14 22:48:30 +00:00
Kp
673a711461
Remove vm_angles_2_matrix return value
2015-02-05 03:03:51 +00:00
Kp
1c58627aa3
Remove unused cos from fix_fastsincos
2015-02-05 03:03:50 +00:00
Kp
99a4a0ed62
Capture range_for by-value temporaries as const
...
Modifying a by-value temporary does not affect the underlying container,
so modifying it is almost always a bug. Require use of a by-reference
capture when modification is desired.
sed -i -e 's/range_for\s*(\s*\(const\s\+\)\?auto\s\+\([[:alpha:]_]\)/range_for (const auto \2/g'
2015-02-05 03:03:49 +00:00
Kp
9794cfddc9
Move some local structs into anonymous namespaces
2015-01-24 19:16:34 +00:00
Kp
84e3a03451
Remove unused parameters
2015-01-18 01:58:33 +00:00
Kp
a961b2c534
Reorder compare_children operations
...
Fold find_joining_side_norms into compare_children, then reorder to
defer unnecessary work.
2015-01-17 18:31:39 +00:00
Kp
80eda337cd
Continue out of dead render segments sooner
2015-01-17 04:31:17 +00:00
Kp
229603b184
Rotate segment vertices once, not per side
2015-01-17 04:31:17 +00:00
Kp
2d0e8259ef
Remove unnecessary multi-pass child sort
2015-01-17 04:31:17 +00:00
Kp
5402e8c546
Add unchecked_partial_range for ranges without end
2015-01-11 05:08:30 +00:00
Kp
fbac119095
Propagate use of objptridx_t
2014-12-23 04:20:27 +00:00
Kp
702ea40ade
Move segment declarations to fwdsegment.h
2014-12-22 04:35:49 +00:00
Kp
9ffd958d3d
Create window_rendered_data locally
2014-12-18 04:12:38 +00:00
Kp
51b6fb1c95
Return get_side_verts by value
2014-12-14 05:23:00 +00:00
Kp
adbff232c5
Split seg/obj vars of find_seg_side_face
2014-12-13 17:47:01 +00:00
Kp
3f52e3426a
Skip unnecessary segment rendering phases
...
Make object rendering traverse only the subrange of segments with
objects.
Make alpha rendering traverse only the subrange of segments with alpha
blended textures.
2014-12-13 17:19:28 +00:00
Kp
0b086b1b0d
Optimize rendering
...
- Make Max_linear_depth_objects const
- Skip setup of object rendering if no objects to render
- Defer setting globals until after conditional confirms a segment will
render
2014-12-13 17:18:07 +00:00
Kp
84e3721ef0
Use partial_range for render list
2014-12-13 16:57:09 +00:00
Kp
69bc81681a
Move render_windows to per_segment_state_t::render_window
2014-12-13 16:54:16 +00:00
Kp
7c98dea8be
Pass render_frame arg by &
2014-12-13 04:11:21 +00:00
Kp
b79e432a3e
Pass render_mine arg by &
2014-12-13 04:11:16 +00:00
Kp
032332343d
Pass do_render_object arg by &
2014-12-13 04:11:12 +00:00
Kp
e027c821c9
Pass update_rendered_data arg by &
2014-12-13 04:11:04 +00:00
Kp
489c4e00a3
Store temporary rect locally
2014-12-11 02:33:55 +00:00
Kp
cc60f765b3
Cache render lookups
2014-12-11 02:33:50 +00:00
Kp
cf9675c505
Fix uninitialized variable in render reprocess
2014-12-08 01:02:08 +00:00
Kp
9aa539c062
Return texmerge_get_cached_bitmap result by &
2014-11-30 22:09:19 +00:00
Kp
968f7ddc97
Pass gr_gpixel arg by &
2014-11-30 22:09:18 +00:00
Kp
962045b911
Include <cstdlib> in render.cpp for std::abs
...
Reported by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/12
Fixed by btb: f80c4c17b6
2014-11-30 17:03:00 +00:00
Kp
0fa93d2e56
Track render window by &
2014-11-23 21:53:46 +00:00
Kp
2ddbdd6f11
Move processed into render_seg_map
2014-11-23 21:53:45 +00:00
Kp
c495f48ccd
Move Seg_depth into render_seg_map
2014-11-23 21:53:45 +00:00
Kp
0c3f350803
Cache object* in render object sort
2014-11-21 03:31:39 +00:00
Kp
fb521e9b75
Sort objects without extra copying
2014-11-21 03:29:28 +00:00
Kp
98dcc26080
Make find_joining_side_norms vertex lookup more readable
2014-11-21 03:28:41 +00:00
Kp
1d0ba034a5
Store rendered objects in vector
2014-11-21 03:16:00 +00:00
Kp
2c349136cc
Avoid slicing into segnum_t local
2014-11-20 03:00:36 +00:00
Kp
855b249555
Make g3s_point const only in OGL
2014-11-16 19:14:51 +00:00
Kp
c2d308807c
Make various g3s_point * const
2014-11-15 03:10:06 +00:00
Kp
8e0d85b666
Pass g3_draw_tmap arg by &
2014-11-13 03:44:04 +00:00
Kp
ff13155fc2
Pass g3_project_point arg by &
2014-11-13 03:21:33 +00:00
Kp
aba13a0bd0
Pass g3_draw_line arg by &
2014-11-13 03:19:52 +00:00
Kp
d098d45499
Fix non-normalized dot product for SIDE_IS_QUAD render_side
2014-11-13 03:14:36 +00:00
Kp
655717db9d
Move Player_head_angles into local scope
2014-11-13 03:14:03 +00:00
Kp
30e988fc5f
Use std::sort for object rendering distance
2014-11-13 03:07:58 +00:00
Kp
01c38167de
Avoid sqrt in rendering distance
2014-11-12 03:04:23 +00:00
Kp
5bb9c88979
Add vm_vec_sub that returns result
2014-10-29 03:24:31 +00:00
Kp
53aa70cecb
Use vsegptridx_t
2014-10-28 03:08:51 +00:00
Kp
09835590f3
Pass g3_set_view_matrix arg by &
2014-10-26 22:01:00 +00:00
Kp
a79bb365f9
Pass get_seg_masks arg by &
2014-10-26 21:28:38 +00:00
Kp
3412bf4b3a
Make rotate_list input const
2014-10-26 03:24:09 +00:00
Kp
a32547af16
Pass position-related vms_vector arg by &
2014-10-22 02:46:03 +00:00
Kp
6971dfbf4a
Use symbolic *_none constants for -1
2014-10-04 17:31:13 +00:00
Kp
35529bacd6
Use reference for rotate_list pnt
2014-10-02 03:02:35 +00:00
Kp
68211d20d3
Pass g3_rotate_point arg by &
2014-10-02 03:02:35 +00:00
Kp
0ab9650bae
Use std::bitset for render.cpp object_rendered
2014-10-02 03:02:34 +00:00
Kp
3743882fa4
Use vm_matrix_x_matrix 2 arg form where viable
2014-10-01 02:28:42 +00:00
Kp
83ccb15459
Pass vm_matrix_x_matrix arg by &
2014-10-01 02:28:42 +00:00
Kp
d238b4a562
Pass vm_angles_2_matrix arg by &
2014-10-01 02:28:42 +00:00
Kp
73545f1dab
Pass vm_vec_normalized_dir_quick arg by &
2014-10-01 02:28:41 +00:00
Kp
b5f443f21e
Pass vm_vec_normalized_dir arg by &
2014-10-01 02:28:41 +00:00
Kp
ac39749382
Pass vm_vec_dist arg by &
2014-10-01 02:28:41 +00:00
Kp
05a91f9b58
Pass vm_vec_scale_add2 arguments by &
2014-09-28 21:43:14 +00:00
Kp
00b59c3058
Pass vm_vec_dot arguments by &
2014-09-28 21:11:48 +00:00
Kp
321bbe37d8
Pass vm_vec_sub arguments by &
2014-09-28 21:11:45 +00:00
Kp
9eda412dff
Use symbolic constant wall_none
2014-09-21 23:05:14 +00:00
Kp
703f60ac3f
Fix -Wtype-limits warnings
2014-09-21 21:41:55 +00:00
Kp
f5ee5f8813
Use array<> for side
2014-09-13 22:05:52 +00:00
Kp
e9d01c493e
Move uvl_copy up
2014-09-13 00:34:18 +00:00
Kp
26dfce97f9
Remove duplicate code for calling check_face
2014-09-12 23:13:32 +00:00
Kp
008caf8161
Simplify sort_seg_children
2014-09-08 03:31:05 +00:00
Kp
01638a7eb0
Move N_render_segs into render_state_t
2014-09-07 23:56:37 +00:00
Kp
73a0aee004
Use accessor for side::type
2014-09-06 22:36:58 +00:00
Kp
02e2e77ee6
Tighten processing of WALL_IS_DOORWAY flags
2014-09-06 22:26:11 +00:00
Kp
d312248d45
Return int_fast32_t from find_connect_side
2014-09-06 04:06:18 +00:00
Kp
36183e1388
Optimize render compare_children
2014-09-06 04:01:32 +00:00
Kp
5576a65dac
Check length of g3 tmap inputs
2014-09-04 03:02:21 +00:00
Kp
5f4342fb01
Short circuit build_segment_list CC_BEHIND check
2014-09-04 01:51:03 +00:00
Kp
c773ef560e
Inline disabled render features
2014-09-03 01:56:54 +00:00
Kp
21a4cd3f5f
Inline migrate_objects
2014-09-03 01:38:00 +00:00
Kp
9558abf7d3
Inline no_migrate_segs
2014-09-03 01:35:06 +00:00
Kp
697e34cdb7
Inline new_seg_sorting
2014-09-03 01:34:05 +00:00
Kp
31088e180e
Inline behind_check
2014-09-03 01:33:52 +00:00
Kp
6069c3db71
Inline window_check
2014-09-03 01:33:46 +00:00
Kp
c057ee57ed
Cache calls of WALL_IS_DOORWAY
2014-09-02 22:15:07 +00:00
Kp
b95759aecc
Propagate use of objptridx
2014-08-23 23:53:56 +00:00
Kp
c102a507df
Move render Rotated_last into g3s_point p3_pad
2014-08-20 01:28:22 +00:00
Kp
778d399fc1
Fix render build failure for +debug no-editor
2014-08-18 00:11:51 +00:00