OpenGL: Implement program wrapper

This commit is contained in:
Lynix
2020-04-26 18:22:31 +02:00
parent b7a7c84a89
commit eba0571f03
8 changed files with 128 additions and 90 deletions

View File

@@ -105,6 +105,7 @@ namespace Nz::GL
bool Initialize(const ContextParams& params);
inline void NotifyBufferDestruction(GLuint buffer) const;
inline void NotifyProgramDestruction(GLuint program) const;
inline void NotifySamplerDestruction(GLuint sampler) const;
inline void NotifyTextureDestruction(GLuint texture) const;
@@ -143,6 +144,7 @@ namespace Nz::GL
std::array<GLuint, UnderlyingCast(BufferTarget::Max) + 1> bufferTargets = { 0 };
std::vector<TextureUnit> textureUnits;
GLuint boundProgram = 0;
UInt32 currentTextureUnit = 0;
};