Recent

Author Topic: GLUT  (Read 3803 times)

Imants

  • Full Member
  • ***
  • Posts: 198
GLUT
« on: May 28, 2010, 06:58:29 am »
Does someone know how to resize GLUT window.

I tryed this code. When there are no window created it is all right but if I had created window my application stop working:

procedure TGLEngine.DoSetScrSize(const NewWidth, NewHeight: Integer);
begin
  if FWnd <> -1 then
    glutDestroyWindow(FWnd);

  glutInitWindowSize(NewWidth, NewHeight);

  glutInitWindowPosition(
    (glutGet(GLUT_SCREEN_WIDTH) - NewWidth) div 2,
    (glutGet(GLUT_SCREEN_HEIGHT) - NewHeight) div 2);

  FWnd := glutCreateWindow('GLUT')
end;   

Leledumbo

  • Hero Member
  • *****
  • Posts: 8776
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: GLUT
« Reply #1 on: May 29, 2010, 04:59:10 am »
Simply call glutReshapeWindow ;)

 

TinyPortal © 2005-2018