This commit is contained in:
Branimir Karadžić
2015-08-28 20:34:14 -07:00
parent 444384469d
commit bb89e6291c
7 changed files with 41 additions and 39 deletions

View File

@@ -4949,7 +4949,7 @@ namespace bgfx { namespace gl
uint16_t programIdx = invalidHandle;
SortKey key;
uint8_t view = 0xff;
uint16_t view = UINT16_MAX;
FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
int32_t height = hmdEnabled
? _render->m_hmd.height
@@ -5013,7 +5013,7 @@ namespace bgfx { namespace gl
restartState = 2;
item = restartItem;
restartItem = numItems;
view = 0xff;
view = UINT16_MAX;
continue;
}
@@ -5558,20 +5558,20 @@ namespace bgfx { namespace gl
{
for (uint32_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage)
{
const Binding& sampler = draw.m_bind[stage];
const Binding& bind = draw.m_bind[stage];
Binding& current = currentState.m_bind[stage];
if (current.m_idx != sampler.m_idx
|| current.m_un.m_draw.m_flags != sampler.m_un.m_draw.m_flags
if (current.m_idx != bind.m_idx
|| current.m_un.m_draw.m_flags != bind.m_un.m_draw.m_flags
|| programChanged)
{
if (invalidHandle != sampler.m_idx)
if (invalidHandle != bind.m_idx)
{
TextureGL& texture = m_textures[sampler.m_idx];
texture.commit(stage, sampler.m_un.m_draw.m_flags);
TextureGL& texture = m_textures[bind.m_idx];
texture.commit(stage, bind.m_un.m_draw.m_flags);
}
}
current = sampler;
current = bind;
}
}