dynport               package:rdyncall               R Documentation

_D_y_n_a_m_i_c _p_o_r_t_s _t_o _s_h_a_r_e_d _l_i_b_r_a_r_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Dynports aims to provide cross-platform portable bindings from
     dynamic environments to statically compiled binary components. The
     development is in early stage.

_U_s_a_g_e:

     dynport(name, filename=NULL, repo=system.file("dynports", package="rdynall") )
     loadDynportNamespace(portname)

_A_r_g_u_m_e_n_t_s:

    name: A symbolic literal or character string specifying a
          _dynport_.

portname: A character string specifying a _dynport_.

_D_e_t_a_i_l_s:

     The front-end function 'dynport' dynamically links shared
     libraries and binds pre-compiled functions to the R run-time
     process and binds as an environment with thin R wrapper functions
     and constants.  Here's a list of currently available packages:

       *DynPort*  *Description*                *Platforms*
       'gl'       OpenGL 1.1 API               multi-platform
       'glu'      OpenGL Utility Library       multi-platform
       'sdl'      Simple Direct Layer library  multi-platform
       'rmalloc'  R Memory Allocation          R platforms

_T_h_e _D_y_n_p_o_r_t_s _P_r_o_j_e_c_t:

     _dynport_ is a new project to design a repository network of
     meta-informations for  multi-platform binary shared library
     components. It is currently in incubation phase.  Binding a
     library for scripting languages can be tedious. The dynamic
     binding concept of  the dyncall library enables us to bind shared
     library code at run-time without any additional C glue code per
     library. When adding dyncall (and dynload) to a scripting language
     binding, the dynamic calling of functions is made available to the
     scripting language.

     Under the rdyncall package directory installed in
     R_HOME/library/rdyncall is a sub-directory named 'dynports' which
     contain dynport files for several shared libraries.

_E_x_a_m_p_l_e_s:

     # Appetizer: SDL and OpenGL

     dynport(sdl)
     dynport(gl)

     SDL_Init(SDL_INIT_VIDEO)
     SDL_SetVideoMode(320,256,32,SDL_OPENGL+SDL_DOUBLEBUF)
     glClearColor(0,0,1,0) # blue
     glClear(GL_COLOR_BUFFER_BIT)
     SDL_GL_SwapBuffers()

