TSBK07 Computer Graphics/TSBK03 Game Programming Forum Index TSBK07 Computer Graphics/TSBK03 Game Programming
TSBK07/TSBK03 course forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Segmentation fault from glGenList and glGenTextures on mac

 
Post new topic   Reply to topic    TSBK07 Computer Graphics/TSBK03 Game Programming Forum Index -> OpenGL programming
View previous topic :: View next topic  
Author Message
Eriw



Joined: 23 Feb 2010
Posts: 1

PostPosted: Tue Feb 23, 2010 8:21 pm    Post subject: Segmentation fault from glGenList and glGenTextures on mac Reply with quote

I have a problem geting glGenList and glGenTextures to work on my macbook. The code compiles and runs at school, but I get a segfault on my mac. Isn't it posible to use these functions on mac?

Example of one piece of code thet crashes:
Code:

        // Create a display list
        displayListID = glGenLists(1);

   // Compile the display list
   glNewList(displayListID, GL_COMPILE);
      
      glBegin(GL_QUADS);

            glTexCoord2f(0.0f, 0.0f);
            glVertex3f(-0.1f, -0.1f, 0.0f);
            glTexCoord2f(1.0f, 0.0f);
            glVertex3f(0.1f, -0.1f, 0.0f);
            glTexCoord2f(1.0f, 1.0f);
            glVertex3f(0.1f, 0.1f, 0.0f);
            glTexCoord2f(0.0f, 1.0f);
            glVertex3f(-0.1f, 0.1f, 0.0f);
      
      glEnd();

   glEndList();


The program crashes right at the first line at glGenLists(1) , displayListID is a GLuint.
Back to top
View user's profile Send private message
ingemar
Site Admin


Joined: 03 Jan 2007
Posts: 113

PostPosted: Sat Feb 27, 2010 8:20 pm    Post subject: Reply with quote

It is definitely possible. For example, I use it in the simpleFont code (http://computer-graphics.se/TSBK07-files/pdf/PDF09/demos/). Works perfectly.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    TSBK07 Computer Graphics/TSBK03 Game Programming Forum Index -> OpenGL programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group