This triggers a diagnostic from -Wuseless-cast. It appears to be
unnecessary, after tracing down typedefs. It might need to be restored
if some platform uses a definition that is neither the same type nor
implicitly convertible.
gr_find_closest_color did not need it. Remove it. For the others,
resetting the count is sufficient. There is no need to reset the
individual elements.
The fallthrough appears to be intentional. Add an annotation to allow
it.
Fixes: 6bc0e822d2 ("Handle HUD overlays in separate screen rects for stereo renderings.")
Note since ogl_stereo_frame() is only ever called once per ogl_start_frame()..
ogl_end_frame() instance, only the active stereo eye view needs to be handled.
Implies that separate left/right viewport/transform caches are redundant.
Equivalent to legacy Descent 1.5 pixel shift methods for stereo formats.
Since Descent is rendering viewpoint differences for left/right eyes,
pixel shifting via display viewport is sufficient adjustment.
Since OGL layer here is essentially handling display output surfaces,
the OGL projection transform is not useful for stereo parallax effects
as when used for 3D scenes.
Enable stereo mode when launched via -gl_stereo option.
GL_STEREO quad buffering may not be available unless OGL layer
supports stereo pixel format descriptors.
Half-height viewport rendering for above/below format.
Half-width viewport rendering for side/by/side formats.
HUD & cockpit elements disabled when stereo views active.
OGL layer used for rendering surfaces, so using left/right viewports absent stereo quad buffers.
Using legacy Descent +/- eye offset method for left/right stereo perspective rendering passes.
Rebirth built with OpenGL has a hard dependency on the GL utility
library, but did not have a configure time test to report this. Add
one.
Reported-by: shoober420 <https://github.com/dxx-rebirth/dxx-rebirth/issues/468>
Define separate enum values for rotation data in both the high bits,
where it is usually kept, and the low bits, where it is sometimes used
for math or comparisons.
Define an enum value to represent the composite of the index and the
rotation, since the composite is not suitable for use as an array
subscript. Add helper functions to extract the component pieces.
Normally, this shouldn't matter, and on almost all
OpenGL drivers out there, it really doesn't, but
the Raspberry Pi 4's "V3D" Mesa driver behaves
differently: It simply won't draw any lines as long
as GL_CULL_FACE is enabled, so we need to disable
it.
Similar to 09eff19a66, _g3_draw_poly can
store the control information on the stack to avoid an allocation, since
the total size is bounded and relatively small.
Similar to 09eff19a66, _g3_draw_tmap_2 can
store the control information on the stack to avoid an allocation, since
the total size is bounded and relatively small.