minetest/irr/include
HybridDog 7295b6c88c
Remove unused and rarely used irrlicht color functions (#15442)
SColor.h contains many functions which are unused and/or perform linear
operations on non-linear 8 bit sRGB color values, such as the plus operator and
`SColor::getInterpolated()`, and there is no documentation about missing gamma
correction.
Some of these functions are not called or called only once:
* `getAverage(s16 color)`: Unused
* `SColor::getLightness()`: Unused
* `SColor::getAverage()`: Claims to determine a color's average intensity but
  calculates something significantly different since SColor represents
  non-linear sRGB values.
* `SColor::getInterpolated_quadratic()`: Claims to interpolate between colors
  but uses the sRGB color space, which is neither physically nor perceptually
  linear.
* `SColorf::getInterpolated_quadratic()`: Unused
* `SColorf::setColorComponentValue()`: Unused

Removing or inlining these functions can simplify the code and documenting
gamma-incorrect operations can reduce confusion about what the functions do.

This commit does the following:
* Remove the above-mentioned unused functions
* Inline `SColor::getAverage()` into
  `CIrrDeviceLinux::TextureToMonochromeCursor()`
* Rename `SColor::getLuminance()` into `SColor::getBrightness()` since it does
  not determine a color's luminance but calculates something which differs
  significantly from physical luminance since SColor represents non-linear sRGB
  values.
* Inline `SColor::getInterpolated_quadratic()` into `GameUI::update()`,
  where it is only used for the alpha value calculation for fading
* Document gamma-incorrect behaviour in docstrings
2024-11-18 00:02:53 +01:00
..
KHR Don't expose irrlicht internal headers as public 2024-10-09 16:25:02 +02:00
aabbox3d.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
CIndexBuffer.h Add some debug helpers around this area 2024-09-16 23:12:52 +02:00
CMeshBuffer.h Mark a bunch of classes as final 2024-09-02 21:50:13 +02:00
coreutil.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
CVertexBuffer.h Add some debug helpers around this area 2024-09-16 23:12:52 +02:00
dimension2d.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EAttributes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
ECullingTypes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EDebugSceneTypes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EDeviceTypes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EDriverFeatures.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EDriverTypes.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
EFocusFlags.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EGUIAlignment.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EGUIElementTypes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EHardwareBufferFlags.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EMaterialProps.h Drop fixed pipeline lighting stuff (#15165) 2024-09-18 12:18:28 +02:00
EMaterialTypes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EPrimitiveTypes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EReadFileType.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
ESceneNodeTypes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EShaderTypes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EVertexAttributes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
EVideoTypes.h Debloat IVideoDriver and IrrlichtDevice includes (#15080) 2024-08-31 11:44:30 +02:00
exampleHelper.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
fast_atof.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IAnimatedMesh.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IAnimatedMeshSceneNode.h Support floating-point animation frame numbers 2024-10-10 21:39:57 +02:00
IAttributes.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IBillboardSceneNode.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IBoneSceneNode.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
ICameraSceneNode.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IContextManager.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
ICursorControl.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IDummyTransformationSceneNode.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IEventReceiver.h Don't memset SEvent directly (#15359) 2024-10-31 19:24:43 +01:00
IFileArchive.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IFileList.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IFileSystem.h Irrlicht cleanups (mostly getting rid of core::array) 2024-08-17 19:49:11 +02:00
IGPUProgrammingServices.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUIButton.h Make button sprites (scrollbar arrows) DPI-aware (#14772) 2024-06-26 15:25:27 +02:00
IGUICheckBox.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUIComboBox.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUIEditBox.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUIElement.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IGUIEnvironment.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IGUIFileOpenDialog.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUIFont.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUIFontBitmap.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUIImage.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUIImageList.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IGUIListBox.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUIScrollBar.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUISkin.h Move Minetest GUISkin -> Irrlicht CGUISkin 2024-09-08 13:53:33 +02:00
IGUISpriteBank.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUIStaticText.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IGUITabControl.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IGUIToolbar.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IImage.h Add support for ECF_D24 texture format 2024-11-16 16:54:22 +01:00
IImageLoader.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IImageWriter.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IIndexBuffer.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
ILogger.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IMaterialRenderer.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IMaterialRendererServices.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IMemoryReadFile.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IMesh.h Add static glTF support (#14557) 2024-09-02 14:50:30 +02:00
IMeshBuffer.h Put all pieces together and clean up leftover code 2024-09-02 21:50:13 +02:00
IMeshCache.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IMeshLoader.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IMeshManipulator.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IMeshSceneNode.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IOSOperator.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IReadFile.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IReferenceCounted.h Add some debug helpers around this area 2024-09-16 23:12:52 +02:00
IRenderTarget.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
irr_ptr.h Move irr_ptr.h too irr/include/ 2024-09-18 12:19:40 +02:00
irrArray.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IrrCompileConfig.h Simplify Irrlicht CMake for static linking 2024-04-10 15:31:59 +02:00
irrlicht.h Remove BMP image support (#15434) 2024-11-15 12:21:30 +01:00
IrrlichtDevice.h Better UX when touch events aren't supported by Irrlicht device (#15288) 2024-10-16 21:37:00 +02:00
irrMath.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
irrpack.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
irrString.h Fix irrString use-after-free with char-like assignment (operator=) 2024-10-04 10:45:09 +02:00
irrTypes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
irrunpack.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
ISceneCollisionManager.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
ISceneManager.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
ISceneNode.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IShaderConstantSetCallBack.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
ISkinnedMesh.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
ITexture.h Don't keep a copy of all texture images around 2024-11-16 16:54:22 +01:00
ITimer.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
IVertexBuffer.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IVideoDriver.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
IWriteFile.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
Keycodes.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
line2d.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
line3d.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
matrix4.h Refactor matrix4.h 2024-10-10 17:40:31 +02:00
mt_opengl.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
path.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
plane3d.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
position2d.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
quaternion.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
rect.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
S3DVertex.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
SAnimatedMesh.h Support floating-point animation frame numbers 2024-10-10 21:39:57 +02:00
SceneParameters.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
SColor.h Remove unused and rarely used irrlicht color functions (#15442) 2024-11-18 00:02:53 +01:00
SExposedVideoData.h Irrlicht: Use EGL over GLX (#15286) 2024-10-22 23:04:46 +02:00
SIrrCreationParameters.h Expose OpenGL debugging as a normal setting 2024-04-15 17:48:33 +02:00
SMaterial.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
SMaterialLayer.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00
SMesh.h Mark a bunch of classes as final 2024-09-02 21:50:13 +02:00
SMeshBuffer.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
SOverrideMaterial.h Drop fixed pipeline lighting stuff (#15165) 2024-09-18 12:18:28 +02:00
SSkinMeshBuffer.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
SVertexIndex.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
SVertexManipulator.h Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
SViewFrustum.h Debloat IVideoDriver and IrrlichtDevice includes (#15080) 2024-08-31 11:44:30 +02:00
vector2d.h Support floating-point animation frame numbers 2024-10-10 21:39:57 +02:00
vector3d.h Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00