Gorgon Game Engine
TextureTarget Class Referenceabstract

This interface defines a class that can be used as a common target for texture based drawing. More...

Inheritance diagram for TextureTarget:
[legend]

Public Types

enum  DrawMode { Normal, FrameBuffer, ToMask, UseMask }
 

Public Member Functions

virtual void Clear ()=0
 Clears drawing buffer, in layer architecture this request only affects the layer itself, not its children. More...
 
virtual void Draw (const Geometry::Pointf &location, const Geometry::Sizef &size, RGBAf color=RGBAf(1.f))
 Draws a textureless solid colored rectangle on the screen. More...
 
virtual void Draw (const Geometry::Pointf &location, float w, float h, RGBAf color=RGBAf(1.f))
 Draws a textureless solid colored rectangle on the screen. More...
 
virtual void Draw (const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, RGBAf color=RGBAf(1.f))=0
 Draws a textureless solid colored rectangle on the screen. More...
 
virtual void Draw (const Geometry::Rectanglef &location, RGBAf color=RGBAf(1.f))
 Draws a textureless solid colored rectangle on the screen. More...
 
virtual void Draw (const TextureSource &image, const Geometry::Pointf &location, RGBAf color)
 Draws a simple image to the screen to the given position. More...
 
virtual void Draw (const TextureSource &image, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, const Geometry::Pointf &tex1, const Geometry::Pointf &tex2, const Geometry::Pointf &tex3, const Geometry::Pointf &tex4, RGBAf color=RGBAf(1.f))=0
 Draws a simple texture to the screen. More...
 
virtual void Draw (const TextureSource &image, const Geometry::Pointf &p1, const Geometry::Pointf &p2, const Geometry::Pointf &p3, const Geometry::Pointf &p4, RGBAf color=RGBAf(1.f))=0
 Draws a simple texture to the screen. More...
 
virtual void Draw (const TextureSource &image, const Geometry::Rectanglef &location, RGBAf color=RGBAf(1.f))
 Draws a simple image to the screen to the given position with the given size. More...
 
virtual void Draw (const TextureSource &image, Tiling tiling, const Geometry::Rectanglef &location, RGBAf color=RGBAf(1.f))=0
 Draws a simple image to the screen using the given tiling method, coordinates and size. More...
 
virtual void Draw (float x, float y, const Geometry::Sizef &size, RGBAf color=RGBAf(1.f))
 Draws a textureless solid colored rectangle on the screen. More...
 
virtual void Draw (float x, float y, float w, float h, RGBAf color=RGBAf(1.f))
 Draws a textureless solid colored rectangle on the screen. More...
 
virtual void Draw (int x, int y, int w, int h, RGBAf color=RGBAf(1.f))
 Draws a textureless solid colored rectangle on the screen. More...
 
virtual void Draw (RGBAf color=RGBAf(1.f))
 Draws a textureless solid colored rectangle to cover the texture target. More...
 
virtual DrawMode GetDrawMode () const =0
 Returns current draw mode. More...
 
virtual Geometry::Size GetTargetSize () const =0
 Get size of the target. More...
 
virtual void NewMask ()=0
 Should queue the start of a new mask. Only one mask buffer exists and it will be cleared and reused. More...
 
virtual void SetDrawMode (DrawMode mode)=0
 Sets current draw mode. More...
 

Detailed Description

This interface defines a class that can be used as a common target for texture based drawing.

Member Enumeration Documentation

◆ DrawMode

enum DrawMode
Enumerator
Normal 
FrameBuffer 
ToMask 
UseMask 

Member Function Documentation

◆ Clear()

virtual void Clear ( )
pure virtual

Clears drawing buffer, in layer architecture this request only affects the layer itself, not its children.

Implemented in Layer.

◆ Draw() [1/13]

virtual void Draw ( const Geometry::Pointf location,
const Geometry::Sizef size,
RGBAf  color = RGBAf(1.f) 
)
virtual

Draws a textureless solid colored rectangle on the screen.

◆ Draw() [2/13]

virtual void Draw ( const Geometry::Pointf location,
float  w,
float  h,
RGBAf  color = RGBAf(1.f) 
)
virtual

Draws a textureless solid colored rectangle on the screen.

◆ Draw() [3/13]

virtual void Draw ( const Geometry::Pointf p1,
const Geometry::Pointf p2,
const Geometry::Pointf p3,
const Geometry::Pointf p4,
RGBAf  color = RGBAf(1.f) 
)
pure virtual

Draws a textureless solid colored rectangle on the screen.

Implemented in Layer.

◆ Draw() [4/13]

virtual void Draw ( const Geometry::Rectanglef location,
RGBAf  color = RGBAf(1.f) 
)
virtual

Draws a textureless solid colored rectangle on the screen.

◆ Draw() [5/13]

virtual void Draw ( const TextureSource image,
const Geometry::Pointf location,
RGBAf  color 
)
virtual

Draws a simple image to the screen to the given position.

◆ Draw() [6/13]

virtual void Draw ( const TextureSource image,
const Geometry::Pointf p1,
const Geometry::Pointf p2,
const Geometry::Pointf p3,
const Geometry::Pointf p4,
const Geometry::Pointf tex1,
const Geometry::Pointf tex2,
const Geometry::Pointf tex3,
const Geometry::Pointf tex4,
RGBAf  color = RGBAf(1.f) 
)
pure virtual

Draws a simple texture to the screen.

This variant allows every corner on the target and on the texture be specified. The texture target should be cleared before the texture drawn on it is destroyed

Implemented in Layer.

◆ Draw() [7/13]

virtual void Draw ( const TextureSource image,
const Geometry::Pointf p1,
const Geometry::Pointf p2,
const Geometry::Pointf p3,
const Geometry::Pointf p4,
RGBAf  color = RGBAf(1.f) 
)
pure virtual

Draws a simple texture to the screen.

This variant allows every corner on the target to be specified. The texture target should be cleared before the texture drawn on it is destroyed

Implemented in Layer.

◆ Draw() [8/13]

virtual void Draw ( const TextureSource image,
const Geometry::Rectanglef location,
RGBAf  color = RGBAf(1.f) 
)
virtual

Draws a simple image to the screen to the given position with the given size.

◆ Draw() [9/13]

virtual void Draw ( const TextureSource image,
Tiling  tiling,
const Geometry::Rectanglef location,
RGBAf  color = RGBAf(1.f) 
)
pure virtual

Draws a simple image to the screen using the given tiling method, coordinates and size.

Implemented in Layer.

◆ Draw() [10/13]

virtual void Draw ( float  x,
float  y,
const Geometry::Sizef size,
RGBAf  color = RGBAf(1.f) 
)
virtual

Draws a textureless solid colored rectangle on the screen.

◆ Draw() [11/13]

virtual void Draw ( float  x,
float  y,
float  w,
float  h,
RGBAf  color = RGBAf(1.f) 
)
virtual

Draws a textureless solid colored rectangle on the screen.

◆ Draw() [12/13]

virtual void Draw ( int  x,
int  y,
int  w,
int  h,
RGBAf  color = RGBAf(1.f) 
)
virtual

Draws a textureless solid colored rectangle on the screen.

◆ Draw() [13/13]

virtual void Draw ( RGBAf  color = RGBAf(1.f))
virtual

Draws a textureless solid colored rectangle to cover the texture target.

◆ GetDrawMode()

virtual DrawMode GetDrawMode ( ) const
pure virtual

Returns current draw mode.

Implemented in Layer.

◆ GetTargetSize()

virtual Geometry::Size GetTargetSize ( ) const
pure virtual

Get size of the target.

Implemented in Layer.

◆ NewMask()

virtual void NewMask ( )
pure virtual

Should queue the start of a new mask. Only one mask buffer exists and it will be cleared and reused.

Implemented in Layer.

◆ SetDrawMode()

virtual void SetDrawMode ( DrawMode  mode)
pure virtual

Sets current draw mode.

Implemented in Layer.


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