Results 1 to 3 of 3

Thread: How to display a small window(such as smaller than 32*32) correctly in glut?

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

    How to display a small window(such as smaller than 32*32) correctly in glut?

    I must display small windows(smaller than 32*32 pixels) in my work.The window height can display correctly,but the window width cannot smaller than a specifical value,so the view is displayed in a wrong scale.seems the window width is restricted by the "windows minimize,maximize and close buttons",you can see this phenomena in normal windows forms.
    I used glut all along,can you solve the problem in glut? Or give me some other advice.
    thanks!

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: How to display a small window(such as smaller than 32*32) correctly in glut?

    As far as I know, this limitation in size is something the Win32 API enforces when these system buttons are present, so it's really nothing GLUT can do about it.

    However, depending on what you want, maybe a "large" window and a small viewport would work. As long as the window is larger than 32x32 pixels, glViewport(0, 0, 32, 32) will give you a 32x32 pixel area to play with. Those particular values will put the 32x32 block in the bottom left corner of the window, but you can adjust them to place the viewport anywhere on the window.

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

    Re: How to display a small window(such as smaller than 32*32) correctly in glut?

    thanks,your advice is worth taking a try.I limpingly solved the problem using the glutCreateSubWindow().Create a subwindow in parent window,they can be set at the same size,the subwindow width can be displayed correctly,although the parent window width cannot while the size is small(such as the width<60).There is a block of blank in parent window beside the subwindow,draw view in the subwindow,it works.
    thanks again!

Similar Threads

  1. Replies: 2
    Last Post: 12-02-2014, 04:18 AM
  2. Replies: 4
    Last Post: 05-23-2012, 10:24 AM
  3. Window smaller than viewport
    By Runik in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-10-2008, 01:37 AM
  4. Any Advantages To Really Small Display Lists?
    By deadalive in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 04-22-2003, 01:14 AM
  5. Small display lists?
    By NordFenris in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 04-15-2003, 06:08 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