
Hello, I was trying to get help on opengl, but I haven't had much luck. I was told to try this mailing list, so here I am. I want to make it so a opengl window can't be resized. I know there are no opengl functions for that, at least none that I know of. Anyhow, I'm hoping there's some kind of work around that. I'm sure the reason behind that is portability, but I don't need it to work somewhere else other than on the X system. So a way to get the window with xlib and change that property would be just fine. I couldn't find much documentation on Hopengl over the net and the last release seems to be from 3 years ago. I wonder what happened. Was the project discontinued? []'s Rafael

Am Samstag, 9. Dezember 2006 04:25 schrieb Rafael Almeida:
[...] I want to make it so a opengl window can't be resized. I know there are no opengl functions for that, at least none that I know of. Anyhow, I'm hoping there's some kind of work around that. I'm sure the reason behind that is portability, but I don't need it to work somewhere else other than on the X system. So a way to get the window with xlib and change that property would be just fine.
OpenGL has nothing to do with the window systems (X11, Windows, ...), so the real question is: Can your window system in question handle this and is this functionality exposed through a library? If you are using GLUT, you can't force a window to be a given size, just state your humble wishes and better be prepared for everything. :-) This is due to the portability of GLUT and is a good design, because under e.g. X11, the window manager gets request from clients regarding size, position, etc. and decides how to honor/modify them. So *no* library for X11 can guarantee that a window won't change its size. And with GLUT, you can't even give a hint that you want this... If you are using e.g. Gtk2Hs (http://haskell.org/gtk2hs/) or wxHaskell (http://wxhaskell.sourceforge.net/) you can probably at least give a hint that it is preferable to *not* resize the window.
I couldn't find much documentation on Hopengl over the net and the last release seems to be from 3 years ago. I wonder what happened. Was the project discontinued?
Not at all, the OpenGL and GLUT packages are very alive, just the web pages are quite outdated. If you are using a recent GHC or Hugs, you probably have those packages already on your box. Documentation should come with your Haskell distribution and is available online at: http://haskell.org/ghc/docs/latest/html/libraries/ and especially interesting for your purposes are the documents starting at: http://haskell.org/ghc/docs/latest/html/libraries/OpenGL/Graphics-Rendering-... http://haskell.org/ghc/docs/latest/html/libraries/GLUT/Graphics-UI-GLUT.html Depending on your Haskell distribution you already have a lot of OpenGL examples on your box, otherwise have a look at: http:://darcs.haskell.org/packages/GLUT/examples/ The bleeding-edge versions on darcs.haskell.org have almost full OpenGL 2.1 support, including shaders, and I hope to complete it soon. Cheers, S.
participants (2)
-
Rafael Almeida
-
Sven Panne