#include <stdio.h>#include <stdlib.h>#include <math.h>#include <string.h>#include "glwin.h"#include <X11/Xlib.h>#include <X11/keysym.h>#include <X11/Xatom.h>#include <GL/glx.h>#include <GL/gl.h>Go to the source code of this file.
[static]
Definition at line 647 of file glwin.c.
References oglhandle::dpy, oglhandle::evdev, oglhandle::ext, GLWIN_EV_NONE, oglhandle::havefocus, oglhandle::havestencil, oglhandle::instereo, NULL, oglhandle::root, and oglhandle::scrnum.
Referenced by glwin_create.
[static]
Definition at line 2684 of file glwin.c.
References oglhandle::ext, glsl_shader::FragmentShaderObject, GLATTACHOBJECTARB, GLCOMPILESHADERARB, GLDELETEOBJECTARB, GLGETOBJECTPARAMETERIVARB, GLLINKPROGRAMARB, GLSHADERSOURCEARB, GLWIN_ERROR, glwin_print_glsl_infolog, GLWIN_SUCCESS, glsl_shader::isvalid, length, NULL, glsl_shader::ProgramObject, and glsl_shader::VertexShaderObject.
Referenced by glwin_compile_hmd_shaders.
Definition at line 684 of file glwin.c.
References oglhandle::ctx, oglhandle::dpy, glwin_alloc_init, GLWIN_EV_POLL_BLOCK, glwin_handle_events, glwin_init_exts, glwin_swap_buffers, oglhandle::havestencil, oglhandle::height, oglhandle::instereo, mask, NULL, oglhandle::root, oglhandle::sball, oglhandle::sballevent, oglhandle::scrnum, spaceball_attach, spaceball_clear_event, spaceball_init_event, oglhandle::width, oglhandle::win, and oglhandle::wmDeleteWindow.
Definition at line 1026 of file glwin.c.
References oglhandle::dpy, oglhandle::ext, NULL, oglhandle::sball, spaceball_close, and oglhandle::win.
Definition at line 2762 of file glwin.c.
References oglhandle::ext, GLDELETEOBJECTARB, GLWIN_ERROR, GLWIN_SUCCESS, glsl_shader::isvalid, and glsl_shader::ProgramObject.
Definition at line 2854 of file glwin.c.
References glwin_get_winsize, GLWIN_STEREO_OVERUNDER, and glwin_swap_buffers.
Definition at line 2900 of file glwin.c.
References glwin_get_winsize, GLWIN_STEREO_OVERUNDER, and glwin_swap_buffers.
Definition at line 2088 of file glwin.c.
References oglhandle::ext, glwin_fbo_target::fbo, GLWIN_ERROR, GLWIN_SUCCESS, and NULL.
Definition at line 2163 of file glwin.c.
References glwin_fbo_target::depth, glwin_fbo_target::drawbufs, oglhandle::ext, glwin_fbo_target::fbo, GLWIN_ERROR, glwin_fbo_target_destroy, glwin_fbo_target_resize, glwin_ext_fctns::hasglfborendertarget, NULL, and glwin_fbo_target::tex.
Definition at line 2114 of file glwin.c.
References glwin_fbo_target::depth, oglhandle::ext, glwin_fbo_target::fbo, GLWIN_ERROR, GLWIN_SUCCESS, NULL, and glwin_fbo_target::tex.
Definition at line 2258 of file glwin.c.
References GLWIN_ERROR, glwin_fbo_target_unbind, GLWIN_SUCCESS, NULL, and glwin_fbo_target::tex.
Definition at line 2245 of file glwin.c.
References oglhandle::ext, GLWIN_ERROR, GLWIN_SUCCESS, and NULL.
Definition at line 2130 of file glwin.c.
References glwin_fbo_target::depth, glwin_fbo_target::drawbufs, oglhandle::ext, glwin_fbo_target::fbo, GLWIN_ERROR, GLWIN_SUCCESS, NULL, and glwin_fbo_target::tex.
Definition at line 2101 of file glwin.c.
References oglhandle::ext, GLWIN_ERROR, GLWIN_SUCCESS, and NULL.
Definition at line 1283 of file glwin.c.
References oglhandle::dpy, oglhandle::root, and oglhandle::win.
Definition at line 3256 of file glwin.c.
References oglhandle::evdev, oglhandle::evkey, oglhandle::evval, and NULL.
Definition at line 3285 of file glwin.c.
References spaceballevent::buttons, spaceballevent::event, NULL, spaceballevent::rx, spaceballevent::ry, spaceballevent::rz, oglhandle::sball, oglhandle::sballevent, spaceballevent::tx, spaceballevent::ty, and spaceballevent::tz.
Definition at line 3186 of file glwin.c.
References oglhandle::havestencil, oglhandle::instereo, and NULL.
Definition at line 3201 of file glwin.c.
References oglhandle::dpy, oglhandle::height, NULL, oglhandle::width, and oglhandle::win.
Definition at line 1075 of file glwin.c.
References oglhandle::dpy, oglhandle::evdev, oglhandle::evkey, oglhandle::evval, GLWIN_EV_KBD, GLWIN_EV_KBD_DELETE, GLWIN_EV_KBD_DOWN, GLWIN_EV_KBD_END, GLWIN_EV_KBD_F1, GLWIN_EV_KBD_F10, GLWIN_EV_KBD_F11, GLWIN_EV_KBD_F12, GLWIN_EV_KBD_F2, GLWIN_EV_KBD_F3, GLWIN_EV_KBD_F4, GLWIN_EV_KBD_F5, GLWIN_EV_KBD_F6, GLWIN_EV_KBD_F7, GLWIN_EV_KBD_F8, GLWIN_EV_KBD_F9, GLWIN_EV_KBD_HOME, GLWIN_EV_KBD_INSERT, GLWIN_EV_KBD_LEFT, GLWIN_EV_KBD_PAGE_UP, GLWIN_EV_KBD_RIGHT, GLWIN_EV_KBD_UP, GLWIN_EV_MOUSE_LEFT, GLWIN_EV_MOUSE_MIDDLE, GLWIN_EV_MOUSE_MOVE, GLWIN_EV_MOUSE_RIGHT, GLWIN_EV_MOUSE_WHEELDOWN, GLWIN_EV_MOUSE_WHEELUP, GLWIN_EV_NONE, GLWIN_EV_POLL_NONBLOCK, GLWIN_EV_WINDOW_CLOSE, oglhandle::havefocus, oglhandle::height, oglhandle::mousex, oglhandle::mousey, NULL, oglhandle::sball, oglhandle::sballevent, spaceball_clear_event, spaceball_decode_event, oglhandle::width, oglhandle::win, oglhandle::wmDeleteWindow, oglhandle::xpos, and oglhandle::ypos.
Definition at line 397 of file glwin.c.
References oglhandle::dpy, oglhandle::ext, framebuffer, glwin_get_procaddress, glwin_query_extension, glx_query_extension, glwin_ext_fctns::hasgetvideosyncsgi, glwin_ext_fctns::hasglfborendertarget, glwin_ext_fctns::hasglfragmentshaderarb, glwin_ext_fctns::hasglgeometryshader4arb, glwin_ext_fctns::hasglsampleshadingarb, glwin_ext_fctns::hasglshaderobjectsarb, glwin_ext_fctns::hasglshadinglangarb, glwin_ext_fctns::hasglvertexshaderarb, n, NULL, and void.
Referenced by glwin_create.
[static]
Definition at line 2658 of file glwin.c.
References oglhandle::ext, GLGETINFOLOGARB, GLGETOBJECTPARAMETERIVARB, and NULL.
Referenced by glwin_compile_shaders.
Definition at line 2038 of file glwin.c.
References oglhandle::dpy, oglhandle::ext, GLWIN_ERROR, GLWIN_NOT_IMPLEMENTED, GLWIN_SUCCESS, glx_query_extension, glwin_ext_fctns::hasgetvideosyncsgi, and NULL.
Definition at line 2553 of file glwin.c.
References glwin_fbo_target_create, glwin_spheremap_update_hmd_warp, glwin_warp_hmd::hmd_fbo, and glwin_warp_hmd::wrot.
Definition at line 2528 of file glwin.c.
References glwin_warp_hmd::Bxcrds, glwin_warp_hmd::Bycrds, glwin_fbo_target_destroy, glwin_warp_hmd::Gxcrds, glwin_warp_hmd::Gycrds, glwin_warp_hmd::hmd_fbo, NULL, glwin_warp_hmd::Rxcrds, glwin_warp_hmd::Rycrds, glwin_warp_hmd::xcrds, and glwin_warp_hmd::ycrds.
Definition at line 2565 of file glwin.c.
References glwin_warp_hmd::Bxcrds, glwin_warp_hmd::Bycrds, glwin_warp_hmd::divcnt, GLWIN_ERROR, glwin_fbo_target_bind, glwin_fbo_target_unbind, glwin_spheremap_draw_tex, GLWIN_STEREO_OVERUNDER, GLWIN_SUCCESS, glwin_warp_hmd::Gxcrds, glwin_warp_hmd::Gycrds, hmd_draw_eye_lines, hmd_draw_eye_texquads, glwin_warp_hmd::hmd_fbo, NULL, glwin_warp_hmd::Rxcrds, glwin_warp_hmd::Rycrds, glwin_fbo_target::tex, glwin_warp_hmd::xcrds, and glwin_warp_hmd::ycrds.
Definition at line 3132 of file glwin.c.
References glwin_draw_sphere_tex, glwin_get_winsize, GLWIN_STEREO_OVERUNDER, n, NULL, and quat_rot_matrix.
Definition at line 2450 of file glwin.c.
References glwin_warp_hmd::Bxcrds, glwin_warp_hmd::Bycrds, glwin_warp_hmd::divcnt, force, GLWIN_ERROR, glwin_fbo_target_resize, glwin_warp_hmd::Gxcrds, glwin_warp_hmd::Gycrds, hmd_compute_warped_coords, glwin_warp_hmd::hmd_fbo, NULL, glwin_warp_hmd::Rxcrds, glwin_warp_hmd::Rycrds, glwin_warp_hmd::wsx, glwin_warp_hmd::wsy, glwin_warp_hmd::xcrds, and glwin_warp_hmd::ycrds.
[static]
[static]
[static]
[static]
[static]
Definition at line 323 of file glwin.c.
Referenced by glwin_spheremap_draw_tex, HMDMgr::rot_basis_quat, and HMDMgr::rot_point_quat.
Definition at line 524 of file glwin.c.
References spaceballhandle::drv_win, spaceballhandle::ev_button_press, spaceballhandle::ev_button_release, spaceballhandle::ev_command, spaceballhandle::ev_motion, NULL, and SBALL_COMMAND_APP_WINDOW.
Referenced by glwin_create.
[static]
Definition at line 635 of file glwin.c.
References spaceballevent::event, spaceballevent::period, spaceballevent::rx, spaceballevent::ry, spaceballevent::rz, spaceballevent::tx, spaceballevent::ty, and spaceballevent::tz.
[static]
[static]
Definition at line 594 of file glwin.c.
References spaceballevent::buttons, spaceballhandle::ev_button_press, spaceballhandle::ev_button_release, spaceballhandle::ev_motion, spaceballevent::event, NULL, spaceballevent::period, spaceballevent::rx, spaceballevent::ry, spaceballevent::rz, spaceballevent::tx, spaceballevent::ty, and spaceballevent::tz.
[static]
Initial value:
" \n"
" \n"
" \n"
" \n"
"void main(void) { \n"
" \n"
" // Flip the surface normal if it is facing away from the viewer, \n"
" // determined by polygon winding order provided by OpenGL. \n"
" vec3 N = normalize(oglnormal); \n"
" if (!gl_FrontFacing) { \n"
" N = -N; \n"
" } \n"
" \n"
" \n"
" \n"
" \n"
" \n"
" \n"
"} \n"
" \n"Definition at line 2813 of file glwin.c.
Referenced by glwin_compile_hmd_shaders.
Initial value:
"// requires GLSL version 1.10 \n"
"#version 110 \n"
" \n"
" \n"
" \n"
"void main(void) { \n"
" // transform vertex to Eye space for user clipping plane calculations \n"
" vec4 ecpos = gl_ModelViewMatrix * gl_Vertex; \n"
" gl_ClipVertex = ecpos; \n"
" \n"
" // transform, normalize, and output normal. \n"
" oglnormal = normalize(gl_NormalMatrix * gl_Normal); \n"
" \n"
" // pass along vertex color for use fragment shading, \n"
" // fragment shader will get an interpolated color. \n"
" oglcolor = vec3(gl_Color); \n"
" \n"
" \n"
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; \n"
" \n"
" \n"
" \n"
" \n"
"} \n"
" \n"Definition at line 2781 of file glwin.c.
Referenced by glwin_compile_hmd_shaders.