aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2014-10-07 03:38:53 +0200
committerWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2014-10-07 03:38:53 +0200
commit3ce7214d2300e2769667649625d160dcdc01499c (patch)
tree97d9426298444528f209ae90bb09c53675d21326 /samples
parenteeb1931d2d214b28e4117ad17824ece40f865511 (diff)
downloadcodesamples-3ce7214d2300e2769667649625d160dcdc01499c.tar.gz
codesamples-3ce7214d2300e2769667649625d160dcdc01499c.tar.bz2
...
Diffstat (limited to 'samples')
-rw-r--r--samples/OpenGL/x11argb_opengl/x11argb_opengl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c
index 8eaddf8..a110a9b 100644
--- a/samples/OpenGL/x11argb_opengl/x11argb_opengl.c
+++ b/samples/OpenGL/x11argb_opengl/x11argb_opengl.c
@@ -156,6 +156,7 @@ static void createTheWindow()
if(pict_format->direct.alphaMask > 0) {
break;
}
+ XFree(visual);
}
if(!fbconfig) {
@@ -248,7 +249,7 @@ static void createTheWindow()
static int ctxErrorHandler( Display *dpy, XErrorEvent *ev )
{
- fputs("Error at context creation", stderr);
+ fputs("Error at context creation\n", stderr);
return 0;
}
@@ -265,12 +266,12 @@ static void createTheRenderContext()
render_context = NULL;
if( isExtensionSupported( glXQueryExtensionsString(Xdisplay, DefaultScreen(Xdisplay)), "GLX_ARB_create_context" ) ) {
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
- glXCreateContextAttribsARBProc glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB( (const GLubyte *) "glXCreateContextAttribsARB" );
+ glXCreateContextAttribsARBProc glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddressARB("glXCreateContextAttribsARB" );
if( glXCreateContextAttribsARB ) {
int context_attribs[] =
{
- GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
- GLX_CONTEXT_MINOR_VERSION_ARB, 0,
+ GLX_CONTEXT_MAJOR_VERSION_ARB, 2,
+ GLX_CONTEXT_MINOR_VERSION_ARB, 1,
//GLX_CONTEXT_FLAGS_ARB , GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
None
};
@@ -281,17 +282,16 @@ static void createTheRenderContext()
XSync( Xdisplay, False );
XSetErrorHandler( oldHandler );
-
- fputs("glXCreateContextAttribsARB failed", stderr);
} else {
- fputs("glXCreateContextAttribsARB could not be retrieved", stderr);
+ fputs("glXCreateContextAttribsARB could not be retrieved\n", stderr);
}
} else {
- fputs("glXCreateContextAttribsARB not supported", stderr);
+ fputs("glXCreateContextAttribsARB not supported\n", stderr);
}
if(!render_context)
{
+ fputs("using fallback\n", stderr);
#else
{
#endif