Results 1 to 5 of 5

Thread: Disable window resizing in C

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2011
    Posts
    7

    Disable window resizing in C

    I've been looking everywhere, and can't really find anything (search engines are awful sometimes) of any help to me. I need to know how to disable resizing of an OpenGL window in C (I'm using FreeGLUT on Linux, if any of that is important).

    The sooner I get this figured out, the sooner I can get back to writing my wrapper for OpenGL and get started (one day) on my RPG. @_@;
    Heya. You like reading signatures, too? Cool. :P

  2. #2
    Newbie Frequent Contributor
    Join Date
    Mar 2016
    Posts
    896

    Re: Disable window resizing in C

    I'm using FreeGLUT on Linux, if any of that is important
    yes, because what you are asking for has actually nothing to do with OpenGL, it only depends on your windowing environment. With glut you are probably limited to registering a resize function and then use glutReshapeWindow to undo any resizing the user has done.

    The sooner I get this figured out, the sooner I can get back to writing my wrapper for OpenGL and get started (one day) on my RPG
    If you allow small problems like this halt your progress you are likely never getting there. This isn't really a showstopper for writing your game, just something can tackle somewhere along the way. So if something like this comes up again, put it aside, assume the best (i.e. in this case create a window of the expected size and assume the user does not resize for now) and come back to it at a later point - just don't forget about it completely or you will have surprised users

    For your particular problem: it is usually not considered nice to have just one fixed size window/resolution. So even if you are developing for a fixed size now you should consider keeping this flexible so that you can easily adapt to other sizes later.

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2011
    Posts
    7

    Re: Disable window resizing in C

    My primary reason for asking wasn't because it actually stops me from continuing or even gets in the way of my work. I can easily work with it as it is, considering everything will be contained within one, centralised viewpoint (though the maps themselves will be larger, that isn't my point). I just felt that window resizing isn't worth having in this, since there's no valid reason for wanting to resize the window. I appreciate the intent of the advice, so I guess I'll just ignore this for now. I've worked with SFML and SDL in the past, each of which having their own way to manage this resizing issue, and so I figured GLUT would have something along the same lines.

    Important part: Thanks, not for solving the problem but rather reminding me that it shouldn't stop me and can be worked out later if I still feel it necessary.
    Heya. You like reading signatures, too? Cool. :P

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Disable window resizing in C

    No need to ignore his advice, as it is an actual solution for glut.
    I would only add : do not use glut, GLFW is better for a game.

  5. #5
    Junior Member Newbie
    Join Date
    Oct 2011
    Posts
    7

    Re: Disable window resizing in C

    EDIT: I totally misread what you said, or maybe you changed it while I was editing. GLFW? I'll check it out, thanks! Hoping that's available for GNU/Linux.. @_@; Also, I wasn't going to ignore his advice. o_o

    EDIT again: Found it, installed it, will now have a look at it and get started. Thanks! <UPDATE: Trying it out now, and I absolutely love it! GLFW is perfect. ^_^
    Heya. You like reading signatures, too? Cool. :P

Similar Threads

  1. Very Basic: about resizing a window
    By zedrummer in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-09-2014, 12:30 PM
  2. Window Resizing
    By sidenelen in forum OpenGL: Basic Coding
    Replies: 14
    Last Post: 08-17-2011, 02:01 AM
  3. Window Resizing
    By Brennan in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-02-2005, 01:52 PM
  4. window resizing
    By paneb in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 03-27-2003, 04:21 PM
  5. Resizing a window
    By gregs in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-28-2002, 09:57 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