This isn't working properly at the moment, since the state gets set for the *next* object, causing significant artifacts. I wasn't entirely sure whether to restore the "proper" behavior or not, since applications may be relying on one or the other behavior, but enabling this feature for shaders is a minefield and it's a lot better to just tell people to use p3d_ColorScale instead.
This is done by collecting bounding volumes for each camera in a scene, and then only rendering a shadow camera if at least one of those bounding volumes overlaps with the shadow camera bounding volume.
Closes#560
SimpleHashMap has a constexpr default constructor, so there is no static init ordering issue that requires us to allocate the states maps on the heap and then to leak them.
Adds ability to register "obsolete" names for certain types under older .bam versions, so that we are still able to write out old .bam files.
Fixes#347
Even a brief error message in the assertion is infinitely more useful to a user who is not at home in the source code, especially for assertions that may reasonably be triggered by honest user mistakes.
Having depth test disabled is the default OpenGL state, and callbacks may quite reasonably expect to see the default state. Kivy seems to expect this, for one.
This is an optimization, which will skip begin_frame/end_frame for a buffer that isn't going to have anything rendered to it. Affects the RenderPipeline.
Since this still takes a long time to build, even with the previous change, it would be better for one CPU to chew on this in the background while the rest of the build continues.
This applies to building with MSVC and Eigen specifically. Apparently, fetch_specified_part is taking up most of the compile time here. I have no idea why these changes in particular make it faster, but they just do.
Credit for missing includes to @treamology in Git commit
16cfac4829
CGTableCount removed; modern macOS seems to call this
a uint32_t instead. I can find no reference to CGTableCount
in any documentation, and the (very old) source code I dig
up just typedefs it anyway.
- display: GraphicsWindowProc should have a virtual destructor,
as it's meant to be subclassed.
- express: set_matrix_view helper should always fail an assert
when 'size' is wrong, even on release builds.
- express: Fix filename capitalization on some #includes.
They're normally Windows-only, where case doesn't
matter, but it's better to be consistent.
- gobj: Fix typo.
- particlesystem: Remove BaseParticle::_last_position.
Last position is tracked by PhysicsObject now.
- windisplay: Heed warnings about casting bool to (PVOID).
Also, per MSDN docs, SPI_SETMOUSETRAILS uses the
uiParam argument and ignores pvParam, so pass the
_saved_mouse_trails value in that way.
- T_off now actually properly disables vertex colours
- T_vertex is now the default, to preserve the previous behaviour
- ShaderGenerator behavior is now the same as in the FFP
- tests are updated to verify new behavior
- tests now properly use vertex colours, previously they accidentally only used flat colors
- With color-scale-via-lighting off and no color scale, color is no longer munged
- p3d_Color in GLSL shaders is now properly set to white instead of black with T_off mode
- In DX9 shaders will now sample white color for absent or disabled vertex color
Fixes#401
Also see #371
Problem is that WGL is strict about binding context in different thread while it is still bound in another thread. Either way we need to make sure the draw thread is not rendering, so if you call get_screenshot() from a thread other than the draw thread, it uses the GraphicsEngine to wait until the draw thread is idle and then asks it to do the get_screenshot().
Fixes#360
This problem occurs when movePointer is used to reset the mouse back to the center every frame, a very common way to implement mouselook on Windows (which has no relative mouse mode). Any movement between the last event loop run and the call to movePointer is destroyed, resulting in quite choppy mouselook in most implementations.
The solution is for getPointer to always return the latest mouse cursor position. This goes a long way but is not 100% perfect; see the discussion in #359 for other solutions.
Fixes#359
I think there was some confusion about how set_aux_rgba (and friends) worked; it seems the original intent was to toggle each individual buffer whereas it is actually interpreted as a count of how many of these buffers should be enabled. We should try to clarify the API and/or replace it with something better as soon as possible.