Windows only supports OpenGL1.1, but graphics cards may implement the related functions of higher versions of OpenGL directly from the hardware. How do you call a higher version of OpenGL in development?
Let’s start with a look at the OpenGL version and related function extensions supported by a graphics card:
To see what version of OpenGL the graphics card supports: glGetString(GL_VERSION);
To see the supported extensions: glGetString(GL_EXTENSIONS);
See more detailed information.
http://www.opengl.org/wiki/GlGetString
Note: call glGetString(GLemun); Be sure to initialize the drawing window before doing so, otherwise only null will be returned.
Calling extensions with glew:
After confirm the graphics support high version of the function can be used to glew libraries (http://sourceforge.net/projects/glew/) to invoke, configured information can be used after glew libraries. What I want to point out here is that before using the OpenGL function declared in the advanced version of Glew, you must make the following call:
GLenum err = glewInit ();
if (GLEW_OK! = err)
{
* Problem: glewInit failed, something is seriously wrong. */
f>tf (stderr, “Error: %s/n”, glewgeterrorString (err));
}
You can also use glee,glext, and mesa.
Glee is similar to Glew,glext is a bit cumbersome to use, and mesa is a platform-independent implementation of OpenGL.
Let’s start with a look at the OpenGL version and related function extensions supported by a graphics card:
To see what version of OpenGL the graphics card supports: glGetString(GL_VERSION);
To see the supported extensions: glGetString(GL_EXTENSIONS);
See more detailed information.
http://www.opengl.org/wiki/GlGetString
Note: call glGetString(GLemun); Be sure to initialize the drawing window before doing so, otherwise only null will be returned.
Calling extensions with glew:
After confirm the graphics support high version of the function can be used to glew libraries (http://sourceforge.net/projects/glew/) to invoke, configured information can be used after glew libraries. What I want to point out here is that before using the OpenGL function declared in the advanced version of Glew, you must make the following call:
GLenum err = glewInit ();
if (GLEW_OK! = err)
{
* Problem: glewInit failed, something is seriously wrong. */
f>tf (stderr, “Error: %s/n”, glewgeterrorString (err));
}
You can also use glee,glext, and mesa.
Glee is similar to Glew,glext is a bit cumbersome to use, and mesa is a platform-independent implementation of OpenGL.
Read More:
- How to use higher version of OpenGL SDK in windows?
- [error record] as compilation error (Android support plugin version is too high | upgrade Android studio to the latest version)
- Solve the problem that the version of less is too high
- QT running prompt failed to create OpenGL context for format qsurfaceformat (version 2.0, options qflags() solution)
- [solved] why can’t open the lightning simulator using remote desktop, OpenGL version 1.1.0?
- About how to solve the 8050800c error when Windows Update updates the definition of Windows Defender
- How does lightningchart, a high performance chart control, draw maps in 3D?
- [181124] VC + + use OpenGL to draw 3D graphics example source code
- Configuring OpenGL in Chinese version of VS2010 and problem solving
- OpenGL function reference (Chinese version)
- Configuring OpenGL + glew in windows10 + Visual Studio 2017
- Error msb8036: Windows SDK version not found···
- Configuring OpenGL environment with code blocks16.0 in Windows 10
- The use of makefile in GoLand under Windows
- Configuration of OpenGL development environment under Windows environment, win10 + vs2019 + glfw + glad
- Installation and use of OpenGL based on CodeBlocks
- Solution to unbalanced load of multiple cards (GPU’s 0 card is too high) in Python model training (simple and effective)
- How to view the version of MySQL database
- How to open dump in Windows
- How to: Install Hyperterminal On Windows 7