mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Cleanup.
This commit is contained in:
parent
6583035397
commit
c89004fdeb
4 changed files with 7 additions and 48 deletions
|
@ -138,8 +138,6 @@ namespace stl
|
|||
#define BGFX_STATE_TEX_COUNT 8
|
||||
|
||||
#define BGFX_SAMPLER_DEFAULT_FLAGS UINT32_C(0x10000000)
|
||||
#define BGFX_SAMPLER_TEXTURE UINT32_C(0x00000000)
|
||||
#define BGFX_SAMPLER_TYPE_MASK UINT32_C(0xc0000000)
|
||||
|
||||
#if BGFX_CONFIG_RENDERER_DIRECT3D9
|
||||
# define BGFX_RENDERER_NAME "Direct3D 9"
|
||||
|
@ -945,7 +943,7 @@ namespace bgfx
|
|||
for (uint32_t ii = 0; ii < BGFX_STATE_TEX_COUNT; ++ii)
|
||||
{
|
||||
m_sampler[ii].m_idx = invalidHandle;
|
||||
m_sampler[ii].m_flags = BGFX_SAMPLER_TEXTURE;
|
||||
m_sampler[ii].m_flags = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1178,10 +1176,7 @@ namespace bgfx
|
|||
m_flags |= BGFX_STATE_TEX0<<_stage;
|
||||
Sampler& sampler = m_state.m_sampler[_stage];
|
||||
sampler.m_idx = _handle.idx;
|
||||
sampler.m_flags = 0
|
||||
| BGFX_SAMPLER_TEXTURE
|
||||
| ( (_flags&BGFX_SAMPLER_TYPE_MASK) ? BGFX_SAMPLER_DEFAULT_FLAGS : _flags)
|
||||
;
|
||||
sampler.m_flags = (_flags&BGFX_SAMPLER_DEFAULT_FLAGS) ? BGFX_SAMPLER_DEFAULT_FLAGS : _flags;
|
||||
|
||||
if (isValid(_sampler) )
|
||||
{
|
||||
|
|
|
@ -2569,15 +2569,8 @@ namespace bgfx
|
|||
{
|
||||
if (invalidHandle != sampler.m_idx)
|
||||
{
|
||||
switch (sampler.m_flags&BGFX_SAMPLER_TYPE_MASK)
|
||||
{
|
||||
case BGFX_SAMPLER_TEXTURE:
|
||||
{
|
||||
Texture& texture = s_renderCtx->m_textures[sampler.m_idx];
|
||||
texture.commit(stage, sampler.m_flags);
|
||||
}
|
||||
break;
|
||||
}
|
||||
Texture& texture = s_renderCtx->m_textures[sampler.m_idx];
|
||||
texture.commit(stage, sampler.m_flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -160,23 +160,6 @@ namespace bgfx
|
|||
D3DFMT_R32F,
|
||||
};
|
||||
|
||||
static const D3DFORMAT s_depthFormat[] =
|
||||
{
|
||||
D3DFMT_UNKNOWN, // ignored
|
||||
D3DFMT_D16, // D16
|
||||
D3DFMT_D24X8, // D24
|
||||
D3DFMT_D24S8, // D24S8
|
||||
D3DFMT_D32, // D32
|
||||
D3DFMT_DF16, // D16F
|
||||
D3DFMT_DF24, // D24F
|
||||
D3DFMT_D32F_LOCKABLE, // D32F
|
||||
#if defined(D3D_DISABLE_9EX)
|
||||
D3DFMT_UNKNOWN, // D0S8
|
||||
#else
|
||||
D3DFMT_S8_LOCKABLE, // D0S8
|
||||
#endif // defined(D3D_DISABLE_9EX)
|
||||
};
|
||||
|
||||
static const D3DTEXTUREADDRESS s_textureAddress[] =
|
||||
{
|
||||
D3DTADDRESS_WRAP,
|
||||
|
@ -2811,12 +2794,7 @@ namespace bgfx
|
|||
{
|
||||
if (invalidHandle != sampler.m_idx)
|
||||
{
|
||||
switch (sampler.m_flags&BGFX_SAMPLER_TYPE_MASK)
|
||||
{
|
||||
case BGFX_SAMPLER_TEXTURE:
|
||||
s_renderCtx->m_textures[sampler.m_idx].commit(stage, sampler.m_flags);
|
||||
break;
|
||||
}
|
||||
s_renderCtx->m_textures[sampler.m_idx].commit(stage, sampler.m_flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -3474,15 +3474,8 @@ namespace bgfx
|
|||
{
|
||||
if (invalidHandle != sampler.m_idx)
|
||||
{
|
||||
switch (sampler.m_flags&BGFX_SAMPLER_TYPE_MASK)
|
||||
{
|
||||
case BGFX_SAMPLER_TEXTURE:
|
||||
{
|
||||
Texture& texture = s_renderCtx->m_textures[sampler.m_idx];
|
||||
texture.commit(stage, sampler.m_flags);
|
||||
}
|
||||
break;
|
||||
}
|
||||
Texture& texture = s_renderCtx->m_textures[sampler.m_idx];
|
||||
texture.commit(stage, sampler.m_flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue