The big NULL replacement party part 6.
...and ', NULL' had even more to replace.
This commit is contained in:
@@ -255,7 +255,7 @@ void RenderTarget_MacOSX::Create( const RenderTargetParam ¶m, int &iTextureW
|
||||
|
||||
glTexImage2D( GL_TEXTURE_2D, 0, param.bWithAlpha? GL_RGBA8:GL_RGB8,
|
||||
iTextureWidth, iTextureHeight, 0, param.bWithAlpha? GL_RGBA:GL_RGB,
|
||||
GL_UNSIGNED_BYTE, NULL );
|
||||
GL_UNSIGNED_BYTE, nullptr );
|
||||
GLenum error = glGetError();
|
||||
ASSERT_M(error == GL_NO_ERROR, RageDisplay_Legacy_Helpers::GLToString(error));
|
||||
|
||||
@@ -483,10 +483,10 @@ int LowLevelWindow_MacOSX::ChangeDisplayMode( const VideoModeParams& p )
|
||||
}
|
||||
|
||||
if( p.rate == REFRESH_DEFAULT )
|
||||
newMode = CGDisplayBestModeForParameters( kCGDirectMainDisplay, p.bpp, p.width, p.height, NULL );
|
||||
newMode = CGDisplayBestModeForParameters( kCGDirectMainDisplay, p.bpp, p.width, p.height, nullptr );
|
||||
else
|
||||
newMode = CGDisplayBestModeForParametersAndRefreshRate( kCGDirectMainDisplay, p.bpp,
|
||||
p.width, p.height, p.rate, NULL );
|
||||
p.width, p.height, p.rate, nullptr );
|
||||
|
||||
|
||||
err = CGDisplaySwitchToMode( kCGDirectMainDisplay, newMode );
|
||||
|
||||
@@ -20,7 +20,7 @@ static void DestroyGraphicsWindowAndOpenGLContext()
|
||||
{
|
||||
if( g_HGLRC != nullptr )
|
||||
{
|
||||
wglMakeCurrent( NULL, NULL );
|
||||
wglMakeCurrent( NULL, nullptr );
|
||||
wglDeleteContext( g_HGLRC );
|
||||
g_HGLRC = nullptr;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ RString LowLevelWindow_Win32::TryVideoMode( const VideoModeParams &p, bool &bNew
|
||||
LOG->Trace( "Mode requires new pixel format, and we've already set one; resetting OpenGL context" );
|
||||
if( g_HGLRC != nullptr )
|
||||
{
|
||||
wglMakeCurrent( NULL, NULL );
|
||||
wglMakeCurrent( NULL, nullptr );
|
||||
wglDeleteContext( g_HGLRC );
|
||||
g_HGLRC = nullptr;
|
||||
wglDeleteContext( g_HGLRC_Background );
|
||||
@@ -262,7 +262,7 @@ void LowLevelWindow_Win32::BeginConcurrentRendering()
|
||||
|
||||
void LowLevelWindow_Win32::EndConcurrentRendering()
|
||||
{
|
||||
wglMakeCurrent( NULL, NULL );
|
||||
wglMakeCurrent( NULL, nullptr );
|
||||
}
|
||||
|
||||
static LocalizedString OPENGL_NOT_AVAILABLE( "LowLevelWindow_Win32", "OpenGL hardware acceleration is not available." );
|
||||
@@ -357,7 +357,7 @@ void RenderTarget_Win32::Create(const RenderTargetParam ¶m, int &iTextureWid
|
||||
internalformat = param.bWithAlpha? GL_RGBA8:GL_RGB8;
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, internalformat, iTextureWidth,
|
||||
iTextureHeight, 0, type, GL_UNSIGNED_BYTE, NULL);
|
||||
iTextureHeight, 0, type, GL_UNSIGNED_BYTE, nullptr);
|
||||
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
|
||||
@@ -151,7 +151,7 @@ RString LowLevelWindow_X11::TryVideoMode( const VideoModeParams &p, bool &bNewDe
|
||||
glXDestroyContext( Dpy, g_pContext );
|
||||
if( g_pBackgroundContext )
|
||||
glXDestroyContext( Dpy, g_pBackgroundContext );
|
||||
g_pContext = glXCreateContext( Dpy, xvi, NULL, True );
|
||||
g_pContext = glXCreateContext( Dpy, xvi, nullptr, True );
|
||||
g_pBackgroundContext = glXCreateContext( Dpy, xvi, g_pContext, True );
|
||||
|
||||
glXMakeCurrent( Dpy, Win, g_pContext );
|
||||
@@ -459,7 +459,7 @@ void RenderTarget_X11::Create( const RenderTargetParam ¶m, int &iTextureWidt
|
||||
iTextureHeightOut = iTextureHeight;
|
||||
|
||||
glTexImage2D( GL_TEXTURE_2D, 0, param.bWithAlpha? GL_RGBA8:GL_RGB8,
|
||||
iTextureWidth, iTextureHeight, 0, param.bWithAlpha? GL_RGBA:GL_RGB, GL_UNSIGNED_BYTE, NULL );
|
||||
iTextureWidth, iTextureHeight, 0, param.bWithAlpha? GL_RGBA:GL_RGB, GL_UNSIGNED_BYTE, nullptr );
|
||||
GLenum error = glGetError();
|
||||
ASSERT_M( error == GL_NO_ERROR, GLToString(error) );
|
||||
|
||||
@@ -505,7 +505,7 @@ bool LowLevelWindow_X11::SupportsRenderToTexture() const
|
||||
{
|
||||
// Server must support pbuffers:
|
||||
const int iScreen = DefaultScreen( Dpy );
|
||||
float fVersion = strtof( glXQueryServerString(Dpy, iScreen, GLX_VERSION), NULL );
|
||||
float fVersion = strtof( glXQueryServerString(Dpy, iScreen, GLX_VERSION), nullptr );
|
||||
if( fVersion < 1.3f )
|
||||
return false;
|
||||
|
||||
@@ -540,7 +540,7 @@ void LowLevelWindow_X11::BeginConcurrentRendering()
|
||||
|
||||
void LowLevelWindow_X11::EndConcurrentRendering()
|
||||
{
|
||||
bool b = glXMakeCurrent( Dpy, None, NULL );
|
||||
bool b = glXMakeCurrent( Dpy, None, nullptr );
|
||||
ASSERT(b);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user