OpenGL: Implement commands buffers

This commit is contained in:
Lynix
2020-05-11 14:12:13 +02:00
parent fe5b70ae1c
commit 6a23d51147
19 changed files with 621 additions and 162 deletions

View File

@@ -8,6 +8,7 @@
namespace Nz::GL
{
inline Context::Context(const OpenGLDevice* device) :
m_vaoCache(*this),
m_device(device)
{
}
@@ -22,6 +23,11 @@ namespace Nz::GL
return m_extensionStatus[UnderlyingCast(extension)];
}
inline const OpenGLVaoCache& Context::GetVaoCache() const
{
return m_vaoCache;
}
inline const ContextParams& Context::GetParams() const
{
return m_params;
@@ -73,13 +79,10 @@ namespace Nz::GL
}
}
inline void Context::SetCurrentTextureUnit(UInt32 textureUnit) const
inline void Context::NotifyVertexArrayDestruction(GLuint vao) const
{
if (m_state.currentTextureUnit != textureUnit)
{
glActiveTexture(GL_TEXTURE0 + textureUnit);
m_state.currentTextureUnit = textureUnit;
}
if (m_state.boundVertexArray == vao)
m_state.boundVertexArray = 0;
}
}