mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 14:16:50 +00:00
fixed some unitialized variables
This commit is contained in:
parent
0a66367243
commit
a16123e4be
@ -2447,10 +2447,10 @@ bool CVoxelTree::EnumerateElementsAlongRay_ExtrudedRay( SpatialPartitionListMask
|
||||
return true;
|
||||
|
||||
// Setup.
|
||||
int nStep[3];
|
||||
float tMax[3]; // amount of change in t along ray until we hit the next new voxel
|
||||
float tMin[3]; // amount of change in t along ray until we leave the last voxel
|
||||
float tDelta[3];
|
||||
int nStep[3] = {0, 0, 0};
|
||||
float tMax[3] = {0.f, 0.f, 0.f}; // amount of change in t along ray until we hit the next new voxel
|
||||
float tMin[3] = {0.f, 0.f, 0.f}; // amount of change in t along ray until we leave the last voxel
|
||||
float tDelta[3] = {0.f, 0.f, 0.f};
|
||||
m_pVoxelHash[0].LeafListExtrudedRaySetup( ray, vecInvDelta, vecMin, vecMax, voxelBounds[0][0], voxelBounds[0][1], nStep, tMin, tMax, tDelta );
|
||||
|
||||
int nLastVoxel1[3];
|
||||
|
@ -1038,7 +1038,7 @@ inline T QWordSwapC( T dw )
|
||||
// The typically used methods.
|
||||
//-------------------------------------
|
||||
|
||||
#if (defined(__i386__) || (defined(__arm__) && defined(ANDROID))) && !defined(VALVE_LITTLE_ENDIAN)
|
||||
#if (defined(__i386__) || defined(__amd64__) || (defined(__arm__) && defined(ANDROID))) && !defined(VALVE_LITTLE_ENDIAN)
|
||||
#define VALVE_LITTLE_ENDIAN 1
|
||||
#endif
|
||||
|
||||
|
@ -277,6 +277,9 @@ enum GLDriverProvider_t
|
||||
cGLDriverProviderIntel,
|
||||
cGLDriverProviderIntelOpenSource,
|
||||
cGLDriverProviderApple,
|
||||
cGLDriverProviderARM,
|
||||
cGLDriverProviderQualcomm,
|
||||
cGLDriverProviderImagination,
|
||||
|
||||
cGLTotalDriverProviders
|
||||
};
|
||||
|
@ -279,7 +279,7 @@ CSysModule *Sys_LoadModule( const char *pModuleName, Sys_Flags flags /* = SYS_NO
|
||||
// prior to the call to this routine.
|
||||
char szCwd[1024];
|
||||
#ifdef POSIX
|
||||
char szModuleName[1024];
|
||||
char szModuleName[1024] = { 0 };
|
||||
#endif
|
||||
HMODULE hDLL = NULL;
|
||||
|
||||
|
@ -2454,6 +2454,7 @@ static uint gPersistentBufferSize[kGLMNumBufferTypes] =
|
||||
|
||||
GLMContext::GLMContext( IDirect3DDevice9 *pDevice, GLMDisplayParams *params )
|
||||
{
|
||||
m_nNumDirtySamplers = 0;
|
||||
// m_bUseSamplerObjects = true;
|
||||
//
|
||||
// // On most AMD drivers (like the current latest, 12.10 Windows), the PCF depth comparison mode doesn't work on sampler objects, so just punt them.
|
||||
|
@ -365,6 +365,12 @@ COpenGLEntryPoints::COpenGLEntryPoints()
|
||||
m_nDriverProvider = cGLDriverProviderIntelOpenSource;
|
||||
else if ( V_stristr( m_pGLDriverStrings[cGLVendorString], "apple" ) )
|
||||
m_nDriverProvider = cGLDriverProviderApple;
|
||||
else if ( V_stristr( m_pGLDriverStrings[cGLVendorString], "qualcomm" ) )
|
||||
m_nDriverProvider = cGLDriverProviderQualcomm;
|
||||
else if ( V_stristr( m_pGLDriverStrings[cGLVendorString], "arm" ) )
|
||||
m_nDriverProvider = cGLDriverProviderARM;
|
||||
else if ( V_stristr( m_pGLDriverStrings[cGLVendorString], "imagination technologies" ) )
|
||||
m_nDriverProvider = cGLDriverProviderImagination;
|
||||
|
||||
pszString = ( const char * )glGetString(GL_RENDERER);
|
||||
m_pGLDriverStrings[cGLRendererString] = strdup( pszString ? pszString : "" );
|
||||
|
@ -2359,10 +2359,16 @@ static uint gPersistentBufferSize[kGLMNumBufferTypes] =
|
||||
|
||||
GLMContext::GLMContext( IDirect3DDevice9 *pDevice, GLMDisplayParams *params )
|
||||
{
|
||||
m_bUseSamplerObjects = true;
|
||||
if ( CommandLine()->CheckParm( "-gl_disablesamplerobjects" ) )
|
||||
m_nNumDirtySamplers = 0;
|
||||
|
||||
if( gGL->m_nDriverProvider == cGLDriverProviderARM )
|
||||
m_bUseSamplerObjects = true;
|
||||
else
|
||||
m_bUseSamplerObjects = false;
|
||||
|
||||
if ( CommandLine()->CheckParm( "-gl_enablesamplerobjects" ) )
|
||||
m_bUseSamplerObjects = true;
|
||||
|
||||
// Try to get some more free memory by relying on driver host copies instead of ours.
|
||||
// In some cases the driver will be able to discard their own host copy and rely on GPU
|
||||
// memory, reducing memory usage.
|
||||
|
Loading…
Reference in New Issue
Block a user