Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ int main(int argc, char** argv) {
```

#Part 3, OpenGL
OpenGL on X11 is done trough the X11 library, include the ```<GL/glx.h>``` header.
OpenGL on X11 is done through the X11 library, include the ```<GL/glx.h>``` header.
##Enabling OpenGL
Before showing the window with *XMapRaised* it's a good idea to check the version of GLX available. Note, the **GLX version is not the same as the OpenGL version**. This can be done with the ```glXQueryVersion(Display* display, GLint* major, GLint* minor)``` function. The first argument is a pointer to the display object, the second two arguments are integer pointer that will have the major and minor version number written to them. If the minimum version of OpenGL is not supported, exit the program. A good minimum verions is 1.2
```
Expand Down Expand Up @@ -618,7 +618,7 @@ if (visual == 0) {
return 1;
}
```
A pointer to the **glXCreateContextAttribsARB** function needs to be acquired trough the ```glXGetProcAddressARB(const GLubyte * strFuncName)``` function.
A pointer to the **glXCreateContextAttribsARB** function needs to be acquired through the ```glXGetProcAddressARB(const GLubyte * strFuncName)``` function.
```
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc) glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB" );
Expand Down Expand Up @@ -1205,4 +1205,4 @@ void Shutdown() {
* http://msdn.microsoft.com/en-us/library/windows/desktop/dd318252(v=vs.85).aspx
* https://gist.github.com/kovrov/1304027
* https://www.youtube.com/watch?v=qWiqRIoKChg
* https://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)
* https://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)