Merge revisions r5598 through r5602 from trunk to ogl-es.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5603 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2018-02-18 16:06:44 +00:00
parent 08312fa15c
commit 67d3ffbc1f
3 changed files with 2 additions and 15 deletions

View File

@ -9,6 +9,7 @@ Changes in ogl-es (not yet released - will be merged with trunk at some point)
--------------------------
Changes in 1.9 (not yet released)
- Fix wrong colors on big endian platforms with burnings renders. Thx @kas1e for reporting and @curaga for the patch (#318). Forum bug discussion at http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52177.
- Fix bug #440 where OpenGL driver enabled second texture for single-texture materials when setMaterial was called twice. Thx@ "number Zero" for bugreport and test-case.
- Irrlicht icon now loaded with LR_DEFAULTSIZE to better support larger icon requests. Thx@ luthyr for report and bugfix.
- Cursor on X11 behaves now like on Win32 and doesn't try to clip positions to the window

View File

@ -32,6 +32,7 @@ namespace video
ECF_R8G8B8,
//! Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha.
//! Warning: This tends to be BGRA in memory (it's ARGB on file, but with usual big-endian memory it's flipped)
ECF_A8R8G8B8,
/** Compressed image formats. **/

View File

@ -646,17 +646,10 @@ inline s32 f32_to_23Bits(const f32 x)
*/
REALINLINE tVideoSample fix_to_color ( const tFixPoint r, const tFixPoint g, const tFixPoint b )
{
#ifdef __BIG_ENDIAN__
return FIXPOINT_COLOR_MAX |
( r & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - 8) |
( g & FIXPOINT_COLOR_MAX) << ( 16 - FIX_POINT_PRE ) |
( b & FIXPOINT_COLOR_MAX) << ( 24 - FIX_POINT_PRE );
#else
return ( FIXPOINT_COLOR_MAX & FIXPOINT_COLOR_MAX) << ( SHIFT_A - FIX_POINT_PRE ) |
( r & FIXPOINT_COLOR_MAX) << ( SHIFT_R - FIX_POINT_PRE ) |
( g & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - SHIFT_G ) |
( b & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - SHIFT_B );
#endif
}
@ -665,18 +658,10 @@ REALINLINE tVideoSample fix_to_color ( const tFixPoint r, const tFixPoint g, con
*/
REALINLINE tVideoSample fix4_to_color ( const tFixPoint a, const tFixPoint r, const tFixPoint g, const tFixPoint b )
{
#ifdef __BIG_ENDIAN__
return ( a & (FIX_POINT_FRACT_MASK - 1 )) >> ( FIX_POINT_PRE ) |
( r & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - 8) |
( g & FIXPOINT_COLOR_MAX) << ( 16 - FIX_POINT_PRE ) |
( b & FIXPOINT_COLOR_MAX) << ( 24 - FIX_POINT_PRE );
#else
return ( a & (FIX_POINT_FRACT_MASK - 1 )) << ( SHIFT_A - 1 ) |
( r & FIXPOINT_COLOR_MAX) << ( SHIFT_R - FIX_POINT_PRE ) |
( g & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - SHIFT_G ) |
( b & FIXPOINT_COLOR_MAX) >> ( FIX_POINT_PRE - SHIFT_B );
#endif
}
/*!