Results 1 to 3 of 3

Thread: how to forbid the view to be redrawed triggered by mouse in glut?

  1. #1
    Junior Member Newbie
    Join Date
    May 2004
    Location
    China
    Posts
    8

    how to forbid the view to be redrawed triggered by mouse in glut?

    I do not want the view to be redrawed after a mouse click in the window or window size change,how to let "glutDisplayFunc()"ignore the mouse action? I want the redraw to be controled only by program code. Can you slove the problem in glut?or please give me some other advice.
    thanks!

  2. #2
    Senior Member Regular Contributor songho's Avatar
    Join Date
    May 2003
    Location
    Canada
    Posts
    242

    Re: how to forbid the view to be redrawed triggered by mouse in glut?

    I think you do not need a redraw callback at all, if you want to call it explicitly.

    Here is other option:
    Do not call glutPostRedisplay() in your mouse callback.

    And do not reset viewport and projection matrix in your reshape callback. Just set your global variable(bool) in order to know when the window is resized. Then, you can change the viewport later when you need to.

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    653

    Re: how to forbid the view to be redrawed triggered by mouse in glut?

    but if you resize and dont redraw you get the same image in a bigger window, you need to make a hack for this? as in

    -- if resize (when dont want redraw) dont redraw
    ?

Similar Threads

  1. "Windows has triggered a breakpoint"
    By Gonzer in forum OpenGL: Windows
    Replies: 7
    Last Post: 10-15-2008, 08:41 AM
  2. Rotate view with mouse
    By Ralf Euser in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-01-2007, 09:59 AM
  3. Forbid Window re-size
    By camotin in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-01-2006, 04:29 AM
  4. Mouse view changing
    By t3jem in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 06-13-2005, 10:45 AM
  5. changing view with mouse
    By link664 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-09-2005, 05:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean