@@ -576,7 +576,7 @@ FFUInt32 getDefaultParameterVisibility( unsigned int index )
576
576
577
577
extern " C" __declspec( dllexport ) FFMixed __stdcall plugMain ( FFUInt32 functionCode, FFMixed inputValue, FFInstanceID instanceID )
578
578
579
- #elif defined( FFGL_MACOS )
579
+ #elif defined( FFGL_MACOS )
580
580
581
581
FFMixed plugMain ( FFUInt32 functionCode, FFMixed inputValue, FFInstanceID instanceID )
582
582
@@ -931,7 +931,7 @@ FFMixed plugMain( FFUInt32 functionCode, FFMixed inputValue, FFInstanceID instan
931
931
*/
932
932
void ValidateContextState ()
933
933
{
934
- #if defined( _DEBUG )
934
+ #if defined( FFGL_DEBUG )
935
935
GLint glInt[ 4 ];
936
936
GLboolean glBool[ 4 ];
937
937
@@ -967,16 +967,32 @@ void ValidateContextState()
967
967
{
968
968
for ( GLint sampler = 0 ; sampler < numSamplers; ++sampler )
969
969
{
970
+ glActiveTexture ( GL_TEXTURE0 + sampler );
970
971
// Please use the ScopedTextureBinding to automatically unbind textures after you're done with them.
971
972
glGetIntegerv ( pair.binding , glInt );
972
973
assert ( glInt[ 0 ] == 0 );
973
974
}
974
975
}
976
+ glActiveTexture ( GL_TEXTURE0 );
975
977
976
978
// Please use the ScopedVBOBinding to automatically unbind your vertex buffers.
977
979
glGetIntegerv ( GL_ARRAY_BUFFER_BINDING, glInt );
978
980
assert ( glInt[ 0 ] == 0 );
979
981
982
+ // Uncommonly used bindings. You can use the ScopedBufferBinding base class for these.
983
+ glGetIntegerv ( GL_COPY_READ_BUFFER_BINDING, glInt );
984
+ assert ( glInt[ 0 ] == 0 );
985
+ glGetIntegerv ( GL_COPY_WRITE_BUFFER_BINDING, glInt );
986
+ assert ( glInt[ 0 ] == 0 );
987
+ glGetIntegerv ( GL_DRAW_INDIRECT_BUFFER_BINDING, glInt );
988
+ assert ( glInt[ 0 ] == 0 );
989
+ glGetIntegerv ( GL_PIXEL_PACK_BUFFER_BINDING, glInt );
990
+ assert ( glInt[ 0 ] == 0 );
991
+ glGetIntegerv ( GL_PIXEL_UNPACK_BUFFER_BINDING, glInt );
992
+ assert ( glInt[ 0 ] == 0 );
993
+ glGetIntegerv ( GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, glInt );
994
+ assert ( glInt[ 0 ] == 0 );
995
+
980
996
// Please use the ScopedIBOBinding to automatically unbind your index buffers.
981
997
glGetIntegerv ( GL_ELEMENT_ARRAY_BUFFER_BINDING, glInt );
982
998
assert ( glInt[ 0 ] == 0 );
@@ -985,6 +1001,10 @@ void ValidateContextState()
985
1001
glGetIntegerv ( GL_UNIFORM_BUFFER_BINDING, glInt );
986
1002
assert ( glInt[ 0 ] == 0 );
987
1003
1004
+ // Please use the ScopedVAOBinding to automatically unbind your uniform buffers.
1005
+ glGetIntegerv ( GL_VERTEX_ARRAY_BINDING, glInt );
1006
+ assert ( glInt[ 0 ] == 0 );
1007
+
988
1008
// We have no scoped bindings for the render state. You need to manually return these to the context default state.
989
1009
glGetIntegerv ( GL_POLYGON_MODE, glInt );
990
1010
assert ( glInt[ 0 ] == GL_FILL );
0 commit comments