Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
TissueForge::rendering::Application Struct Referenceabstract
Inheritance diagram for TissueForge::rendering::Application:

Public Member Functions

virtual HRESULT pollEvents ()=0
 
virtual HRESULT waitEvents ()=0
 
virtual HRESULT waitEventsTimeout (double timeout)=0
 
virtual HRESULT postEmptyEvent ()=0
 
virtual HRESULT mainLoopIteration (double timeout)=0
 
virtual HRESULT setSwapInterval (int si)=0
 
virtual struct GlfwWindowgetWindow ()=0
 
virtual int windowAttribute (WindowAttributes attr)=0
 
virtual HRESULT setWindowAttribute (WindowAttributes attr, int val)=0
 
virtual HRESULT createContext (const Simulator::Config &conf)=0
 
virtual UniverseRenderergetRenderer ()=0
 
virtual HRESULT redraw ()=0
 
virtual HRESULT run (double et)
 
virtual HRESULT close ()=0
 
virtual HRESULT destroy ()=0
 
virtual HRESULT show ()=0
 
virtual HRESULT simulationStep ()
 
virtual HRESULT messageLoop (double et)=0
 
virtual Magnum::GL::AbstractFramebuffer & framebuffer ()=0
 
virtual bool contextMakeCurrent ()=0
 
virtual bool contextHasCurrent ()=0
 
virtual bool contextRelease ()=0
 

Public Attributes

std::vector< GlfwWindow * > windows
 

Protected Attributes

bool _dynamicBoundary = 1
 
Magnum::Float _boundaryOffset = 0.0f
 
int currentStep = 0
 

Member Function Documentation

◆ pollEvents()

virtual HRESULT TissueForge::rendering::Application::pollEvents ( )
pure virtual

This function processes only those events that are already in the event queue and then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.

On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the window refresh callback to redraw the contents of your window when necessary during such operations.

Implemented in TissueForge::rendering::GlfwApplication, and TissueForge::rendering::WindowlessApplication.

◆ postEmptyEvent()

virtual HRESULT TissueForge::rendering::Application::postEmptyEvent ( )
pure virtual

This function posts an empty event from the current thread to the event queue, causing waitEvents or waitEventsTimeout to return.

Implemented in TissueForge::rendering::GlfwApplication, and TissueForge::rendering::WindowlessApplication.

◆ redraw()

virtual HRESULT TissueForge::rendering::Application::redraw ( )
pure virtual

post a re-draw event, to tell the renderer that it should re-draw

Implemented in TissueForge::rendering::GlfwApplication, and TissueForge::rendering::WindowlessApplication.

◆ waitEvents()

virtual HRESULT TissueForge::rendering::Application::waitEvents ( )
pure virtual

This function puts the calling thread to sleep until at least one event is available in the event queue. Once one or more events are available, it behaves exactly like glfwPollEvents, i.e. the events in the queue are processed and the function then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.

Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all callbacks.

On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the window refresh callback to redraw the contents of your window when necessary during such operations.

Implemented in TissueForge::rendering::GlfwApplication, and TissueForge::rendering::WindowlessApplication.

◆ waitEventsTimeout()

virtual HRESULT TissueForge::rendering::Application::waitEventsTimeout ( double timeout)
pure virtual

This function puts the calling thread to sleep until at least one event is available in the event queue, or until the specified timeout is reached. If one or more events are available, it behaves exactly like pollEvents, i.e. the events in the queue are processed and the function then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.

The timeout value must be a positive finite number. Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all callbacks.

On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the window refresh callback to redraw the contents of your window when necessary during such operations.

Implemented in TissueForge::rendering::GlfwApplication, and TissueForge::rendering::WindowlessApplication.

Member Data Documentation

◆ windows

std::vector<GlfwWindow*> TissueForge::rendering::Application::windows

list of windows.


The documentation for this struct was generated from the following file: