This is particularly the case when requesting a core-only profile (gl-version 3 2) where luminance textures are deprecated.
There is apparently no way to emulate them with swizzles (as we do with luminance textures), so we'll have to duplicate the channels out.
Fixes#693
These should be protected by an is_debug() check so that they can be optimized out properly in a release build. Setting check-debug-notify-protect in Config.prc can be used to track down cases of missed checks.
This is meant to be used alongside gl-version to request a "forward compatible" OpenGL 3.0 or 3.1 context, which removes support for deprecated features such as the fixed-function pipeline.
Specifically, this happens if you have a custom ShaderGenerator that assigns shader inputs via the ShaderAttrib. If two objects then both have the auto-shader turned on, and the shader generator generates ShaderAttribs with the same shaders but different inputs, the inputs will not be updated properly for one of the objects.
Officially, in core profile OpenGL 3.2+, calling it with a value higher than 1.0 is an error, but many vendors seem to let us. Apple's implementation does not. It appears that checking the maximum line width is a way to deal with this.
Fixes#466
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.
This is necessary for GLSL 1.30 which deprecates gl_FragData but does not yet support layout(location=) specifiers
Also fix some function pointer checks for pre-GL 3.0
Fixes#455
Previously, all draw calls would be grouped under "Primitive Setup", rather than under the appropriate bin collector. This commit fixes that and adds a few other useful collectors as well.
This changes includes so that local includes are consistently
#include "localFile.h"
while system and third-party includes are consistently
#include <systemFile.h>
This commit mostly converts the former to the latter; the two
exceptions are in android_main.cxx and fmodAudioSound.h, where
the reverse was necessary.
- 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
This might have only been an issue in some drivers (not sure, spec is a bit vague here).
Apparently we need to call glMaterial *after* the color material setting has been disabled for it to stick.
Fixes#369
Currently, the WeakPointerTo comparison operators compare the raw pointers, but this is not useful as it may cause a false equality if one weak pointer in the comparison is expired and points to memory that has since been reused.
Instead, we can define a comparison based on the control block pointer, which exists since the new weak pointer implementation in 0bb81a43c9. This is implemented in the owner_before method, matching C++11 std::weak_ptr semantics.
I would now recommend deprecating most comparison operators of WeakPointerTo or redefining them to make more sense, ie. comparing equal if they (once) referred to the same object and not if they simply point to the same memory address. This has not yet been done, though code that uses the comparison operators has been fixed in this commit.
Overloads of std::owner_less have been provided for creating a map or set with Weak(Const)PointerTo keys.
Some drivers would report the wrong internal format. But it's silly that we query the internal format anyway, since buffer textures have a fixed sized internal format.