Skip to main content
GameDev.net gamedev.net
🔒 Locked

Glut callbacks

Started by Dunge Aug 10, 2007 at 10:10 AM 0 replies 700+ views
Original Post
Dunge
Dunge
Hi all, I'm using GLUT in my application and I need to have a callback when the windows move. According to the doc http://www.opengl.org/resources/libraries/glut/spec3/spec3.html there is a glutReshapeFunc function callback when you resize it, but nothing about window moving. Anyone have a suggestion?
songho
songho
Window system is responsible to handle the event when a window moves: WM_SYSCOMMAND message is triggered with SC_MOVE wParam when a window is moving.

The original GLUT does not have any implementation to handle WM_SYSCOMMAND notification. However, if you look at an alternative, open sourced glut, such as freeglut, then, you may modify the source codes and add a callback function yourself.

Take a look at the Window procedure routine in "freeglut_main.c". (line# 1750)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.