Программы на C++. Форум разработчиков
Anonymous
Обнаружение профиля контекста OpenGL перед версией 3.2
Сообщение
Anonymous » 12 фев 2025, 23:08
Я пытаюсь обнаружить профиль контекста Opengl, созданный по умолчанию, созданный с помощью GLFW. Это то, как я его реализовал (на основе страницы вики) < /p>
Код: Выделить всё
std::string openGLProfile(){
// Prints the profile of the current context
GLint profile = 0;
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &profile);
bool core_profile = profile & GL_CONTEXT_CORE_PROFILE_BIT;
bool compatibility_profile = profile & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT;
std::string str = "No profile";
if (core_profile == true)
str = "Core profile";
else if (compatibility_profile == true)
str = "Compatibility";
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/73745603/detect-the-opengl-context-profile-before-version-3-2[/url]
1739390913
Anonymous
Я пытаюсь обнаружить профиль контекста Opengl, созданный по умолчанию, созданный с помощью GLFW. Это то, как я его реализовал (на основе страницы вики) < /p> [code]std::string openGLProfile(){ // Prints the profile of the current context GLint profile = 0; glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &profile); bool core_profile = profile & GL_CONTEXT_CORE_PROFILE_BIT; bool compatibility_profile = profile & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT; std::string str = "No profile"; if (core_profile == true) str = "Core profile"; else if (compatibility_profile == true) str = "Compatibility"; std::cout Подробнее здесь: [url]https://stackoverflow.com/questions/73745603/detect-the-opengl-context-profile-before-version-3-2[/url]