[ RMAN @ 25.12.2010. 12:36 ] @
Hocu da centriram prozor na centar ekrana u zavisnosti od rezolucije, pa me zanima kao da dobijem trenutno aktivnu rezoluciju ekrana. Inace, pocetnik sam u openGl-u ![]() |
[ RMAN @ 25.12.2010. 12:36 ] @
[ RMAN @ 25.12.2010. 12:52 ] @
Uspeo sam
![]() Code: int screenWidth = Glut.glutGet(Glut.GLUT_SCREEN_WIDTH); int screenHeight = Glut.glutGet(Glut.GLUT_SCREEN_HEIGHT); int windowWidth = Glut.glutGet(Glut.GLUT_INIT_WINDOW_WIDTH); int windowHeight = Glut.glutGet(Glut.GLUT_INIT_WINDOW_HEIGHT); Glut.glutInitWindowPosition(screenWidth/2-windowWidth/2, screenHeight/2-windowHeight/2); Copyright (C) 2001-2025 by www.elitesecurity.org. All rights reserved.
|