This commit is contained in:
Glenn Maynard
2005-10-19 23:52:16 +00:00
parent 68eac42eda
commit 37029c2d0d
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -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 );