Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: OpenGL Question  (Read 944 times)

Salbrismind

  • Bay Watcher
    • View Profile
OpenGL Question
« on: June 28, 2009, 08:35:13 pm »

Toady, I was wondering if you could help a fellow programmer out! I'm doing some OpenGL programming but I can't seem to make my window prevent resizing like you did for Dwarf Fortress. May I ask how you do that?

- Thanks in Advance, Salbris
Logged

SimRobert2001

  • Bay Watcher
    • View Profile
Re: OpenGL Question
« Reply #1 on: June 29, 2009, 01:50:22 am »

I belive that was done (and headed) by Baughn.  you could try to send a message to him. and actually, your question is better left in the "general discussion" board.
Logged

Impaler[WrG]

  • Bay Watcher
  • Khazad Project Leader
    • View Profile
Re: OpenGL Question
« Reply #2 on: June 29, 2009, 02:09:45 am »

If your using SDL then you need to remove the remove the SDL_RESIZABLE argument to SDL_SetVideoMode, If using direct OpenGL to create the screen their is probably some equivalent but I recommend using SDL for its cross platform capabilities.
Logged
Khazad the Isometric Fortress Engine
Extract forts from DF, load and save them to file and view them in full 3D

Khazad Home Thread
Khazad v0.0.5 Download

bhelyer

  • Bay Watcher
  • The kart iz not movink!
    • View Profile
Re: OpenGL Question
« Reply #3 on: June 29, 2009, 04:02:25 am »

This has nothing to do with OpenGL. OpenGL knows not of mortal matters like windows and mice and keyboards.
Logged

Salbrismind

  • Bay Watcher
    • View Profile
Re: OpenGL Question
« Reply #4 on: June 29, 2009, 09:45:14 am »

There has to be some way to enable this using, GLUT or OpenGL directly. Isn't there?
Logged

dorf

  • Bay Watcher
    • View Profile
Re: OpenGL Question
« Reply #5 on: June 29, 2009, 04:43:31 pm »

You can't do much with GLUT, since it was made for testing small programs and such.
OpenGL doesn't have much to do with this either.

On windows systems the solution is not to pass WS_THICKFRAME, when calling CreateWindow().
If you're using SDL with OpenGL (which is a very good and very cross-platform solution) then you do what Impaler wrote.
Logged

bhelyer

  • Bay Watcher
  • The kart iz not movink!
    • View Profile
Re: OpenGL Question
« Reply #6 on: June 30, 2009, 01:58:11 am »

Quote
OpenGL directly

Once more, with gusto: OpenGL has nothing to do with window creation.

And it looks like glut doesn't give you the option of creating a non-resizable window. Pick a more capable toolkit (glx/wgl/apple's one, SDL, SFML, etc, etc).
Logged