X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fvoglcommon%2Fvogl_general_context_state.cpp;h=ef3db73a4716964dee083e4cbf8c06ab360c7230;hb=f68811cb11c76f4b6ecc982401c87a0bd49a26e6;hp=a6637daf3350dec7252d8f4f3f231bd80ecda3e5;hpb=d73de670dade59a783990e5ac264bb3cfd9d45d9;p=vogl diff --git a/src/voglcommon/vogl_general_context_state.cpp b/src/voglcommon/vogl_general_context_state.cpp index a6637da..ef3db73 100644 --- a/src/voglcommon/vogl_general_context_state.cpp +++ b/src/voglcommon/vogl_general_context_state.cpp @@ -278,10 +278,13 @@ public: m_can_use_glGetPointerv = (GL_ENTRYPOINT(glGetPointerv) != NULL) && !context_info.is_core_profile(); m_max_texture_units = 0; - GL_ENTRYPOINT(glGetIntegerv)(GL_MAX_TEXTURE_UNITS, &m_max_texture_units); - m_max_texture_coords = 0; - GL_ENTRYPOINT(glGetIntegerv)(GL_MAX_TEXTURE_COORDS, &m_max_texture_coords); + + if (!context_info.is_core_profile()) + { + GL_ENTRYPOINT(glGetIntegerv)(GL_MAX_TEXTURE_UNITS, &m_max_texture_units); + GL_ENTRYPOINT(glGetIntegerv)(GL_MAX_TEXTURE_COORDS, &m_max_texture_coords); + } m_max_combined_texture_coords = 0; GL_ENTRYPOINT(glGetIntegerv)(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &m_max_combined_texture_coords); @@ -294,6 +297,8 @@ public: m_max_vertex_attribs = 0; GL_ENTRYPOINT(glGetIntegerv)(GL_MAX_VERTEX_ATTRIBS, &m_max_vertex_attribs); + + VOGL_CHECK_GL_ERROR; } bool m_can_use_glGetBooleani_v; @@ -941,7 +946,10 @@ bool vogl_general_context_state::restore(const vogl_context_info &context_info, #endif GLint prev_client_active_texture = 0; - GL_ENTRYPOINT(glGetIntegerv)(GL_CLIENT_ACTIVE_TEXTURE, &prev_client_active_texture); + if (!context_info.is_core_profile()) + { + GL_ENTRYPOINT(glGetIntegerv)(GL_CLIENT_ACTIVE_TEXTURE, &prev_client_active_texture); + } GLint prev_active_texture = 0; GL_ENTRYPOINT(glGetIntegerv)(GL_ACTIVE_TEXTURE, &prev_active_texture);