cleanup
This commit is contained in:
@@ -1926,12 +1926,12 @@ bool RageDisplay_OGL::SupportsSurfaceFormat( PixelFormat pixfmt )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool RageDisplay_OGL::SupportsTextureFormat( PixelFormat pixfmt, bool realtime )
|
bool RageDisplay_OGL::SupportsTextureFormat( PixelFormat pixfmt, bool bRealtime )
|
||||||
{
|
{
|
||||||
/* If we support a pixfmt for texture formats but not for surface formats, then
|
/* If we support a pixfmt for texture formats but not for surface formats, then
|
||||||
* we'll have to convert the texture to a supported surface format before uploading.
|
* we'll have to convert the texture to a supported surface format before uploading.
|
||||||
* This is too slow for dynamic textures. */
|
* This is too slow for dynamic textures. */
|
||||||
if( realtime && !SupportsSurfaceFormat( pixfmt ) )
|
if( bRealtime && !SupportsSurfaceFormat(pixfmt) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
switch( g_GLPixFmtInfo[pixfmt].format )
|
switch( g_GLPixFmtInfo[pixfmt].format )
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ struct AVPixelFormat_t
|
|||||||
int bpp;
|
int bpp;
|
||||||
int masks[4];
|
int masks[4];
|
||||||
avcodec::PixelFormat pf;
|
avcodec::PixelFormat pf;
|
||||||
bool HighColor;
|
bool bHighColor;
|
||||||
bool ByteSwapOnLittleEndian;
|
bool bByteSwapOnLittleEndian;
|
||||||
} AVPixelFormats[] = {
|
} AVPixelFormats[] = {
|
||||||
{
|
{
|
||||||
/* This format is really ARGB, and is affected by endianness, unlike PIX_FMT_RGB24
|
/* This format is really ARGB, and is affected by endianness, unlike PIX_FMT_RGB24
|
||||||
@@ -94,7 +94,7 @@ static void FixLilEndian()
|
|||||||
{
|
{
|
||||||
AVPixelFormat_t &pf = AVPixelFormats[i];
|
AVPixelFormat_t &pf = AVPixelFormats[i];
|
||||||
|
|
||||||
if( !pf.ByteSwapOnLittleEndian )
|
if( !pf.bByteSwapOnLittleEndian )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for( int mask = 0; mask < 4; ++mask)
|
for( int mask = 0; mask < 4; ++mask)
|
||||||
@@ -112,12 +112,12 @@ static void FixLilEndian()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int FindCompatibleAVFormat( PixelFormat &pixfmt, bool HighColor )
|
static int FindCompatibleAVFormat( PixelFormat &pixfmt, bool bHighColor )
|
||||||
{
|
{
|
||||||
for( int i = 0; AVPixelFormats[i].bpp; ++i )
|
for( int i = 0; AVPixelFormats[i].bpp; ++i )
|
||||||
{
|
{
|
||||||
AVPixelFormat_t &fmt = AVPixelFormats[i];
|
AVPixelFormat_t &fmt = AVPixelFormats[i];
|
||||||
if( fmt.HighColor != HighColor )
|
if( fmt.bHighColor != bHighColor )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pixfmt = DISPLAY->FindPixelFormat( fmt.bpp,
|
pixfmt = DISPLAY->FindPixelFormat( fmt.bpp,
|
||||||
@@ -688,7 +688,7 @@ void MovieTexture_FFMpeg::CreateTexture()
|
|||||||
/* No dice. Use the first avcodec format of the preferred bit depth,
|
/* No dice. Use the first avcodec format of the preferred bit depth,
|
||||||
* and let the display system convert. */
|
* and let the display system convert. */
|
||||||
for( m_AVTexfmt = 0; AVPixelFormats[m_AVTexfmt].bpp; ++m_AVTexfmt )
|
for( m_AVTexfmt = 0; AVPixelFormats[m_AVTexfmt].bpp; ++m_AVTexfmt )
|
||||||
if( AVPixelFormats[m_AVTexfmt].HighColor == bPreferHighColor )
|
if( AVPixelFormats[m_AVTexfmt].bHighColor == bPreferHighColor )
|
||||||
break;
|
break;
|
||||||
ASSERT( AVPixelFormats[m_AVTexfmt].bpp );
|
ASSERT( AVPixelFormats[m_AVTexfmt].bpp );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user