Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion freeglut seems very fragile.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rob  
View profile  
 More options Sep 1 2012, 10:32 pm
Newsgroups: comp.graphics.api.opengl
From: Rob <no...@all.com>
Date: 02 Sep 2012 02:32:19 GMT
Local: Sat, Sep 1 2012 10:32 pm
Subject: freeglut seems very fragile.
I've taken to putting the infamous glxgears back under glut so that I can
port it to a variety of different VMs where I'm testing performance against
the native linux host with an NVIDIA 460 GPU.

In an openSUSE guest the thing segfaulted even though it compiled and ran
on a 32 bit XP guest, and the native 64 bit fedora host.

see below:
//-------------------------------------------------------------------------
int main(int argc, char *argv[])

{

   glutInit(&argc,argv);

   glutInitDisplayMode(GLUT_RGB|GLUT_DOUBLE|GLUT_DEPTH);

   glutInitWindowSize(800,800);

   glutInitWindowPosition(300,100);

   /* absolutely no good reason why the glutGet() is required before
      glutCreateWindow(), but without it I get:
           OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x76de90
           OpenGL Warning: Retry with 0x8002 returned 0 visuals
           Segmentation fault
      My only theory is that there exists a syncronization "bug" between glut
      and the underlying Xwindows system.  Possibly the window cannot be realized
      because some setup at the X11 level hasn't finished and the glutGet()
      possibly flushes out the cobwebs.  In any case this is extremely fragile
      and should not be required!
   */

   if (!glutGet(GLUT_DISPLAY_MODE_POSSIBLE)) // <- my point of contention

      exit(1);
   glutCreateWindow("Glxgears");

//-------------------------------------------------------------------------

The inline comment says it all.  It only seems to require the glutGet() in openSUSE.
Any thoughts or comments?  Note that it executes without the glutGet() but cannot
find the correct visual.  When I add glutGet() it ALWAYS succeeds...Weird!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.