Ticket #1542: GLDirectMode.diff

File GLDirectMode.diff, 693 bytes (added by pieterpan, 13 years ago)

Simple solution: Don't allow the window to get too small

  • src/tests/kits/opengl/direct_mode/GLDirectMode.cpp

     
    7373SampleGLWindow::SampleGLWindow(BRect frame, uint32 type)
    7474   : BDirectWindow(frame, "OpenGL Test", B_TITLED_WINDOW, 0)
    7575{
     76   float minWidth = 0.0f;
     77   float maxWidth = 0.0f;
     78   float minHeight = 0.0f;
     79   float maxHeight = 0.0f;
     80
     81   GetSizeLimits(&minWidth, &maxWidth, &minHeight, &maxHeight);
     82   SetSizeLimits(50.0f, maxWidth, 50.0f, maxHeight);
     83
    7684   BRect r = Bounds();
    7785   
    7886   r.InsetBy(10, 10);