Results 1 to 2 of 2

Thread: Resizing window

  1. #1

    Resizing window

    Hey,
    How to disable possibility of resizing window ?, my program works on x,y co. and if somone change window size it stops working.

    I would be greatfull if I get code in Free Pascal.
    I'm using glutInitDisplayWindow(), glutCreateWindow().

    thx for help

  2. #2

    Resizing window

    You can't disable resizing a window when using glut. It's simply not implemented in glut.

    You should simply ignore the resize --- i.e. keep the glViewport the same, no matter what size the actual window has.

    Alternatively, you could use a hack, by changing window size back to original size each time it's resized. In other words, call glutReshapeWindow from the function you registered in glutReshapeFunc. But this is really an ugly hack.

    If you want to write "serious" programs, there are better libraries than glut to initialize OpenGL context. One example is SDL, jedi-sdl bindings allow you to use this from FPC. (Not to mention my own little library that can initialize OpenGL contexts using WGL or GLX or GTK

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •