Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
IDL 3.36 KB | None | 0 0
  1. //==================================================================
  2. //
  3. // Project     : LibEngine
  4. // File        : Engine.idl
  5. // Created     : 05.04.2011 15:56
  6. // Description :
  7. //==================================================================
  8.  
  9. module engine
  10. {
  11.     ////////////////////////////////////////////////////////////////////////////////////////////////////
  12.     /// <summary>   Base engine exception class. </summary>
  13.     ///
  14.     /// <value> The en exception. </value>
  15.     ////////////////////////////////////////////////////////////////////////////////////////////////////
  16.  
  17.     exception EngineException {
  18.     };
  19.    
  20.     interface IContext;
  21.     interface IWorld;
  22.     interface IUIEngine;
  23.     interface IInteractiveController;  
  24.  
  25.     ////////////////////////////////////////////////////////////////////////////////////////////////////
  26.     /// <summary>   Interface for Engine. </summary>
  27.     ///
  28.     /// <remarks>   Khronos 666, 10.04.2011. </remarks>
  29.     ////////////////////////////////////////////////////////////////////////////////////////////////////
  30.  
  31.     interface IEngine {
  32.         void    Initialize() raises( EngineException ); ///> Initialize engine, create all subsystems
  33.  
  34.         void    LoadGameModule( in string name ) raises( EngineException ); ///> Load high level logic
  35.         void    UnloadGameModule() raises( EngineException );
  36.        
  37.         void    Start() raises( EngineException ); ///> Start engine update threads
  38.         void    Pause() raises( EngineException );
  39.         void    Stop() raises( EngineException );      
  40.        
  41.         void    GetWorld( out IWorld world ); ///> Get world
  42.         void    GetUIEngine( out IUIEngine ui_engine );
  43.         void    GetInteractiveController( out IInteractiveController interactive_controller );
  44.  
  45.         typedef long long native_handle_t;
  46.         void    CreateContext( in native_handle_t native_window_handle, out IContext engine_context ) raises( EngineException ); ///> Create display(window) specific context
  47.     };
  48.    
  49.     ////////////////////////////////////////////////////////////////////////////////////////////////////
  50.     /// <summary>   Interface for World. </summary>
  51.     ///
  52.     /// <remarks>   Khronos 666, 10.04.2011. </remarks>
  53.     ////////////////////////////////////////////////////////////////////////////////////////////////////
  54.  
  55.     interface IWorld {
  56.         void    LockWorld(); ///>Lock world for multithreaded operations
  57.         void    UnlockWorld();
  58.         boolean TryLockWorld();
  59.     };
  60.  
  61.     ////////////////////////////////////////////////////////////////////////////////////////////////////
  62.     /// <summary>   Interface for Context. </summary>
  63.     ///
  64.     /// <remarks>   Khronos 666, 10.04.2011. </remarks>
  65.     ////////////////////////////////////////////////////////////////////////////////////////////////////
  66.  
  67.     interface IContext {
  68.         void    StartRendering() raises( EngineException ); ///> Start parallel rendering
  69.         void    StopRendering() raises( EngineException );
  70.         void    RenderFrame() raises( EngineException ); ///> Render single frame
  71.  
  72.         void    Update( in float dt ) raises( EngineException ); ///> Perform update(usually made by internal engine impl)
  73.         void    ResizeView( in unsigned long width, in unsigned long height );
  74.     };
  75.  
  76.     ////////////////////////////////////////////////////////////////////////////////////////////////////
  77.     /// <summary>   Interface for Game implemantation. </summary>
  78.     ///
  79.     /// <remarks>   Khronos 666, 10.04.2011. </remarks>
  80.     ////////////////////////////////////////////////////////////////////////////////////////////////////
  81.  
  82.     interface IGame {
  83.     };
  84. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement