Jump to content

  • Log In with Google      Sign In   
  • Create Account

Issue with GLX/X11 on Ubuntu not showing correct Window Contents


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 AndyEsser   GDNet+   -  Reputation: 386

Like
0Likes
Like

Posted 30 April 2014 - 04:39 AM

I'm in the process of porting my engine across to Linux support. 

 

I can successfully create a window, and set up an OpenGL context however, the contents of the window are whatever was displayed behind it at the time of creation. NOTE: This is not a transparent window, if I drag the window around it still contains an 'image' of whatever was behind it at the time of creation. (See attached image).

 

Now I'm not sure where the issue could be, however I'm not looking for a solution to a specific issue in my code, mainly just any insight from other Linux/GLX developers who may have seen a similar issue and might know where I should start looking?

 

Cheers!

Attached Thumbnails

  • GL_Window.png


Sponsor:

#2 CoffeeandCode   Members   -  Reputation: 187

Like
0Likes
Like

Posted 30 April 2014 - 04:42 AM

Have you tried clearing it with glClear(GL_COLOR_BUFFER_BIT) then swapping the buffers? Sounds like you're just looking at a garbage front buffer

#3 AndyEsser   GDNet+   -  Reputation: 386

Like
0Likes
Like

Posted 30 April 2014 - 04:51 AM

I stripped all the code in my update function right down to just be:

 

glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);

glXSwapBuffers(dpy, win);

 

With no joy. My first thought was that it was garbage, but with just those calls I'd expect to the see the glClearColor().



#4 Sponji   Members   -  Reputation: 1251

Like
0Likes
Like

Posted 30 April 2014 - 11:12 AM

Did you make the context current with glXMakeCurrent? Did you check for errors with glGetError?


Derp

#5 AndyEsser   GDNet+   -  Reputation: 386

Like
0Likes
Like

Posted 30 April 2014 - 11:17 AM

glGetError() returns no errors anywhere in my application. 

 

Immediately after glXCreateContext() I then call glXMakeCurrent() and calling glGetIntegerv() with GL_MAJOR_VERSION and GL_MINOR_VERSION returns 4 and 2 (4.2) respectively which indicates the GL context has been created successfully.

 

I tried having a glXMakeCurrent() call immediately before I try my glClear/glXSwapBuffers() but to effect.

 

Further info I should have mentioned before, this is a multithreaded application, however all X11/GLX/OpenGL calls are only made by a single thread. I have also tried calling XInitThreads() from the main application thread, and from the Rendering thread with no luck either.



#6 cgrant   Members   -  Reputation: 658

Like
0Likes
Like

Posted 01 May 2014 - 12:23 PM

I'm assuming you called XFlush after creating the window and a glXWaitX after sizing.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS