OpenGL: Implement commands buffers
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user