This commit is contained in:
Riley Labrecque
2015-02-06 10:14:41 +02:00
parent 13dfd29f13
commit 3aa76d12fa
87 changed files with 19272 additions and 256 deletions
+5 -5
View File
@@ -992,7 +992,7 @@ HRESULT IDirect3D9::GetDeviceCaps(UINT Adapter,D3DDEVTYPE DeviceType,D3DCAPS9* p
// just leave glmRendererInfo filled out for subsequent code to look at as needed.
// fill in the pCaps record for adapter... we zero most of it and just fill in the fields that we think the caller wants.
Q_memset( pCaps, 0, sizeof(*pCaps) );
V_memset( pCaps, 0, sizeof(*pCaps) );
/* Device Info */
@@ -1113,7 +1113,7 @@ HRESULT IDirect3D9::GetAdapterIdentifier( UINT Adapter, DWORD Flags, D3DADAPTER_
Assert( Flags == D3DENUM_WHQL_LEVEL ); // we're not handling any other queries than this yet
Q_memset( pIdentifier, 0, sizeof(*pIdentifier) );
V_memset( pIdentifier, 0, sizeof(*pIdentifier) );
GLMDisplayDB *db = g_engine->GetDisplayDB();
int glmRendererIndex = -1;
@@ -1144,8 +1144,8 @@ HRESULT IDirect3D9::GetAdapterIdentifier( UINT Adapter, DWORD Flags, D3DADAPTER_
#if 0
// this came from the shaderapigl effort
Q_strncpy( pIdentifier->Driver, "Fake-Video-Card", MAX_DEVICE_IDENTIFIER_STRING );
Q_strncpy( pIdentifier->Description, "Fake-Video-Card", MAX_DEVICE_IDENTIFIER_STRING );
V_strncpy( pIdentifier->Driver, "Fake-Video-Card", MAX_DEVICE_IDENTIFIER_STRING );
V_strncpy( pIdentifier->Description, "Fake-Video-Card", MAX_DEVICE_IDENTIFIER_STRING );
pIdentifier->VendorId = 4318;
pIdentifier->DeviceId = 401;
pIdentifier->SubSysId = 3358668866;
@@ -5461,7 +5461,7 @@ HRESULT IDirect3DDevice9::SetScissorRect(CONST RECT* pRect)
{
int nSurfaceHeight = m_drawableFBO->m_attach[ kAttColor0 ].m_tex->m_layout->m_key.m_ySize;
GLScissorBox_t newScissorBox = { pRect->left, pRect->top, pRect->right - pRect->left, pRect->bottom - pRect->top };
GLScissorBox_t newScissorBox = { (GLint)pRect->left, (GLint)pRect->top, (GLint)(pRect->right - pRect->left), (GLint)(pRect->bottom - pRect->top) };
gl.m_ScissorBox = newScissorBox;
gl.m_stateDirtyMask |= (1<<kGLScissorBox);
return S_OK;
+3 -3
View File
@@ -1934,7 +1934,7 @@ void GLMContext::Clear( bool color, unsigned long colorValue, bool depth, float
GLClearColor_t clearcol;
GLClearDepth_t cleardep = { depthValue };
GLClearStencil_t clearsten = { stencilValue };
GLClearStencil_t clearsten = { (GLint)stencilValue };
// depth write mask must be saved&restored
GLDepthMask_t olddepthmask;
@@ -1942,7 +1942,7 @@ void GLMContext::Clear( bool color, unsigned long colorValue, bool depth, float
// stencil write mask must be saved and restored
GLStencilWriteMask_t oldstenmask;
GLStencilWriteMask_t newstenmask = { 0xFFFFFFFF };
GLStencilWriteMask_t newstenmask = { ~(GLint)0 };
GLColorMaskSingle_t oldcolormask;
GLColorMaskSingle_t newcolormask = { -1,-1,-1,-1 }; // D3D clears do not honor color mask, so force it
@@ -6923,7 +6923,7 @@ void GLMTester::Test2( void )
for( int i=0; i<m_params.m_frameCount; i++)
{
// ramping shades of blue...
GLfloat clear_color[4] = { 0.50f, 0.05f, ((float)(i%100)) / 100.0, 1.0f };
GLfloat clear_color[4] = { 0.50f, 0.05f, ((float)(i%100)) / 100.0f, 1.0f };
glClearColor(clear_color[0], clear_color[1], clear_color[2], clear_color[3]);
CheckGLError("test2 clear color");
+1 -1
View File
@@ -3673,7 +3673,7 @@ void CGLMEditableTextItem::GenBaseNameAndFullPath( char *prefix, char *suffix
// bring this code back if you need the live shader edit/debug mode.
#if 0
Q_binarytohex( m_origDigest, sizeof(m_origDigest), temp, sizeof( temp ) );
V_binarytohex( m_origDigest, sizeof(m_origDigest), temp, sizeof( temp ) );
if (suffix)
{
strcat( temp, suffix );
+1 -1
View File
@@ -159,7 +159,7 @@ private:
#define V_strstr strstr
#define __cdecl
#define Q_memset(dst,count,val) memset(dst,count,val)
#define V_memset(dst,count,val) memset(dst,count,val)
int V_stricmp(const char *s1, const char *s2 );
char const* V_stristr( char const* pStr, char const* pSearch );
+2 -2
View File
@@ -473,7 +473,7 @@ GLMRendererInfo::GLMRendererInfo( GLMRendererInfoFields *info )
kCGLPFADoubleBuffer, kCGLPFANoRecovery, kCGLPFAAccelerated,
kCGLPFADepthSize, 0,
kCGLPFAColorSize, 32,
kCGLPFARendererID, info->m_rendererID,
kCGLPFARendererID, static_cast<unsigned int>(info->m_rendererID),
0
};
@@ -797,7 +797,7 @@ void GLMRendererInfo::PopulateDisplays( void )
}
}
char *CheesyRendererDecode( uint value )
const char *CheesyRendererDecode( uint value )
{
switch(value)
{