Changes between Version 7 and Version 8 of GraphicsAPI


Ignore:
Timestamp:
Nov 10, 2014, 3:58:46 PM (11 years ago)
Author:
Tom Goddard
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GraphicsAPI

    v7 v8  
    3333The Hydra graphics module depends on matrix and vector math provided by the geometry module.  The main geometry object is a Place which is a coordinate frame (origin position and 3 axis vectors).  Points and vectors are simply numpy arrays.  The graphics module depends on numpy, pyopengl, math, but no Hydra modules besides geometry and map_cpp.  The map_cpp module is C++ used to accelerate some numpy operations, currently just 3, what is hit by a mouse click for picking, hiding mesh edges, and blending images.  These routines are in map_cpp which has about 100 routines for density map operations because I was too lazy to make a separate C++ module for these graphics operations.
    3434
     35== User Interface ==
     36
     37The View class handles OpenGL rendering.  To use the View class a graphical user interface needs to create an opengl context and instruct View to draw periodically.  Five functions that are part of the View class API are needed.
     38
     39* make_opengl_context_current() - this is a window-system specific opengl call.  It should create the OpenGL context when called the first time.
     40* swap_opengl_buffers() - this is a window-system specific opengl call that causes the rendered off-screen buffer to be shown on the screen.
     41* draw_if_needed() - called 60 times per second using a window system timer event.
     42* draw() - called on a window system exposure event, for example when the graphics window is deiconified.
     43* resize() - called when the user resizes the graphics window, for example using the mouse.
     44
     45The first two functions are provided by the window toolkit and passed to the View constructor as arguments.  The last three functions are methods of View called by the GUI code.  The user interface mouse modes code uses additional member of the View class, namely the Camera (v.camera), the window size (v.window_size), the pixel size in Angstroms (v.pixel_size()), and the session (v.session) for accessing the list of opened models.
     46
    3547== WebGL ==
    3648