![]() |
omegalib
13.1
|
#include <DrawInterface.h>
Public Types | |
| enum | FlipFlags { FlipX = 1 << 1, FlipY = 1 << 2 } |
| enum | ShaderType { VertexShader, FragmentShader } |
| enum | FTGLFontType { FTGLBitmap, FTGLBuffer, FTGLExtrd, FTGLOutline, FTGLPixmap, FTGLPolygon, FTGLTexture } |
Public Member Functions | |
| DrawInterface () | |
| void | setScissor (const Rect &rect) |
| Rect | getScissor () |
| GLuint | makeShaderFromSource (const char *source, ShaderType Type) |
| Shaders. More... | |
| GLuint | createProgram (GLuint vertextShader, GLuint fragmentShader) |
| GLuint | getOrCreateProgram (const String &name, const String &vertexShaderFile, const String &fragmentShaderFile) |
| Returns a gpu program by name. More... | |
| GLuint | getOrCreateProgramFromSource (const String &name, const String &vertexShaderSource, const String &fragmentShaderSource) |
| Returns a gpu program by name. More... | |
| GLuint | findUniform (GLuint program, const String &name) |
| Uniforms. More... | |
| void | uniformFloat (GLuint uniform, float value) |
| void | beginDraw3D (const DrawContext &context) |
| Drawing control. More... | |
| void | beginDraw2D (const DrawContext &context) |
| void | endDraw () |
| bool | isDrawing () |
| void | pushTransform (const AffineTransform3 &transform) |
| void | popTransform () |
| Font * | createFont (omega::String fontName, omega::String filename, int size, FTGLFontType type=FTGLTexture) |
| Font management. More... | |
| Font * | getFont (omega::String fontName, FTGLFontType type=FTGLTexture) |
| Font * | getDefaultFont () |
| void | setDefaultFont (Font *value) |
| void | setColor (const Color &col) |
| New drawing API. More... | |
| void | fillTexture (TextureSource *texture) |
| void | textureFlip (uint flipflags) |
| void | textureRegion (float su, float sv, float eu, float ev) |
| void | rect (float x, float y, float width, float height) |
| void | program (GLuint id) |
| Loads shader program with the specified id. More... | |
| void | drawRectGradient (Vector2f pos, Vector2f size, Orientation orientation, Color startColor, Color endColor, float pc=0.5f) |
| Old drawing API. More... | |
| void | drawRect (Vector2f pos, Vector2f size, Color color) |
| void | drawRectOutline (Vector2f pos, Vector2f size, Color color) |
| void | drawText (const String &text, Font *font, const Vector2f &position, unsigned int align, Color color) |
| void | drawWText (const std::wstring &text, Font *font, const Vector2f &position, unsigned int align, Color color) |
| void | drawRectTexture (Texture *texture, const Vector2f &position, const Vector2f size, uint flipFlags=0, const Vector2f &minUV=Vector2f::Zero(), const Vector2f &maxUV=Vector2f::Ones()) |
| void | drawCircleOutline (Vector2f position, float radius, const Color &color, int segments) |
| void | drawCircle (Vector2f position, float radius, const Color &color, int segments) |
| void | drawWireSphere (const Color &color, int segments, int slices) |
Public Member Functions inherited from omicron::ReferenceType | |
| ReferenceType () | |
| virtual | ~ReferenceType () |
| void | ref () |
| void | unref () |
| long | refCount () |
Additional Inherited Members | |
Static Public Member Functions inherited from omicron::ReferenceType | |
| static void | printObjCounts () |
Static Protected Attributes inherited from omicron::ReferenceType | |
| static List< ReferenceType * > | mysObjList |
Inheritance diagram for omega::DrawInterface:| omega::DrawInterface::DrawInterface | ( | ) |
| void omega::DrawInterface::beginDraw2D | ( | const DrawContext & | context | ) |
| void omega::DrawInterface::beginDraw3D | ( | const DrawContext & | context | ) |
Drawing control.
| Font* omega::DrawInterface::createFont | ( | omega::String | fontName, |
| omega::String | filename, | ||
| int | size, | ||
| FTGLFontType | type = FTGLTexture |
||
| ) |
Font management.
| void omega::DrawInterface::drawCircle | ( | Vector2f | position, |
| float | radius, | ||
| const Color & | color, | ||
| int | segments | ||
| ) |
| void omega::DrawInterface::drawCircleOutline | ( | Vector2f | position, |
| float | radius, | ||
| const Color & | color, | ||
| int | segments | ||
| ) |
| void omega::DrawInterface::drawRectGradient | ( | Vector2f | pos, |
| Vector2f | size, | ||
| Orientation | orientation, | ||
| Color | startColor, | ||
| Color | endColor, | ||
| float | pc = 0.5f |
||
| ) |
Old drawing API.
| void omega::DrawInterface::drawRectTexture | ( | Texture * | texture, |
| const Vector2f & | position, | ||
| const Vector2f | size, | ||
| uint | flipFlags = 0, |
||
| const Vector2f & | minUV = Vector2f::Zero(), |
||
| const Vector2f & | maxUV = Vector2f::Ones() |
||
| ) |
| void omega::DrawInterface::drawText | ( | const String & | text, |
| Font * | font, | ||
| const Vector2f & | position, | ||
| unsigned int | align, | ||
| Color | color | ||
| ) |
| void omega::DrawInterface::drawWireSphere | ( | const Color & | color, |
| int | segments, | ||
| int | slices | ||
| ) |
| void omega::DrawInterface::drawWText | ( | const std::wstring & | text, |
| Font * | font, | ||
| const Vector2f & | position, | ||
| unsigned int | align, | ||
| Color | color | ||
| ) |
| void omega::DrawInterface::endDraw | ( | ) |
| void omega::DrawInterface::fillTexture | ( | TextureSource * | texture | ) |
|
inline |
| Font* omega::DrawInterface::getFont | ( | omega::String | fontName, |
| FTGLFontType | type = FTGLTexture |
||
| ) |
| GLuint omega::DrawInterface::getOrCreateProgram | ( | const String & | name, |
| const String & | vertexShaderFile, | ||
| const String & | fragmentShaderFile | ||
| ) |
Returns a gpu program by name.
If the program does not exists, it attempts to create it using the passed vertex and fragment shader file names as sources.
| GLuint omega::DrawInterface::getOrCreateProgramFromSource | ( | const String & | name, |
| const String & | vertexShaderSource, | ||
| const String & | fragmentShaderSource | ||
| ) |
Returns a gpu program by name.
If the program does not exists, it attempts to create it using the passed vertex and fragment shader as sources.
| Rect omega::DrawInterface::getScissor | ( | ) |
|
inline |
| GLuint omega::DrawInterface::makeShaderFromSource | ( | const char * | source, |
| ShaderType | Type | ||
| ) |
Shaders.
| void omega::DrawInterface::popTransform | ( | ) |
| void omega::DrawInterface::program | ( | GLuint | id | ) |
Loads shader program with the specified id.
| void omega::DrawInterface::pushTransform | ( | const AffineTransform3 & | transform | ) |
| void omega::DrawInterface::rect | ( | float | x, |
| float | y, | ||
| float | width, | ||
| float | height | ||
| ) |
|
inline |
New drawing API.
|
inline |
| void omega::DrawInterface::setScissor | ( | const Rect & | rect | ) |
| void omega::DrawInterface::textureFlip | ( | uint | flipflags | ) |
| void omega::DrawInterface::textureRegion | ( | float | su, |
| float | sv, | ||
| float | eu, | ||
| float | ev | ||
| ) |
| void omega::DrawInterface::uniformFloat | ( | GLuint | uniform, |
| float | value | ||
| ) |