Gamp v0.0.8
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
Example Class Reference
Inheritance diagram for Example:
Collaboration diagram for Example:

Public Member Functions

 Example ()
 
 Example ()
 
 Example ()
 
 Example ()
 
 Example ()
 
 Example ()
 
 Example ()
 
 Example ()
 
void display (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable to initiate rendering by the client.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
const PMVMat4fpmv () const noexcept
 
PMVMat4fpmv () noexcept
 
void reshape (const WindowSRef &win, const jau::math::Recti &viewport, const jau::fraction_timespec &when) override
 Called by the drawable during the first repaint after the component has been resized.
 
std::string toStringImpl () const noexcept override
 
void updateSolSpatial (GL &gl)
 
const Rectiviewport () const noexcept
 
Rectiviewport () noexcept
 
- Public Member Functions inherited from GearsES2
 GearsES2 ()
 
bool dispatchForShape (GearsObjectES2 &shape, const PointerShapeAction &action, const PointerEvent &e, const WindowSRef &win)
 Dispatch PointerShapeAction to given shape w/ matrix traversal.
 
void display (const WindowSRef &win, const jau::fraction_timespec &) override
 Called by the drawable to initiate rendering by the client.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
constexpr bool doRotate () const noexcept
 
GearsObjectES2findPick (const PointerShapeAction &action, const PointerEvent &e, const WindowSRef &win)
 Fast loop through all shapes using PointerShapeAction w/o matrix traversal using view-coordinates.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
constexpr Vec3fpan () noexcept
 
const PMVMat4fpmvMatrix () const noexcept
 
PMVMat4fpmvMatrix () noexcept
 
void reshape (const WindowSRef &win, const jau::math::Recti &viewport, const jau::fraction_timespec &when) override
 Called by the drawable during the first repaint after the component has been resized.
 
void reshapeImpl (const WindowSRef &win, const jau::math::Recti &viewport, float imageWidth, float imageHeight, const jau::fraction_timespec &when)
 
constexpr const jau::math::Vec3frotEuler () const noexcept
 
constexpr jau::math::Vec3frotEuler () noexcept
 
constexpr void setClearBuffers (bool v) noexcept
 
void setClearColor (const jau::math::Vec4f &clearColor) noexcept
 
constexpr void setDoRotate (bool rotate) noexcept
 
constexpr void setFlipVerticalInGLOrientation (bool v) noexcept
 
void setGearsColors (const jau::math::Vec4f &gear1Color, const jau::math::Vec4f &gear2Color, const jau::math::Vec4f &gear3Color) noexcept
 
void setZ (float zNear, float zFar, float zViewDist)
 
std::string toStringImpl () const noexcept override
 
constexpr const jau::math::Rectiviewport () const noexcept
 
- Public Member Functions inherited from gamp::wt::RenderListener
constexpr RenderListener (Private) noexcept
 Private ctor for shared_ptr<RenderListener> instance method w/o public ctor.
 
virtual ~RenderListener () noexcept=default
 
RenderActions pendingActions () const noexcept
 
RenderActionspendingActions () noexcept
 
void setPendingActions (RenderActions v) noexcept
 
std::string toString () const noexcept
 
- Public Member Functions inherited from GraphShapes01
 GraphShapes01 ()
 
bool animating () const noexcept
 
bool & animating () noexcept
 
void display (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable to initiate rendering by the client.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
void reshape (const WindowSRef &win, const jau::math::Recti &viewport, const jau::fraction_timespec &when) override
 Called by the drawable during the first repaint after the component has been resized.
 
void setOneFrame () noexcept
 
std::string toStringImpl () const noexcept override
 
const Rectiviewport () const noexcept
 
Rectiviewport () noexcept
 
- Public Member Functions inherited from GraphShapes02
 GraphShapes02 ()
 
bool animating () const noexcept
 
bool & animating () noexcept
 
void display (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable to initiate rendering by the client.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
void reshape (const WindowSRef &win, const jau::math::Recti &viewport, const jau::fraction_timespec &when) override
 Called by the drawable during the first repaint after the component has been resized.
 
void setOneFrame () noexcept
 
std::vector< ShapeRef > & shapes () noexcept
 
std::string toStringImpl () const noexcept override
 
const Rectiviewport () const noexcept
 
Rectiviewport () noexcept
 
- Public Member Functions inherited from Primitives01
 Primitives01 ()
 
bool animating () const noexcept
 
bool & animating () noexcept
 
void display (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable to initiate rendering by the client.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
const PMVMat4fpmv () const noexcept
 
PMVMat4fpmv () noexcept
 
void reshape (const WindowSRef &win, const jau::math::Recti &viewport, const jau::fraction_timespec &when) override
 Called by the drawable during the first repaint after the component has been resized.
 
std::string toStringImpl () const noexcept override
 
const Rectiviewport () const noexcept
 
Rectiviewport () noexcept
 
- Public Member Functions inherited from Primitives02
 Primitives02 ()
 
bool animating () const noexcept
 
bool & animating () noexcept
 
void display (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable to initiate rendering by the client.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
const PMVMat4fpmv () const noexcept
 
PMVMat4fpmv () noexcept
 
void reshape (const WindowSRef &win, const jau::math::Recti &viewport, const jau::fraction_timespec &when) override
 Called by the drawable during the first repaint after the component has been resized.
 
void setOneFrame () noexcept
 
std::string toStringImpl () const noexcept override
 
const Rectiviewport () const noexcept
 
Rectiviewport () noexcept
 
- Public Member Functions inherited from Game
 Game ()
 
bool animating () const noexcept
 
bool & animating () noexcept
 
void display (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable to initiate rendering by the client.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
void reshape (const WindowSRef &win, const jau::math::Recti &viewport, const jau::fraction_timespec &when) override
 Called by the drawable during the first repaint after the component has been resized.
 
std::vector< ShapeRef > & shapes () noexcept
 
ShipRefship1 () noexcept
 
std::string toStringImpl () const noexcept override
 
const Rectiviewport () const noexcept
 
Rectiviewport () noexcept
 
- Public Member Functions inherited from RedSquareES2
 RedSquareES2 ()
 
 RedSquareES2 ()
 
bool animating () const noexcept
 
bool & animating () noexcept
 
void display (const WindowSRef &, const jau::fraction_timespec &when) override
 Called by the drawable to initiate rendering by the client.
 
void display (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable to initiate rendering by the client.
 
void dispose (const WindowSRef &, const jau::fraction_timespec &) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
void dispose (const WindowSRef &win, const jau::fraction_timespec &when) override
 Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.
 
bool init (const WindowSRef &, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
bool init (const WindowSRef &win, const jau::fraction_timespec &when) override
 Called by the drawable immediately after the render context is initialized.
 
const PMVMat4fpmv () const noexcept
 
const PMVMat4fpmv () const noexcept
 
PMVMat4fpmv () noexcept
 
PMVMat4fpmv () noexcept
 
void reshape (const WindowSRef &, const jau::math::Recti &viewport, const jau::fraction_timespec &) override
 Called by the drawable during the first repaint after the component has been resized.
 
void reshape (const WindowSRef &win, const jau::math::Recti &viewport, const jau::fraction_timespec &when) override
 Called by the drawable during the first repaint after the component has been resized.
 
std::string toStringImpl () const noexcept override
 
const Rectiviewport () const noexcept
 
const Rectiviewport () const noexcept
 
Rectiviewport () noexcept
 
Rectiviewport () noexcept
 

Public Attributes

bool m_once = true
 

Additional Inherited Members

- Static Public Member Functions inherited from GearsES2
static constexpr float getTeethRotation (int name, float adeg) noexcept
 

Detailed Description

Constructor & Destructor Documentation

◆ Example() [1/8]

Example::Example ( )
inline

◆ Example() [2/8]

Example::Example ( )
inline

Definition at line 878 of file GraphShapes01.cpp.

◆ Example() [3/8]

Example::Example ( )
inline

Definition at line 785 of file GraphShapes02.cpp.

◆ Example() [4/8]

Example::Example ( )
inline

Definition at line 330 of file Primitives01.cpp.

◆ Example() [5/8]

Example::Example ( )
inline

Definition at line 474 of file Primitives02.cpp.

◆ Example() [6/8]

Example::Example ( )
inline

Definition at line 811 of file PrimitivesCobraMK3.cpp.

◆ Example() [7/8]

Example::Example ( )
inline

Definition at line 65 of file RedSquareES2.cpp.

◆ Example() [8/8]

Example::Example ( )
inline

Definition at line 88 of file SolInSpace.cpp.

Member Function Documentation

◆ init() [1/8]

bool Example::init ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Called by the drawable immediately after the render context is initialized.

Can be used to perform one-time renderer initialization per context, such as setup of lights and display lists.

Note that this method may be called more than once if the underlying render context for the drawable is destroyed and recreated.

Returns
true if initialization is completed, false if not initialized yet and init shall be called again

Implements gamp::wt::RenderListener.

Definition at line 217 of file GearsES2.cpp.

◆ dispose() [1/8]

void Example::dispose ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.

Called by the drawable before the render context is destroyed by an external event.

Note that this event does not imply the end of life of the application.

Implements gamp::wt::RenderListener.

Examples
GearsES2.cpp, GraphShapes01.cpp, Primitives02.cpp, PrimitivesCobraMK3.cpp, RedSquareES2.cpp, and SolInSpace.cpp.

Definition at line 225 of file GearsES2.cpp.

◆ init() [2/8]

bool Example::init ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Called by the drawable immediately after the render context is initialized.

Can be used to perform one-time renderer initialization per context, such as setup of lights and display lists.

Note that this method may be called more than once if the underlying render context for the drawable is destroyed and recreated.

Returns
true if initialization is completed, false if not initialized yet and init shall be called again

Implements gamp::wt::RenderListener.

Definition at line 882 of file GraphShapes01.cpp.

◆ dispose() [2/8]

void Example::dispose ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.

Called by the drawable before the render context is destroyed by an external event.

Note that this event does not imply the end of life of the application.

Implements gamp::wt::RenderListener.

Definition at line 889 of file GraphShapes01.cpp.

◆ init() [3/8]

bool Example::init ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Called by the drawable immediately after the render context is initialized.

Can be used to perform one-time renderer initialization per context, such as setup of lights and display lists.

Note that this method may be called more than once if the underlying render context for the drawable is destroyed and recreated.

Returns
true if initialization is completed, false if not initialized yet and init shall be called again

Implements gamp::wt::RenderListener.

Definition at line 789 of file GraphShapes02.cpp.

◆ dispose() [3/8]

void Example::dispose ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.

Called by the drawable before the render context is destroyed by an external event.

Note that this event does not imply the end of life of the application.

Implements gamp::wt::RenderListener.

Definition at line 796 of file GraphShapes02.cpp.

◆ init() [4/8]

bool Example::init ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Called by the drawable immediately after the render context is initialized.

Can be used to perform one-time renderer initialization per context, such as setup of lights and display lists.

Note that this method may be called more than once if the underlying render context for the drawable is destroyed and recreated.

Returns
true if initialization is completed, false if not initialized yet and init shall be called again

Implements gamp::wt::RenderListener.

Definition at line 334 of file Primitives01.cpp.

◆ dispose() [4/8]

void Example::dispose ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.

Called by the drawable before the render context is destroyed by an external event.

Note that this event does not imply the end of life of the application.

Implements gamp::wt::RenderListener.

Definition at line 341 of file Primitives01.cpp.

◆ init() [5/8]

bool Example::init ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Called by the drawable immediately after the render context is initialized.

Can be used to perform one-time renderer initialization per context, such as setup of lights and display lists.

Note that this method may be called more than once if the underlying render context for the drawable is destroyed and recreated.

Returns
true if initialization is completed, false if not initialized yet and init shall be called again

Implements gamp::wt::RenderListener.

Definition at line 478 of file Primitives02.cpp.

◆ dispose() [5/8]

void Example::dispose ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.

Called by the drawable before the render context is destroyed by an external event.

Note that this event does not imply the end of life of the application.

Implements gamp::wt::RenderListener.

Definition at line 485 of file Primitives02.cpp.

◆ init() [6/8]

bool Example::init ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Called by the drawable immediately after the render context is initialized.

Can be used to perform one-time renderer initialization per context, such as setup of lights and display lists.

Note that this method may be called more than once if the underlying render context for the drawable is destroyed and recreated.

Returns
true if initialization is completed, false if not initialized yet and init shall be called again

Implements gamp::wt::RenderListener.

Definition at line 815 of file PrimitivesCobraMK3.cpp.

◆ dispose() [6/8]

void Example::dispose ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.

Called by the drawable before the render context is destroyed by an external event.

Note that this event does not imply the end of life of the application.

Implements gamp::wt::RenderListener.

Definition at line 822 of file PrimitivesCobraMK3.cpp.

◆ init() [7/8]

bool Example::init ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Called by the drawable immediately after the render context is initialized.

Can be used to perform one-time renderer initialization per context, such as setup of lights and display lists.

Note that this method may be called more than once if the underlying render context for the drawable is destroyed and recreated.

Returns
true if initialization is completed, false if not initialized yet and init shall be called again

Implements gamp::wt::RenderListener.

Definition at line 69 of file RedSquareES2.cpp.

◆ dispose() [7/8]

void Example::dispose ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.

Called by the drawable before the render context is destroyed by an external event.

Note that this event does not imply the end of life of the application.

Implements gamp::wt::RenderListener.

Definition at line 76 of file RedSquareES2.cpp.

◆ viewport() [1/2]

Recti & Example::viewport ( )
inlinenoexcept
Examples
SolInSpace.cpp.

Definition at line 112 of file SolInSpace.cpp.

Here is the caller graph for this function:

◆ viewport() [2/2]

const Recti & Example::viewport ( ) const
inlinenoexcept

Definition at line 113 of file SolInSpace.cpp.

◆ pmv() [1/2]

PMVMat4f & Example::pmv ( )
inlinenoexcept
Examples
SolInSpace.cpp.

Definition at line 115 of file SolInSpace.cpp.

Here is the caller graph for this function:

◆ pmv() [2/2]

const PMVMat4f & Example::pmv ( ) const
inlinenoexcept

Definition at line 116 of file SolInSpace.cpp.

◆ init() [8/8]

bool Example::init ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Called by the drawable immediately after the render context is initialized.

Can be used to perform one-time renderer initialization per context, such as setup of lights and display lists.

Note that this method may be called more than once if the underlying render context for the drawable is destroyed and recreated.

Returns
true if initialization is completed, false if not initialized yet and init shall be called again

Implements gamp::wt::RenderListener.

Definition at line 118 of file SolInSpace.cpp.

◆ updateSolSpatial()

void Example::updateSolSpatial ( GL & gl)
inline
Examples
SolInSpace.cpp.

Definition at line 183 of file SolInSpace.cpp.

Here is the caller graph for this function:

◆ dispose() [8/8]

void Example::dispose ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Notifies the listener to perform the release of all renderer resources per context, such as memory buffers and shader programs.

Called by the drawable before the render context is destroyed by an external event.

Note that this event does not imply the end of life of the application.

Implements gamp::wt::RenderListener.

Definition at line 200 of file SolInSpace.cpp.

◆ reshape()

void Example::reshape ( const WindowSRef & ,
const jau::math::Recti & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Called by the drawable during the first repaint after the component has been resized.

The client can update it's viewport associated data and view volume of the window/surface appropriately.

For efficiency the renderer viewport has already been updated, e.g. via glViewport(x, y, width, height) when this method is called.

Parameters
drawablethe triggering GLAutoDrawable
viewportthe viewport in pixel units

Implements gamp::wt::RenderListener.

Definition at line 207 of file SolInSpace.cpp.

◆ display()

void Example::display ( const WindowSRef & ,
const jau::fraction_timespec &  )
inlineoverridevirtual

Called by the drawable to initiate rendering by the client.

After all listener have been notified of a display event, the drawable will swap its buffers.

Implements gamp::wt::RenderListener.

Examples
SolInSpace.cpp.

Definition at line 230 of file SolInSpace.cpp.

◆ toStringImpl()

std::string Example::toStringImpl ( ) const
inlineoverridevirtualnoexcept

Reimplemented from gamp::wt::RenderListener.

Examples
SolInSpace.cpp.

Definition at line 273 of file SolInSpace.cpp.

Member Data Documentation

◆ m_once

bool Example::m_once = true
Examples
SolInSpace.cpp.

Definition at line 228 of file SolInSpace.cpp.


The documentation for this class was generated from the following files: