libgoatvr
diff example/src/main.c @ 11:34d4643d61f9
remove _opt suffix from vr_get_opt/vr_set_opt, and _OPT_from the predefined names
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 24 Sep 2014 10:18:42 +0300 |
parents | 3d9ec6fe97d7 |
children | 437fe32ac633 |
line diff
1.1 --- a/example/src/main.c Sat Sep 20 20:12:00 2014 +0300 1.2 +++ b/example/src/main.c Wed Sep 24 10:18:42 2014 +0300 1.3 @@ -77,8 +77,8 @@ 1.4 } 1.5 1.6 /* resize our window to match the HMD resolution */ 1.7 - win_width = vr_get_opti(VR_OPT_DISPLAY_WIDTH); 1.8 - win_height = vr_get_opti(VR_OPT_DISPLAY_HEIGHT); 1.9 + win_width = vr_geti(VR_DISPLAY_WIDTH); 1.10 + win_height = vr_geti(VR_DISPLAY_HEIGHT); 1.11 if(!win_width || !win_height) { 1.12 SDL_GetWindowSize(win, &win_width, &win_height); 1.13 } else { 1.14 @@ -87,8 +87,8 @@ 1.15 } 1.16 1.17 /* and create a single render target texture to encompass both eyes */ 1.18 - fb_width = vr_get_opti(VR_OPT_LEYE_XRES) + vr_get_opti(VR_OPT_REYE_XRES); 1.19 - fb_height = vr_get_opti(VR_OPT_LEYE_YRES); /* assuming both are the same */ 1.20 + fb_width = vr_geti(VR_LEYE_XRES) + vr_geti(VR_REYE_XRES); 1.21 + fb_height = vr_geti(VR_LEYE_YRES); /* assuming both are the same */ 1.22 if(!fb_width || !fb_height) { 1.23 fb_width = win_width; 1.24 fb_height = win_height; 1.25 @@ -127,7 +127,7 @@ 1.26 * to the rift's part of the desktop before going fullscreen 1.27 */ 1.28 SDL_GetWindowPosition(win, &prev_x, &prev_y); 1.29 - SDL_SetWindowPosition(win, vr_get_opti(VR_OPT_WIN_XOFFS), vr_get_opti(VR_OPT_WIN_YOFFS)); 1.30 + SDL_SetWindowPosition(win, vr_geti(VR_WIN_XOFFS), vr_geti(VR_WIN_YOFFS)); 1.31 SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN_DESKTOP); 1.32 } else { 1.33 /* return to windowed mode and move the window back to its original position */ 1.34 @@ -178,7 +178,7 @@ 1.35 vr_view_matrix(i, view_mat); 1.36 glLoadMatrixf(view_mat); 1.37 /* move the camera to the eye level of the user */ 1.38 - glTranslatef(0, -vr_get_optf(VR_OPT_EYE_HEIGHT), 0); 1.39 + glTranslatef(0, -vr_getf(VR_EYE_HEIGHT), 0); 1.40 1.41 /* finally draw the scene for this eye */ 1.42 draw_scene();