#include <gfxserver.h>

Public Types | |
| enum | CursorVisibility { CURSOR_HIDDEN, CURSOR_SYSTEM, CURSOR_CUSTOM } |
| The visible mouse cursor type. More... | |
| enum | MinMagFilter { FILTER_NONE, FILTER_NEAREST, FILTER_LINEAR } |
| Minification/Magnification filter. More... | |
| enum | BufferType { BUFFER_COLOR = (1 << 0), BUFFER_DEPTH = (1 << 1), BUFFER_STENCIL = (1 << 2), BUFFER_ALL = (BUFFER_COLOR | BUFFER_DEPTH | BUFFER_STENCIL) } |
| Buffer Types. More... | |
| enum | Extension { EXT_NONE = 0, EXT_NPOT_TEXTURES = (1 << 0) } |
| Graphics extensions. More... | |
| enum | PrimitiveType { PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN, PRIMITIVE_QUADS, PRIMITIVE_QUAD_STRIP, PRIMITIVE_POLYGON, PRIMITIVE_COUNT } |
| typedef void(* | SizeCallbackFun )(ushort_t, ushort_t, bool) |
| typedef void(* | RefreshCallbackFun )(void) |
| typedef bool(* | CloseCallbackFun )(void) |
Public Member Functions | |
| GfxServer (const char *id) | |
| virtual | ~GfxServer () |
| virtual Texture * | NewTexture (const string &file_name) |
| virtual Texture * | NewTexture (const string &file_name, const string &overlay_name, const vector3 &overlay_color) |
| virtual Texture * | NewTexture (ImageFile *image_file) |
| virtual Font * | NewFont (const string &file_name, const FontFile::CharSize &char_size) |
| Mesh * | NewMesh (const string &file_name) |
| Model * | NewModel (const string &file_name) |
| Model * | NewModel (const string &file_name, const vector3 &overlay_color) |
| Animation * | NewAnimation (const string &file_name) |
| ImageFile * | NewImageFile (const string &file_name, bool open=false, bool write=false) |
| FontFile * | NewFontFile (const string &file_name, bool open=false, bool write=false) |
| void | SetDisplayMode (const DisplayMode &mode) |
| Set the prefered display mode. | |
| const DisplayMode & | GetDisplayMode () const |
| virtual void | SetProjection (const Projection &projection) |
| virtual void | SetViewport (const Viewport &display_viewport) |
| virtual void | PushScreenCoordinates () |
| virtual void | PopScreenCoordinates () |
| virtual ushort_t | GetVideoModes (VideoMode *modes, int max_count, VideoMode::Bpp bpp=VideoMode::BPP_UNDEFINED) |
| byte_t | GetExtensions () |
| bool | IsExtensions (byte_t extensions) |
| void | SetMinMagFilter (MinMagFilter minmag_filter) |
| void | SetMipMapFilter (MinMagFilter mipmap_filter) |
| MinMagFilter | GetMinMagFilter () const |
| MinMagFilter | GetMipMapFilter () const |
| virtual void | SetWindowTitle (const string &window_title) |
| virtual void | SetWindowPosition (const DisplayMode::WidowPosition &position) |
| virtual const DisplayMode::WidowPosition & | GetWindowPosition () const |
| virtual void | SetWindowSize (const DisplayMode::WidowSize &size) |
| virtual const DisplayMode::WidowSize & | GetWindowSize () const |
| virtual void | SetWindowVerticalSync (bool vsync) |
| virtual void | MinimizeWindow () |
| virtual void | RestoreWindow () |
| virtual void | ToggleFullscreen () |
| virtual bool | IsWindowMinimized () |
| virtual bool | IsWindowActive () |
| virtual bool | IsWindowAccelerated () |
| void | SetWindowSizeCallback (SizeCallbackFun cbfun) |
| void | SetWindowRefreshCallback (RefreshCallbackFun cbfun) |
| void | SetWindowCloseCallback (CloseCallbackFun cbfun) |
| virtual bool | OpenDisplay () |
| virtual void | CloseDisplay () |
| virtual void | PresentScene () |
| virtual void | WriteInfo () |
| virtual void | RegisterCallbacks () |
| virtual bool | Trigger () |
| bool | IsDisplayOpened () |
| virtual void | SetCursorVisibility (CursorVisibility type) |
| CursorVisibility | GetCursorVisibility () const |
| bool | TestCursorVisibility (CursorVisibility type) const |
| byte_t | AddCursor (const string &model_file) |
| void | SetCursor (byte_t cursor_id) |
| virtual bool | SaveScreenshot (const string &file_name) |
| bool | SaveImage (const string &file_name, byte_t *data, ImageFile::Format format, ushort_t width, ushort_t height) |
| void | SetMesh (Mesh *mesh) |
| void | SetTexture (Texture *texture) |
| void | SetMapping (vector2 *mapping) |
| void | SetCoordsBuffer (vector2 *coords_buff) |
| void | SetColorsBuffer (vector4 *colors_buff) |
| void | SetFont (Font *font) |
| const Font * | GetFont () |
| virtual void | ResetMatrix () |
| virtual void | PushMatrix () |
| virtual void | PopMatrix () |
| virtual void | Translate (const vector2 &translation) |
| virtual void | Translate (const vector3 &translation) |
| virtual void | Rotate (float rotation) |
| virtual void | Rotate (const vector3 &rotation) |
| virtual void | SetColor (const vector3 &color) |
| virtual void | SetColor (const vector4 &color) |
| virtual void | SetColorMask (bool r, bool g, bool b, bool alpha=true) |
| virtual void | SetClearValues (float red, float green, float blue, float alpha=0.0f, float depth=0.0f, int stencil=0) |
| virtual void | SetBlending (bool blending) |
| virtual void | SetDepthTest (bool depth_test) |
| void | SetColorFilter (float r, float g, float b, float alpha=1.0f) |
| virtual void | ClearBuffers (byte_t buffers) |
| virtual void | RenderShape () |
| virtual void | RenderPrimitive (PrimitiveType primitive, const vector2 *vertices, uint_t count) |
| virtual void | Print (const vector2 &position, const string &text) |
| void | Print (const string &text) |
| virtual void | ReadPixels (ushort_t x, ushort_t y, ushort_t width, ushort_t height, byte_t *pixels) |
Static Public Member Functions | |
| static bool | FilterToString (MinMagFilter filter, string &name) |
| static bool | StringToFilter (const string &name, MinMagFilter &filter) |
Protected Member Functions | |
| virtual void | CheckExtensions () |
| void | SetClearValues (GfxServer::ClearValues &clear_values) |
| void | ResetRenderObjects () |
| bool | LoadResources () |
| void | UnloadResources () |
Protected Attributes | |
| string | window_title |
| DisplayMode | display_mode |
| MinMagFilter | minmag_filter |
| MinMagFilter | mipmap_filter |
| ClearValues | clear_values |
| byte_t | extensions |
| bool | blending |
| bool | depth_test |
| vector4 | color_filter |
| bool | display_opened |
| Ref< ResourceServer > | resource_server |
| CursorVisibility | cursor_visibility |
| vector< Model * > | cursors |
| Model * | cursor_model |
| SizeCallbackFun | callback_size |
| RefreshCallbackFun | callback_refresh |
| CloseCallbackFun | callback_close |
| Mesh * | mesh |
| Texture * | texture |
| Texture * | overlay |
| vector2 * | mapping |
| vector2 * | coords_buff |
| Pointer to active buffer with animated coords. | |
| vector4 * | colors_buff |
| Pointer to active buffer with animated colors. | |
| Ref< Font > | font |
| Active font used for printing texts. | |
Classes | |
| struct | ClearValues |
| typedef void(* GfxServer::SizeCallbackFun)(ushort_t, ushort_t, bool) |
| typedef void(* GfxServer::RefreshCallbackFun)(void) |
| typedef bool(* GfxServer::CloseCallbackFun)(void) |
| enum GfxServer::Extension |
| GfxServer::GfxServer | ( | const char * | id | ) |
| GfxServer::~GfxServer | ( | ) | [virtual] |
| Texture * GfxServer::NewTexture | ( | const string & | file_name | ) | [virtual] |
Creates a shared texture resource object.
Reimplemented in OpenGLGfxServer.
| Texture * GfxServer::NewTexture | ( | const string & | file_name, | |
| const string & | overlay_name, | |||
| const vector3 & | overlay_color | |||
| ) | [virtual] |
Creates a shared texture resource object with overlay image.
Reimplemented in OpenGLGfxServer.
Creates a shared texture resource object from memory buffer.
Reimplemented in OpenGLGfxServer.
| Font * GfxServer::NewFont | ( | const string & | file_name, | |
| const FontFile::CharSize & | char_size | |||
| ) | [virtual] |
Creates a shared font resource object.
Reimplemented in OpenGLGfxServer.
| Mesh * GfxServer::NewMesh | ( | const string & | file_name | ) |
Creates a shared mesh resource object.
| Model * GfxServer::NewModel | ( | const string & | file_name | ) |
Creates a shared model resource object.
Creates a shared model resource object.
| Animation * GfxServer::NewAnimation | ( | const string & | file_name | ) |
| ImageFile * GfxServer::NewImageFile | ( | const string & | file_name, | |
| bool | open = false, |
|||
| bool | write = false | |||
| ) |
| FontFile * GfxServer::NewFontFile | ( | const string & | file_name, | |
| bool | open = false, |
|||
| bool | write = false | |||
| ) |
| void GfxServer::SetDisplayMode | ( | const DisplayMode & | mode | ) |
Set the prefered display mode.
| const DisplayMode & GfxServer::GetDisplayMode | ( | ) | const [inline] |
| void GfxServer::SetProjection | ( | const Projection & | projection | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::SetViewport | ( | const Viewport & | display_viewport | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::PushScreenCoordinates | ( | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::PopScreenCoordinates | ( | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| ushort_t GfxServer::GetVideoModes | ( | VideoMode * | modes, | |
| int | max_count, | |||
| VideoMode::Bpp | bpp = VideoMode::BPP_UNDEFINED | |||
| ) | [virtual] |
Reimplemented in GlfwGfxServer.
| byte_t GfxServer::GetExtensions | ( | ) | [inline] |
| bool GfxServer::IsExtensions | ( | byte_t | extensions | ) | [inline] |
| void GfxServer::SetMinMagFilter | ( | MinMagFilter | minmag_filter | ) | [inline] |
| void GfxServer::SetMipMapFilter | ( | MinMagFilter | mipmap_filter | ) | [inline] |
| GfxServer::MinMagFilter GfxServer::GetMinMagFilter | ( | ) | const [inline] |
| GfxServer::MinMagFilter GfxServer::GetMipMapFilter | ( | ) | const [inline] |
| void GfxServer::SetWindowTitle | ( | const string & | window_title | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| void GfxServer::SetWindowPosition | ( | const DisplayMode::WidowPosition & | position | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| const DisplayMode::WidowPosition & GfxServer::GetWindowPosition | ( | ) | const [virtual] |
| void GfxServer::SetWindowSize | ( | const DisplayMode::WidowSize & | size | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| const DisplayMode::WidowSize & GfxServer::GetWindowSize | ( | ) | const [virtual] |
| void GfxServer::SetWindowVerticalSync | ( | bool | vsync | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| void GfxServer::MinimizeWindow | ( | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| void GfxServer::RestoreWindow | ( | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| void GfxServer::ToggleFullscreen | ( | ) | [virtual] |
| bool GfxServer::IsWindowMinimized | ( | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| bool GfxServer::IsWindowActive | ( | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| bool GfxServer::IsWindowAccelerated | ( | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| void GfxServer::SetWindowSizeCallback | ( | SizeCallbackFun | cbfun | ) | [inline] |
| void GfxServer::SetWindowRefreshCallback | ( | RefreshCallbackFun | cbfun | ) | [inline] |
| void GfxServer::SetWindowCloseCallback | ( | CloseCallbackFun | cbfun | ) | [inline] |
| bool GfxServer::OpenDisplay | ( | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| void GfxServer::CloseDisplay | ( | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| void GfxServer::PresentScene | ( | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| void GfxServer::WriteInfo | ( | ) | [virtual] |
Writes basic gfx information to log file.
Reimplemented in OpenGLGfxServer.
| void GfxServer::RegisterCallbacks | ( | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| bool GfxServer::Trigger | ( | ) | [virtual] |
| bool GfxServer::IsDisplayOpened | ( | ) | [inline] |
| void GfxServer::SetCursorVisibility | ( | CursorVisibility | type | ) | [virtual] |
Reimplemented in GlfwGfxServer.
| GfxServer::CursorVisibility GfxServer::GetCursorVisibility | ( | ) | const [inline] |
| bool GfxServer::TestCursorVisibility | ( | CursorVisibility | type | ) | const [inline] |
| byte_t GfxServer::AddCursor | ( | const string & | model_file | ) |
| void GfxServer::SetCursor | ( | byte_t | cursor_id | ) | [inline] |
| bool GfxServer::SaveScreenshot | ( | const string & | file_name | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| bool GfxServer::SaveImage | ( | const string & | file_name, | |
| byte_t * | data, | |||
| ImageFile::Format | format, | |||
| ushort_t | width, | |||
| ushort_t | height | |||
| ) |
| void GfxServer::SetMesh | ( | Mesh * | mesh | ) | [inline] |
| void GfxServer::SetTexture | ( | Texture * | texture | ) | [inline] |
| void GfxServer::SetMapping | ( | vector2 * | mapping | ) | [inline] |
| void GfxServer::SetCoordsBuffer | ( | vector2 * | coords_buff | ) | [inline] |
| void GfxServer::SetColorsBuffer | ( | vector4 * | colors_buff | ) | [inline] |
| void GfxServer::SetFont | ( | Font * | font | ) |
| const Font * GfxServer::GetFont | ( | ) | [inline] |
| void GfxServer::ResetMatrix | ( | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::PushMatrix | ( | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::PopMatrix | ( | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::Translate | ( | const vector2 & | translation | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::Translate | ( | const vector3 & | translation | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::Rotate | ( | float | rotation | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::Rotate | ( | const vector3 & | rotation | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::SetColor | ( | const vector3 & | color | ) | [virtual] |
Sets current color.
Reimplemented in OpenGLGfxServer.
| void GfxServer::SetColor | ( | const vector4 & | color | ) | [virtual] |
Sets current color.
Reimplemented in OpenGLGfxServer.
| void GfxServer::SetColorMask | ( | bool | r, | |
| bool | g, | |||
| bool | b, | |||
| bool | alpha = true | |||
| ) | [virtual] |
Sets current color mask.
Reimplemented in OpenGLGfxServer.
| void GfxServer::SetClearValues | ( | float | red, | |
| float | green, | |||
| float | blue, | |||
| float | alpha = 0.0f, |
|||
| float | depth = 0.0f, |
|||
| int | stencil = 0 | |||
| ) | [virtual] |
Sets values for clearing buffers.
Reimplemented in OpenGLGfxServer.
| void GfxServer::SetBlending | ( | bool | blending | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::SetDepthTest | ( | bool | depth_test | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::SetColorFilter | ( | float | r, | |
| float | g, | |||
| float | b, | |||
| float | alpha = 1.0f | |||
| ) | [inline] |
| void GfxServer::ClearBuffers | ( | byte_t | buffers | ) | [virtual] |
Clears buffers.
Reimplemented in OpenGLGfxServer.
| void GfxServer::RenderShape | ( | ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::RenderPrimitive | ( | PrimitiveType | primitive, | |
| const vector2 * | vertices, | |||
| uint_t | count | |||
| ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::Print | ( | const vector2 & | position, | |
| const string & | text | |||
| ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| void GfxServer::Print | ( | const string & | text | ) |
| void GfxServer::ReadPixels | ( | ushort_t | x, | |
| ushort_t | y, | |||
| ushort_t | width, | |||
| ushort_t | height, | |||
| byte_t * | pixels | |||
| ) | [virtual] |
Reimplemented in OpenGLGfxServer.
| bool GfxServer::FilterToString | ( | MinMagFilter | filter, | |
| string & | name | |||
| ) | [static] |
| bool GfxServer::StringToFilter | ( | const string & | name, | |
| MinMagFilter & | filter | |||
| ) | [static] |
| void GfxServer::CheckExtensions | ( | ) | [protected, virtual] |
Reimplemented in GlfwGfxServer.
| void GfxServer::SetClearValues | ( | GfxServer::ClearValues & | clear_values | ) | [inline, protected] |
| void GfxServer::ResetRenderObjects | ( | ) | [inline, protected] |
| bool GfxServer::LoadResources | ( | ) | [protected] |
| void GfxServer::UnloadResources | ( | ) | [protected] |
string GfxServer::window_title [protected] |
DisplayMode GfxServer::display_mode [protected] |
MinMagFilter GfxServer::minmag_filter [protected] |
MinMagFilter GfxServer::mipmap_filter [protected] |
ClearValues GfxServer::clear_values [protected] |
byte_t GfxServer::extensions [protected] |
bool GfxServer::blending [protected] |
bool GfxServer::depth_test [protected] |
vector4 GfxServer::color_filter [protected] |
bool GfxServer::display_opened [protected] |
Ref<ResourceServer> GfxServer::resource_server [protected] |
CursorVisibility GfxServer::cursor_visibility [protected] |
vector<Model *> GfxServer::cursors [protected] |
Model* GfxServer::cursor_model [protected] |
SizeCallbackFun GfxServer::callback_size [protected] |
RefreshCallbackFun GfxServer::callback_refresh [protected] |
CloseCallbackFun GfxServer::callback_close [protected] |
Mesh* GfxServer::mesh [protected] |
Texture* GfxServer::texture [protected] |
Texture* GfxServer::overlay [protected] |
vector2* GfxServer::mapping [protected] |
vector2* GfxServer::coords_buff [protected] |
Pointer to active buffer with animated coords.
vector4* GfxServer::colors_buff [protected] |
Pointer to active buffer with animated colors.
Ref<Font> GfxServer::font [protected] |
Active font used for printing texts.
1.5.3