Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9203649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:31:09+00:00 2026-06-17T23:31:09+00:00

I have GLUT installed, this is the code that I am compiling with GCC:

  • 0

I have GLUT installed, this is the code that I am compiling with GCC:

#include <GL/glut.h>

void display()
{
    glClearColor(1.0,1.0,1.0,1.0);
    glClear(GL_COLOR_BUFFER_BIT);
    glFlush();
}

int main(int argc, char** argv)
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
    glutInitWindowSize(500,500);
    glutCreateWindow("test");
    glutDisplayFunc(display);
    glutMainLoop();
    return 0;
}

This is how I compile it:

gcc -Wall -o test -lGL -lGLU -lglut test.c

And I get no errors/warnings.

But when I execute it the window doesn’t appear. In the panel below I see that there is an application alive named “test”, but with no window. It freezes the shell for few seconds and then I press ctrl+c and kill it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:31:11+00:00Added an answer on June 17, 2026 at 11:31 pm

    I’ve found the answer here:

    http://ubuntuforums.org/showthread.php?t=1156705

    I had to temporarily disable compiz to render the window.

    metacity --replace &   # Disables compiz temporarily
    ./your_prog
    compiz --replace &     # Enables compiz again
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have yet to find a good resource that doesn't include GLUT as it's
I have simplified my problem to this example: #include <GL/glut.h> int main(int argc, char**
Used this tutorial I have installed jogl, jocl, gluegen, joal libs and added its
I have a program that uses GLUT for its OpenGL rendering. Now I need
I have been following this tutorial series for OpenGL : GLUT : http://www.lighthouse3d.com/opengl/glut/ I
Possible Duplicate: Glut Mouse Coordinates Let's say that I have a window of 600x600.
I have a very simple code, that just draws a building, I want to
I have a standard glut implementation. The display function redraws each object, but I
I should have the newest version of Glew and Glut so that shouldn't be
I have this situation, I use Netbeans 6.8 with recommended MinGW+msys configuration, and compiling

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.