zenilib: Zeni::Video_GL_Fixed Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Friends | List of all members
Zeni::Video_GL_Fixed Class Reference
Zenilib

The OpenGL Rendering System. More...

`#include <Video_GL_Fixed.h>`

Inherits Zeni::Video.

## Public Member Functions

void | apply_Texture (const String &name)
| Apply a texture by name. More...
void | apply_Texture (const unsigned long &id)
| Apply a texture by id. More...
void | apply_Texture (const Texture &texture)
| Apply a texture by id. More...
bool | begin_prerender ()
| Must be called before begin_render. More...
bool | begin_render ()
| Must be called before all rendering functions; Returns true if rendering can proceed. More...
void | clear_depth_buffer ()
| Can reset the depth buffer at any time if necessary. More...
void | clear_render_target (const Color &color=Color(0.0f, 0.0f, 0.0f, 0.0f))
| Clear the viewport. More...
Font * | create_Font (const String &filename, const float &glyph_height, const float &virtual_screen_height)
| Function for creating a Font; used internally by Fonts. More...
Shader * | create_Fragment_Shader (const String &filename)
| Create a Fragment_Shader from a file. More...
Program * | create_Program ()
| Create a Program from a file. More...
Texture * | create_Texture (const Image &image)
| Function for creating a Texture from an Image. More...
Texture * | create_Texture (const Point2i &size, const bool &repeat)
| Function for creating a Texture for render-to-texture. More...
Vertex_Buffer_Renderer * | create_Vertex_Buffer_Renderer (Vertex_Buffer &vertex_buffer)
| Function for creating a Vertex_Buffer_Renderer. More...
Shader * | create_Vertex_Shader (const String &filename)
| Create a Vertex Shader from a file. More...
void | end_render ()
| Must be called after all rendering functions. More...
int | get_maximum_anisotropy () const
| Get the current level of anisotrophy. More...
PFNGLBINDBUFFERARBPROC | get_pglBindBufferARB () const
PFNGLBUFFERDATAARBPROC | get_pglBufferDataARB () const
PFNGLDELETEBUFFERSARBPROC | get_pglDeleteBuffersARB () const
PFNGLGENBUFFERSARBPROC | get_pglGenBuffersARB () const
Point2f | get_pixel_offset () const
| Get the pixel offset in the 2d view. More...
const Point2i & | get_render_target_size () const
| Get the dimensions of the render target. More...
bool | has_vertex_buffers () const
| Determine whether Vertex_Buffers are supported. More...
Texture * | load_Texture (const String &filename, const bool &repeat, const bool &lazy_loading=false)
| Function for loading a Texture; used internally by Textures. More...
void | pglBindBufferARB (const GLenum target, const GLuint buffer) const
| The glBindBufferARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers() returns false. More...
void | pglBufferDataARB (const GLenum target, const int size, const GLvoid *const data, const GLenum usage) const
| The glBufferDataARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers() returns false. More...
void | pglDeleteBuffersARB (const GLsizei n, GLuint *const buffers) const
| The glDeleteBuffersARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers() returns false. More...
void | pglGenBuffersARB (const GLsizei n, GLuint *const buffers) const
| The glGenBuffersARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers() returns false. More...
void | pop_world_stack ()
| Pop a model view matrix off the stack. More...
void | push_world_stack ()
| Push a model view matrix onto the stack. More...
void | render (const Renderable &renderable)
| Render a Renderable. More...
void | rotate_scene (const Vector3f &about, const float &radians)
| Rotate the scene. More...
void | scale_scene (const Vector3f &factor)
| Scale the scene. More...
void | select_world_matrix ()
| Select the world (model view) matrix; Call before [translate/rotate/scale] scene. More...
void | set_2d_view (const std::pair< Point2f, Point2f > &, const std::pair< Point2i, Point2i > &=std::make_pair(Point2i(), get_Video().get_render_target_size()), const bool &fix_aspect_ratio=false)
| Set a 2D view for a viewport. More...
void | set_3d_view (const Camera &, const std::pair< Point2i, Point2i > &=std::make_pair(Point2i(), get_Video().get_render_target_size()))
| Set a 3D view for a viewport. More...
void | set_alpha_test (const bool &enabled, const TEST &test, const float &value)
| Set the alpha test. More...
void | set_ambient_lighting (const Color &color)
| Set ambient lighting on/off. More...
void | set_backface_culling (const bool &on)
| Set backface culling on/off. More...
void | set_clear_Color (const Color &color)
| Set the blank background color. More...
void | set_Color (const Color &color)
| Set the current color. More...
void | set_Fog (const Fog &fog)
| Set Fog. More...
void | set_Light (const int &number, const Light &light)
| Set a particular Light. More...
void | set_lighting (const bool &on=true)
| Set lighting on/off. More...
void | set_Material (const Material &material)
| Set a Material. More...
void | set_program (Program &program)
| Enable a program. More...
void | set_projection_matrix (const Matrix4f &projection)
| Set the projection Matrix4f. More...
void | set_render_target (Texture &texture)
| Set a render target. More...
void | set_vertical_sync (const bool &on)
| Set vertical_sync on/off. More...
void | set_view_matrix (const Matrix4f &view)
| Set the view Matrix4f. More...
void | set_viewport (const std::pair< Point2i, Point2i > &viewport=std::make_pair(Point2i(), get_Video().get_render_target_size()))
| Set the viewport. More...
void | set_ztest (const bool &enabled)
| Enable or disable testing of the Z-Buffer. More...
void | set_zwrite (const bool &enabled)
| Enable or disable writing to the Z-Buffer. More...
void | transform_scene (const Matrix4f &transformation)
| Transform the scene. More...
void | translate_scene (const Vector3f &direction)
| Translate the scene. More...
void | unapply_Texture ()
| Unapply a texture. More...
void | unset_Fog ()
| Unset Fog. More...
void | unset_Light (const int &number)
| Unset a particular Light. More...
void | unset_Material (const Material &material)
| Unset a Material. More...
void | unset_program ()
| Disable a program. More...
void | unset_render_target ()
| Unset a render target. More...
Public Member Functions inherited from Zeni::Video
void | apply_Texture (const String &name)
| Apply a texture by name. More...
std::pair< Point2i, Point2i > | calculate_viewport (const std::pair< Point2f, Point2f > &camera2d, const std::pair< Point2i, Point2i > &viewport, const bool &fix_aspect_ratio)
| Calculate the viewport. More...
std::pair< Point2i, Point2i > | calculate_viewport (const float &aspect_ratio, const std::pair< Point2i, Point2i > &viewport=std::make_pair(Point2i(), get().get_render_target_size())) const
| Calculate the viewport. More...
TEST | get_alpha_test_function () const
| Determine which alpha test is in use. More...
float | get_alpha_test_value () const
| Determine what value the alpha test is comparing against. More...
const Color & | get_clear_Color () const
| Get the blank background color. More...
const Color & | get_Color () const
| Get the current color. More...
const Fog * | get_Fog () const
| Get pointer to current Fog, or 0 if no Fog. More...
ShHandle | get_fragment_shader_compiler () const
| Get the fragment shader compiler. More...
const Light * | get_Light (const int &number) const
| Get pointer to Light, or 0 if no such Light. More...
const Matrix4f & | get_projection_matrix () const
| Get the projection Matrix4f. More...
ShHandle | get_vertex_shader_compiler () const
| Get the vertex shader compiler. More...
const Matrix4f & | get_view_matrix () const
| Get the view Matrix4f. More...
const std::pair< Point2i, Point2i > & | get_viewport () const
| Get the viewport. More...
bool | is_3d () const
| Determine whether currently rendering in 3D. More...
bool | is_alpha_test_enabled () const
| Determine whether alpha testing is enabled. More...
bool | is_ztest_enabled () const
| Determine whether testing the Z-Buffer is enabled. More...
bool | is_zwrite_enabled () const
| Determine whether writing to Z-Buffer is enabled. More...
void | rotate_scene (const Quaternion &rotation)
| Rotate the scene. More...
void | set_2d ()
| Set the default 2D view filling the entire display area. More...
void | set_2d (const std::pair< Point2f, Point2f > &camera2d, const bool &fix_aspect_ratio=false)
| Set a 2D view for the entire viewing area. More...
void | set_3d (const Camera &camera)
| Set a 3D view filling the entire display area. More...
void | set_viewport (const float &aspect_ratio, const std::pair< Point2i, Point2i > &viewport=std::make_pair(Point2i(), get().get_render_target_size()))
| Set the viewport. More...
Public Member Functions inherited from Zeni::Singleton< Video >
void | fax_post_reinit (Event::Handler *const &handler)
void | fax_pre_uninit (Event::Handler *const &handler)
void | give_post_reinit (Event::Handler *const &handler)
void | give_pre_uninit (Event::Handler *const &handler)
void | lend_post_reinit (Event::Handler *const &handler)
void | lend_pre_uninit (Event::Handler *const &handler)

## Protected Member Functions

void | init ()
void | uninit ()
Protected Member Functions inherited from Zeni::Video
| Video ()
virtual | ~Video ()=0
String | compile_glsles_shader (const String &filename, const ShHandle &compiler)
| Compile an OpenGL ES shader to GLSL/HLSL. More...
Protected Member Functions inherited from Zeni::Singleton< Video >
| Singleton ()
virtual | ~Singleton ()

## Friends

Video & | get_Video ()
| Get access to the singleton. More...
class | Video

## Additional Inherited Members

Public Types inherited from Zeni::Video
enum | TEST { ZENI_NEVER = 0, ZENI_LESS = 1, ZENI_EQUAL = 2, ZENI_GREATER = 4, ZENI_NOT_EQUAL = 8, ZENI_LESS_OR_EQUAL = 3, ZENI_GREATER_OR_EQUAL = 6, ZENI_ALWAYS = 15 }
enum | VIDEO_MODE { ZENI_VIDEO_ANY, ZENI_VIDEO_GL_FIXED, ZENI_VIDEO_DX9, ZENI_VIDEO_GL_SHADER }
Static Public Member Functions inherited from Zeni::Video
static void | change_resolution (const Point2i &resolution)
static const Color & | get_ambient_lighting ()
| Get the current ambient lighting Color. More...
static bool | get_backface_culling ()
| Determine whether backface culling is enabled. More...
static bool | get_lighting ()
| Determine whether dynamic lighting is enabled. More...
static int | get_multisampling ()
| Get the current level of multisampling. More...
static bool | get_normal_interpolation ()
| Determine whether normal interpolation is enabled. More...
static bool | get_vertical_sync ()
| Determine whether vertical sync is enabled. More...
static VIDEO_MODE | get_video_mode ()
| Get the currently selected video mode. More...
static void | preinit_from_file (const String &filename)
| Set rendering options from a file. More...
static void | preinit_from_file (const XML_Document &file)
| Set rendering options from a file. More...
static void | preinit_multisampling (const int &multisampling=0)
| Set a multisampling value. More...
static void | preinit_vertical_sync (const bool &vertical_sync=false)
| Set vertical_sync to true. More...
static void | preinit_video_mode (const VIDEO_MODE &vm=ZENI_VIDEO_ANY)
| Set which rendering engine to use. More...
static void | print_errors ()
| Print any errors that may have occurred. More...
static bool | revert ()
| Restore previously saved options; Returns true if successful. More...
static void | save (const bool &backup=true)
| Save options. More...
static void | set_failsafe_defaults ()
| Set failsafe default options. More...
Static Public Member Functions inherited from Zeni::Singleton< Video >
static void | completely_destroy ()
static void | destroy ()
static Video & | get ()
static bool | is_initialized ()
static void | remove_post_reinit (Event::Handler *const &handler)
static void | remove_pre_uninit (Event::Handler *const &handler)
Protected Attributes inherited from Zeni::Video
ShHandle | m_fragment_compiler
ShHandle | m_vertex_compiler

## Detailed Description

The OpenGL Rendering System.

This class supports OpenGL-specific rendering.

Author
  bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 70 of file Video_GL_Fixed.h.

## Member Function Documentation

void Zeni::Video_GL_Fixed::apply_Texture | ( | const String & | name | ) |

inline

Apply a texture by name.

Definition at line 108 of file Video_GL_Fixed.h.

References Zeni::Video::apply_Texture().

Referenced by Zeni::Material::set().

void Zeni::Video_GL_Fixed::apply_Texture | ( | const unsigned long & | id | ) |

virtual

Apply a texture by id.

Implements Zeni::Video.

Definition at line 343 of file Video_GL_Fixed.cpp.

References Zeni::Textures::apply_Texture(), and Zeni::get_Textures().

void Zeni::Video_GL_Fixed::apply_Texture | ( | const Texture & | texture | ) |

virtual

Apply a texture by id.

Implements Zeni::Video.

Definition at line 347 of file Video_GL_Fixed.cpp.

References Zeni::Texture::apply_Texture().

bool Zeni::Video_GL_Fixed::begin_prerender | ( |  | ) |

virtual

Must be called before begin_render.

Implements Zeni::Video.

Definition at line 97 of file Video_GL_Fixed.cpp.

References assert, Zeni::get_Fonts(), Zeni::get_Textures(), glFinish, glFlush, and Zeni::Database< TYPE >::unlose_resources().

bool Zeni::Video_GL_Fixed::begin_render | ( |  | ) |

virtual

Must be called before all rendering functions; Returns true if rendering can proceed.

Implements Zeni::Video.

Definition at line 112 of file Video_GL_Fixed.cpp.

References assert, Zeni::get_Window(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_FALSE, GL_TRUE, glClear, glDepthMask, and glViewport.

void Zeni::Video_GL_Fixed::clear_depth_buffer | ( |  | ) |

virtual

Can reset the depth buffer at any time if necessary.

Implements Zeni::Video.

Definition at line 185 of file Video_GL_Fixed.cpp.

References GL_DEPTH_BUFFER_BIT, GL_FALSE, GL_TRUE, glClear, and glDepthMask.

void Zeni::Video_GL_Fixed::clear_render_target | ( | const Color & | color = `Color(0.0f, 0.0f, 0.0f, 0.0f)` | ) |

virtual

Clear the viewport.

Implements Zeni::Video.

Definition at line 508 of file Video_GL_Fixed.cpp.

References GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, and glClear.

Font * Zeni::Video_GL_Fixed::create_Font | ( | const String & | filename,
|  | const float & | glyph_height,
|  | const float & | virtual_screen_height
| ) |  |

virtual

Function for creating a Font; used internally by Fonts.

Implements Zeni::Video.

Definition at line 594 of file Video_GL_Fixed.cpp.

Shader * Zeni::Video_GL_Fixed::create_Fragment_Shader | ( | const String & | filename | ) |

virtual

Create a Fragment_Shader from a file.

Implements Zeni::Video.

Definition at line 606 of file Video_GL_Fixed.cpp.

Program * Zeni::Video_GL_Fixed::create_Program | ( |  | ) |

virtual

Create a Program from a file.

Implements Zeni::Video.

Definition at line 610 of file Video_GL_Fixed.cpp.

Texture * Zeni::Video_GL_Fixed::create_Texture | ( | const Image & | image | ) |

virtual

Function for creating a Texture from an Image.

Implements Zeni::Video.

Definition at line 586 of file Video_GL_Fixed.cpp.

Texture * Zeni::Video_GL_Fixed::create_Texture | ( | const Point2i & | size,
|  | const bool & | repeat
| ) |  |

virtual

Function for creating a Texture for render-to-texture.

Implements Zeni::Video.

Definition at line 590 of file Video_GL_Fixed.cpp.

Vertex_Buffer_Renderer * Zeni::Video_GL_Fixed::create_Vertex_Buffer_Renderer | ( | Vertex_Buffer & | vertex_buffer | ) |

virtual

Function for creating a Vertex_Buffer_Renderer.

Implements Zeni::Video.

Definition at line 598 of file Video_GL_Fixed.cpp.

Shader * Zeni::Video_GL_Fixed::create_Vertex_Shader | ( | const String & | filename | ) |

virtual

Create a Vertex Shader from a file.

Implements Zeni::Video.

Definition at line 602 of file Video_GL_Fixed.cpp.

void Zeni::Video_GL_Fixed::end_render | ( |  | ) |

virtual

Must be called after all rendering functions.

Swap the buffers <– NOT part of the CPU saver, but the reason it is "needed"

Implements Zeni::Video.

Definition at line 127 of file Video_GL_Fixed.cpp.

References Zeni::Time::get_ticks_since(), Zeni::Timer::get_time(), Zeni::get_Timer(), Zeni::get_Window(), SDL_Delay(), SDL_GL_SwapWindow(), and u.

int Zeni::Video_GL_Fixed::get_maximum_anisotropy | ( |  | ) | const

virtual

Get the current level of anisotrophy.

Implements Zeni::Video.

Definition at line 193 of file Video_GL_Fixed.cpp.

PFNGLBINDBUFFERARBPROC Zeni::Video_GL_Fixed::get_pglBindBufferARB | ( |  | ) | const

inline

Definition at line 169 of file Video_GL_Fixed.h.

PFNGLBUFFERDATAARBPROC Zeni::Video_GL_Fixed::get_pglBufferDataARB | ( |  | ) | const

inline

Definition at line 172 of file Video_GL_Fixed.h.

PFNGLDELETEBUFFERSARBPROC Zeni::Video_GL_Fixed::get_pglDeleteBuffersARB | ( |  | ) | const

inline

Definition at line 170 of file Video_GL_Fixed.h.

PFNGLGENBUFFERSARBPROC Zeni::Video_GL_Fixed::get_pglGenBuffersARB | ( |  | ) | const

inline

Definition at line 171 of file Video_GL_Fixed.h.

Point2f Zeni::Video_GL_Fixed::get_pixel_offset | ( |  | ) | const

virtual

Get the pixel offset in the 2d view.

Implements Zeni::Video.

Definition at line 550 of file Video_GL_Fixed.cpp.

const Point2i & Zeni::Video_GL_Fixed::get_render_target_size | ( |  | ) | const

inlinevirtual

Get the dimensions of the render target.

Implements Zeni::Video.

Definition at line 513 of file Video_GL_Fixed.cpp.

References Zeni::Window::get_size(), and Zeni::get_Window().

bool Zeni::Video_GL_Fixed::has_vertex_buffers | ( |  | ) | const

virtual

Determine whether Vertex_Buffers are supported.

Implements Zeni::Video.

Definition at line 197 of file Video_GL_Fixed.cpp.

References GLEW_ARB_vertex_buffer_object.

void Zeni::Video_GL_Fixed::init | ( |  | ) |

protected

Generate vertex and fragment shader compilers

Definition at line 614 of file Video_GL_Fixed.cpp.

References Zeni::get_Window(), GL_BLEND, GL_FILL, GL_FRONT_AND_BACK, GL_INVALID_ENUM, GL_LIGHT_MODEL_COLOR_CONTROL, GL_LIGHT_MODEL_LOCAL_VIEWER, GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, GL_NORMALIZE, GL_ONE_MINUS_SRC_ALPHA, GL_SEPARATE_SPECULAR_COLOR, GL_SMOOTH, GL_SRC_ALPHA, GL_TRUE, glBlendFunc, glClearColor, glEnable, GLEW_ARB_vertex_buffer_object, GLEW_EXT_texture_filter_anisotropic, GLEW_OK, glewGetErrorString(), glewInit(), glGetError, glGetIntegerv, glLightModeli, glPolygonMode, glShadeModel, i, ShBuiltInResources::MaxCombinedTextureImageUnits, ShBuiltInResources::MaxDrawBuffers, ShBuiltInResources::MaxFragmentUniformVectors, ShBuiltInResources::MaxTextureImageUnits, ShBuiltInResources::MaxVaryingVectors, ShBuiltInResources::MaxVertexAttribs, ShBuiltInResources::MaxVertexTextureImageUnits, ShBuiltInResources::MaxVertexUniformVectors, ShBuiltInResources::OES_EGL_image_external, ShBuiltInResources::OES_standard_derivatives, SDL_ClearError(), SDL_GL_ACCUM_ALPHA_SIZE, SDL_GL_ACCUM_BLUE_SIZE, SDL_GL_ACCUM_GREEN_SIZE, SDL_GL_ACCUM_RED_SIZE, SDL_GL_ALPHA_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_CONTEXT_MAJOR_VERSION, SDL_GL_CONTEXT_MINOR_VERSION, SDL_GL_CreateContext(), SDL_GL_DEPTH_SIZE, SDL_GL_DOUBLEBUFFER, SDL_GL_GetProcAddress(), SDL_GL_GREEN_SIZE, SDL_GL_MULTISAMPLEBUFFERS, SDL_GL_MULTISAMPLESAMPLES, SDL_GL_RED_SIZE, SDL_GL_SetAttribute(), SDL_GL_SetSwapInterval(), SDL_GL_STENCIL_SIZE, SH_FRAGMENT_SHADER, SH_GLES2_SPEC, SH_GLSL_OUTPUT, SH_VERTEX_SHADER, ShConstructCompiler(), and ShInitBuiltInResources().

Texture * Zeni::Video_GL_Fixed::load_Texture | ( | const String & | filename,
|  | const bool & | repeat,
|  | const bool & | lazy_loading = `false`
| ) |  |

virtual

Function for loading a Texture; used internally by Textures.

Implements Zeni::Video.

Definition at line 582 of file Video_GL_Fixed.cpp.

void Zeni::Video_GL_Fixed::pglBindBufferARB | ( | const GLenum | target,
|  | const GLuint | buffer
| ) |  | const

inline

The glBindBufferARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers() returns false.

Definition at line 41 of file Video_GL_Fixed.hxx.

References glBindBuffer().

Referenced by Zeni::Vertex_Buffer_Renderer_GL_Fixed::render(), and Zeni::Vertex_Buffer_Renderer_GL_Fixed::Vertex_Buffer_Renderer_GL_Fixed().

void Zeni::Video_GL_Fixed::pglBufferDataARB | ( | const GLenum | target,
|  | const int | size,
|  | const GLvoid *const | data,
|  | const GLenum | usage
| ) |  | const

inline

The glBufferDataARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers() returns false.

Definition at line 65 of file Video_GL_Fixed.hxx.

References glBufferData().

Referenced by Zeni::Vertex_Buffer_Renderer_GL_Fixed::Vertex_Buffer_Renderer_GL_Fixed().

void Zeni::Video_GL_Fixed::pglDeleteBuffersARB | ( | const GLsizei | n,
|  | GLuint *const | buffers
| ) |  | const

inline

The glDeleteBuffersARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers() returns false.

Definition at line 49 of file Video_GL_Fixed.hxx.

References glDeleteBuffers().

Referenced by Zeni::Vertex_Buffer_Renderer_GL_Fixed::~Vertex_Buffer_Renderer_GL_Fixed().

void Zeni::Video_GL_Fixed::pglGenBuffersARB | ( | const GLsizei | n,
|  | GLuint *const | buffers
| ) |  | const

inline

The glGenBuffersARB OpenGL function as provided by an extension; Will segfault if has_vertex_buffers() returns false.

Definition at line 57 of file Video_GL_Fixed.hxx.

References glGenBuffers().

Referenced by Zeni::Vertex_Buffer_Renderer_GL_Fixed::Vertex_Buffer_Renderer_GL_Fixed().

void Zeni::Video_GL_Fixed::pop_world_stack | ( |  | ) |

virtual

Pop a model view matrix off the stack.

Implements Zeni::Video.

Definition at line 529 of file Video_GL_Fixed.cpp.

References GL_MODELVIEW, glMatrixMode, and glPopMatrix.

void Zeni::Video_GL_Fixed::push_world_stack | ( |  | ) |

virtual

Push a model view matrix onto the stack.

Implements Zeni::Video.

Definition at line 524 of file Video_GL_Fixed.cpp.

References GL_MODELVIEW, glMatrixMode, and glPushMatrix.

void Zeni::Video_GL_Fixed::render | ( | const Renderable & | renderable | ) |

virtual

Render a Renderable.

Implements Zeni::Video.

Definition at line 164 of file Video_GL_Fixed.cpp.

References Zeni::Renderable::post_render(), Zeni::Renderable::pre_render(), and Zeni::Renderable::render_to().

void Zeni::Video_GL_Fixed::rotate_scene | ( | const Vector3f & | about,
|  | const float & | radians
| ) |  |

virtual

Rotate the scene.

Implements Zeni::Video.

Definition at line 538 of file Video_GL_Fixed.cpp.

References glRotatef, Zeni::Vector3f::i, Zeni::Vector3f::j, Zeni::Vector3f::k, and pi.

void Zeni::Video_GL_Fixed::scale_scene | ( | const Vector3f & | factor | ) |

virtual

Scale the scene.

Implements Zeni::Video.

Definition at line 542 of file Video_GL_Fixed.cpp.

References glScalef, Zeni::Vector3f::i, Zeni::Vector3f::j, and Zeni::Vector3f::k.

void Zeni::Video_GL_Fixed::select_world_matrix | ( |  | ) |

virtual

Select the world (model view) matrix; Call before [translate/rotate/scale] scene.

Implements Zeni::Video.

Definition at line 520 of file Video_GL_Fixed.cpp.

References GL_MODELVIEW, and glMatrixMode.

void Zeni::Video_GL_Fixed::set_2d_view | ( | const std::pair< Point2f, Point2f > & | camera2d,
|  | const std::pair< Point2i, Point2i > & | viewport = `std::make_pair(Point2i(), get_Video().get_render_target_size())`,
|  | const bool & | fix_aspect_ratio = `false`
| ) |  |

virtual

Set a 2D view for a viewport.

Implements Zeni::Video.

Definition at line 201 of file Video_GL_Fixed.cpp.

References GL_BACK, GL_FRONT, and glCullFace.

void Zeni::Video_GL_Fixed::set_3d_view | ( | const Camera & | camera,
|  | const std::pair< Point2i, Point2i > & | viewport = `std::make_pair(Point2i(), get_Video().get_render_target_size())`
| ) |  |

virtual

Set a 3D view for a viewport.

Implements Zeni::Video.

Definition at line 217 of file Video_GL_Fixed.cpp.

References GL_BACK, GL_FRONT, and glCullFace.

void Zeni::Video_GL_Fixed::set_alpha_test | ( | const bool & | enabled,
|  | const TEST & | test,
|  | const float & | value
| ) |  |

virtual

Set the alpha test.

Implements Zeni::Video.

Definition at line 301 of file Video_GL_Fixed.cpp.

References assert, GL_ALPHA_TEST, GL_ALWAYS, GL_EQUAL, GL_GEQUAL, GL_GREATER, GL_LEQUAL, GL_LESS, GL_NEVER, GL_NOTEQUAL, glAlphaFunc, glDisable, and glEnable.

void Zeni::Video_GL_Fixed::set_ambient_lighting | ( | const Color & | color | ) |

virtual

Set ambient lighting on/off.

Implements Zeni::Video.

Definition at line 364 of file Video_GL_Fixed.cpp.

References GL_LIGHT_MODEL_AMBIENT, and glLightModelfv.

void Zeni::Video_GL_Fixed::set_backface_culling | ( | const bool & | on | ) |

virtual

Set backface culling on/off.

Implements Zeni::Video.

Definition at line 228 of file Video_GL_Fixed.cpp.

References GL_BACK, GL_CULL_FACE, GL_FRONT, glCullFace, glDisable, and glEnable.

void Zeni::Video_GL_Fixed::set_clear_Color | ( | const Color & | color | ) |

virtual

Set the blank background color.

Implements Zeni::Video.

Definition at line 337 of file Video_GL_Fixed.cpp.

References Zeni::Color::a, Zeni::Color::b, Zeni::Color::g, glClearColor, and Zeni::Color::r.

void Zeni::Video_GL_Fixed::set_Color | ( | const Color & | color | ) |

virtual

Set the current color.

Implements Zeni::Video.

Definition at line 331 of file Video_GL_Fixed.cpp.

References Zeni::Color::a, Zeni::Color::b, Zeni::Color::g, glColor4f, and Zeni::Color::r.

Referenced by Zeni::Material::set().

void Zeni::Video_GL_Fixed::set_Fog | ( | const Fog & | fog | ) |

virtual

Set Fog.

Implements Zeni::Video.

Definition at line 418 of file Video_GL_Fixed.cpp.

References GL_FOG, glEnable, and Zeni::Fog::set().

void Zeni::Video_GL_Fixed::set_Light | ( | const int & | number,
|  | const Light & | light
| ) |  |

virtual

Set a particular Light.

Implements Zeni::Video.

Definition at line 370 of file Video_GL_Fixed.cpp.

References GL_LIGHT0, GL_LIGHT1, GL_LIGHT2, GL_LIGHT3, GL_LIGHT4, GL_LIGHT5, GL_LIGHT6, GL_LIGHT7, and Zeni::Light::set().

void Zeni::Video_GL_Fixed::set_lighting | ( | const bool & | on = `true` | ) |

virtual

Set lighting on/off.

Implements Zeni::Video.

Definition at line 355 of file Video_GL_Fixed.cpp.

References GL_LIGHTING, glDisable, and glEnable.

void Zeni::Video_GL_Fixed::set_Material | ( | const Material & | material | ) |

virtual

Set a Material.

Implements Zeni::Video.

Definition at line 410 of file Video_GL_Fixed.cpp.

References Zeni::Material::set().

void Zeni::Video_GL_Fixed::set_program | ( | Program & | program | ) |

virtual

Enable a program.

Implements Zeni::Video.

Definition at line 431 of file Video_GL_Fixed.cpp.

References glUseProgramObjectARB, and Zeni::Program::link().

void Zeni::Video_GL_Fixed::set_projection_matrix | ( | const Matrix4f & | projection | ) |

virtual

Set the projection Matrix4f.

Implements Zeni::Video.

Definition at line 561 of file Video_GL_Fixed.cpp.

References GL_PROJECTION, glLoadMatrixf, and glMatrixMode.

void Zeni::Video_GL_Fixed::set_render_target | ( | Texture & | texture | ) |

virtual

Set a render target.

Implements Zeni::Video.

Definition at line 440 of file Video_GL_Fixed.cpp.

References Zeni::Texture_GL::get_size(), GL_COLOR_ATTACHMENT0_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_DEPTH_COMPONENT16, GL_FRAMEBUFFER_EXT, GL_RENDERBUFFER_EXT, GL_TEXTURE_2D, glBindFramebufferEXT, glBindRenderbufferEXT, glFramebufferRenderbufferEXT, glFramebufferTexture2DEXT, glGenFramebuffersEXT, glGenRenderbuffersEXT, glRenderbufferStorageEXT, Zeni::Point2i::x, and Zeni::Point2i::y.

void Zeni::Video_GL_Fixed::set_vertical_sync | ( | const bool & | on | ) |

virtual

Set vertical_sync on/off.

Implements Zeni::Video.

Definition at line 244 of file Video_GL_Fixed.cpp.

References APIENTRY, BOOL(), GL_EXTENSIONS, glGetString, int, SDL_ClearError(), SDL_GL_SetAttribute(), SDL_GL_SetSwapInterval(), and wglSwapIntervalEXT.

void Zeni::Video_GL_Fixed::set_view_matrix | ( | const Matrix4f & | view | ) |

virtual

Set the view Matrix4f.

Implements Zeni::Video.

Definition at line 554 of file Video_GL_Fixed.cpp.

References GL_MODELVIEW, glLoadMatrixf, and glMatrixMode.

void Zeni::Video_GL_Fixed::set_viewport | ( | const std::pair< Point2i, Point2i > & | viewport = `std::make_pair(Point2i(), get_Video().get_render_target_size())` | ) |

virtual

Set the viewport.

Implements Zeni::Video.

Definition at line 573 of file Video_GL_Fixed.cpp.

References Zeni::get_Window(), and glViewport.

void Zeni::Video_GL_Fixed::set_ztest | ( | const bool & | enabled | ) |

virtual

Enable or disable testing of the Z-Buffer.

Implements Zeni::Video.

Definition at line 290 of file Video_GL_Fixed.cpp.

References GL_DEPTH_TEST, GL_LEQUAL, glDepthFunc, glDisable, and glEnable.

void Zeni::Video_GL_Fixed::set_zwrite | ( | const bool & | enabled | ) |

virtual

Enable or disable writing to the Z-Buffer.

Implements Zeni::Video.

Definition at line 284 of file Video_GL_Fixed.cpp.

References glDepthMask.

void Zeni::Video_GL_Fixed::transform_scene | ( | const Matrix4f & | transformation | ) |

virtual

Transform the scene.

Implements Zeni::Video.

Definition at line 546 of file Video_GL_Fixed.cpp.

References glMultMatrixf.

void Zeni::Video_GL_Fixed::translate_scene | ( | const Vector3f & | direction | ) |

virtual

Translate the scene.

Implements Zeni::Video.

Definition at line 534 of file Video_GL_Fixed.cpp.

References glTranslatef, Zeni::Vector3f::i, Zeni::Vector3f::j, and Zeni::Vector3f::k.

void Zeni::Video_GL_Fixed::unapply_Texture | ( |  | ) |

virtual

Unapply a texture.

Implements Zeni::Video.

Definition at line 351 of file Video_GL_Fixed.cpp.

References GL_TEXTURE_2D, and glDisable.

Referenced by Zeni::Material::unset().

void Zeni::Video_GL_Fixed::uninit | ( |  | ) |

protectedvirtual

Reimplemented from Zeni::Singleton< Video >.

Definition at line 823 of file Video_GL_Fixed.cpp.

References SDL_GL_DeleteContext(), and ShDestruct().

void Zeni::Video_GL_Fixed::unset_Fog | ( |  | ) |

virtual

Unset Fog.

Implements Zeni::Video.

Definition at line 425 of file Video_GL_Fixed.cpp.

References GL_FOG, and glDisable.

void Zeni::Video_GL_Fixed::unset_Light | ( | const int & | number | ) |

virtual

Unset a particular Light.

Implements Zeni::Video.

Definition at line 390 of file Video_GL_Fixed.cpp.

References GL_LIGHT0, GL_LIGHT1, GL_LIGHT2, GL_LIGHT3, GL_LIGHT4, GL_LIGHT5, GL_LIGHT6, GL_LIGHT7, and glDisable.

void Zeni::Video_GL_Fixed::unset_Material | ( | const Material & | material | ) |

virtual

Unset a Material.

Implements Zeni::Video.

Definition at line 414 of file Video_GL_Fixed.cpp.

References Zeni::Material::unset().

void Zeni::Video_GL_Fixed::unset_program | ( |  | ) |

virtual

Disable a program.

Implements Zeni::Video.

Definition at line 436 of file Video_GL_Fixed.cpp.

References glUseProgramObjectARB.

void Zeni::Video_GL_Fixed::unset_render_target | ( |  | ) |

virtual

Unset a render target.

Implements Zeni::Video.

Definition at line 478 of file Video_GL_Fixed.cpp.

References GL_FRAMEBUFFER_EXT, GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_NEAREST, GL_NEAREST_MIPMAP_NEAREST, GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, glBindFramebufferEXT, glBindTexture, glDisable, glEnable, glGenerateMipmapEXT, and glTexParameteri.

## Friends And Related Function Documentation

Video& get_Video | ( |  | ) |

friend

Get access to the singleton.

Definition at line 149 of file Video.cpp.

friend class Video

friend

Definition at line 71 of file Video_GL_Fixed.h.

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

- zenilib/jni/external/zenilib/zeni_graphics/Zeni/Video_GL_Fixed.h
- zenilib/jni/external/zenilib/zeni_graphics/Video_GL_Fixed.cpp
- zenilib/jni/external/zenilib/zeni_graphics/Zeni/Video_GL_Fixed.hxx