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 8353751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:21:13+00:00 2026-06-09T09:21:13+00:00

Last week, I tried a few examples I found while reading GLUT tutorials and

  • 0

Last week, I tried a few examples I found while reading GLUT tutorials and everything was working great.

Now, when I retry those same examples, I get a weird behaviour: my GLUT window displays the part of the desktop that is at the place the window is (so if the GLUT window starts at (100,100) and is sized 500px by 500px, it displays the part of the desktop that starts at (100,100) and ends at (600,600)).

The following example that I tested last week should show a wire teapot on a black background. I’d like to know if there’s something wrong with my code (since I don’t recall changing anything in it) or if the problems come from the library not being linked correctly or if it’s something else that I’m not aware of.

#include <GL/glut.h>

void displayFunc(void);

int glutWindow;

int main(int argc, char** argv){
    glutInit(&argc, argv);

    glutInitDisplayMode(GLUT_RGBA | GLUT_SINGLE);

    // define the size
    glutInitWindowSize(500,500);

    // the position where the window will appear
    glutInitWindowPosition(100,100);

    glutWindow = glutCreateWindow("UITest");
    glClearColor(0.0, 0.0, 0.0, 0.0);

    glutDisplayFunc(displayFunc);

    glutMainLoop();

    return EXIT_SUCCESS;
}

void displayFunc(void){
    glClear(GL_COLOR_BUFFER_BIT);

    glutWireTeapot(0.5);
}
  • 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-09T09:21:15+00:00Added an answer on June 9, 2026 at 9:21 am

    You need to add a call to glFlush() in the end of displayFunc().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Last week I created an e-shop with opencart. Now I'm trying to customize the
Last week I handled some object casting (DataGridView Columns Control casts) and I tried
Last week I was working on a project. Today, I reopened the project and
I found this file mappanslow.html last week on http://code.google.com/p/gmaps-samples-v3/source/browse/trunk/talks/io2011/map-usability/mappanslow.html?spec=svn265&r=265 and it was very useful
I installed iOS 4.2 on my 2nd-generation iPod Touch last week. I tried running
I wrote a Minesweeper game that worked fine last week, but now when I
In the last week I tried to calculate angle between three points - first
I've spent the last week developing a Powershell script. It now works ok when
The last week I stumbled over this paper where the authors mention on the
I start studing iOS last week and before I go any further I would

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.