zenilib
0.5.3.0
|
The OpenGL Rendering System. More...
#include <Video_GL_Shader.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... | |
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 | 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 |
The OpenGL Rendering System.
This class supports OpenGL-specific rendering.
Contact: bazal d@ze nipex .com
Definition at line 70 of file Video_GL_Shader.h.
Apply a texture by name.
Definition at line 108 of file Video_GL_Shader.h.
References Zeni::Video::apply_Texture().
Referenced by Zeni::Material::set().
Apply a texture by id.
Implements Zeni::Video.
Definition at line 337 of file Video_GL_Shader.cpp.
References Zeni::Textures::apply_Texture(), and Zeni::get_Textures().
Apply a texture by id.
Implements Zeni::Video.
Definition at line 341 of file Video_GL_Shader.cpp.
References Zeni::Texture::apply_Texture().
|
virtual |
Must be called before begin_render.
Implements Zeni::Video.
Definition at line 91 of file Video_GL_Shader.cpp.
References assert, Zeni::get_Fonts(), Zeni::get_Textures(), glFinish, glFlush, and Zeni::Database< TYPE >::unlose_resources().
|
virtual |
Must be called before all rendering functions; Returns true if rendering can proceed.
Implements Zeni::Video.
Definition at line 106 of file Video_GL_Shader.cpp.
References assert, Zeni::Video::get_clear_Color(), Zeni::get_Window(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_FALSE, GL_TRUE, glClear, glDepthMask, glViewport, Zeni::Video::is_zwrite_enabled(), and set_clear_Color().
|
virtual |
Can reset the depth buffer at any time if necessary.
Implements Zeni::Video.
Definition at line 179 of file Video_GL_Shader.cpp.
References GL_DEPTH_BUFFER_BIT, GL_FALSE, GL_TRUE, glClear, glDepthMask, and Zeni::Video::is_zwrite_enabled().
|
virtual |
Clear the viewport.
Implements Zeni::Video.
Definition at line 502 of file Video_GL_Shader.cpp.
References GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, glClear, and set_clear_Color().
|
virtual |
Function for creating a Font; used internally by Fonts.
Implements Zeni::Video.
Definition at line 588 of file Video_GL_Shader.cpp.
Create a Fragment_Shader from a file.
Implements Zeni::Video.
Definition at line 600 of file Video_GL_Shader.cpp.
References Zeni::Video::compile_glsles_shader(), Zeni::Shader::FRAGMENT, and Zeni::Video::m_fragment_compiler.
|
virtual |
Create a Program from a file.
Implements Zeni::Video.
Definition at line 604 of file Video_GL_Shader.cpp.
Function for creating a Texture from an Image.
Implements Zeni::Video.
Definition at line 580 of file Video_GL_Shader.cpp.
|
virtual |
Function for creating a Texture for render-to-texture.
Implements Zeni::Video.
Definition at line 584 of file Video_GL_Shader.cpp.
|
virtual |
Function for creating a Vertex_Buffer_Renderer.
Implements Zeni::Video.
Definition at line 592 of file Video_GL_Shader.cpp.
Create a Vertex Shader from a file.
Implements Zeni::Video.
Definition at line 596 of file Video_GL_Shader.cpp.
References Zeni::Video::compile_glsles_shader(), Zeni::Video::m_vertex_compiler, and Zeni::Shader::VERTEX.
|
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 121 of file Video_GL_Shader.cpp.
References Zeni::Time::get_ticks_since(), Zeni::Timer::get_time(), Zeni::get_Timer(), Zeni::Video::get_vertical_sync(), Zeni::get_Window(), SDL_Delay(), SDL_GL_SwapWindow(), and u.
|
virtual |
Get the current level of anisotrophy.
Implements Zeni::Video.
Definition at line 187 of file Video_GL_Shader.cpp.
|
virtual |
Get the pixel offset in the 2d view.
Implements Zeni::Video.
Definition at line 544 of file Video_GL_Shader.cpp.
Get the dimensions of the render target.
Implements Zeni::Video.
Definition at line 507 of file Video_GL_Shader.cpp.
References Zeni::Window::get_size(), Zeni::Texture_GL::get_size(), and Zeni::get_Window().
|
virtual |
Determine whether Vertex_Buffers are supported.
Implements Zeni::Video.
Definition at line 191 of file Video_GL_Shader.cpp.
References GLEW_ARB_vertex_buffer_object.
|
protected |
Generate vertex and fragment shader compilers
Definition at line 608 of file Video_GL_Shader.cpp.
References Zeni::Core::assert_no_error(), Zeni::Video::get_alpha_test_function(), Zeni::Video::get_alpha_test_value(), Zeni::Video::get_ambient_lighting(), Zeni::Video::get_backface_culling(), Zeni::Video::get_clear_Color(), Zeni::Video::get_Color(), Zeni::Video::get_Fog(), Zeni::Video::get_Light(), Zeni::Video::get_lighting(), Zeni::Video::get_multisampling(), Zeni::Video::get_vertical_sync(), 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, Zeni::Video::is_alpha_test_enabled(), Zeni::Video::is_ztest_enabled(), Zeni::Video::is_zwrite_enabled(), Zeni::Video::m_fragment_compiler, Zeni::Video::m_vertex_compiler, 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_CONTEXT_PROFILE_COMPATIBILITY, SDL_GL_CONTEXT_PROFILE_MASK, 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, Zeni::Video::set_2d(), set_alpha_test(), set_ambient_lighting(), set_backface_culling(), set_clear_Color(), set_Color(), set_Fog(), set_Light(), set_lighting(), set_vertical_sync(), set_ztest(), set_zwrite(), SH_FRAGMENT_SHADER, SH_GLES2_SPEC, SH_GLSL_OUTPUT, SH_VERTEX_SHADER, ShConstructCompiler(), and ShInitBuiltInResources().
|
virtual |
Function for loading a Texture; used internally by Textures.
Implements Zeni::Video.
Definition at line 576 of file Video_GL_Shader.cpp.
|
virtual |
Pop a model view matrix off the stack.
Implements Zeni::Video.
Definition at line 523 of file Video_GL_Shader.cpp.
References GL_MODELVIEW, glMatrixMode, and glPopMatrix.
|
virtual |
Push a model view matrix onto the stack.
Implements Zeni::Video.
Definition at line 518 of file Video_GL_Shader.cpp.
References GL_MODELVIEW, glMatrixMode, and glPushMatrix.
|
virtual |
Render a Renderable.
Implements Zeni::Video.
Definition at line 158 of file Video_GL_Shader.cpp.
References Zeni::Renderable::post_render(), Zeni::Renderable::pre_render(), and Zeni::Renderable::render_to().
Rotate the scene.
Implements Zeni::Video.
Definition at line 532 of file Video_GL_Shader.cpp.
References glRotatef, Zeni::Vector3f::i, Zeni::Vector3f::j, Zeni::Vector3f::k, and Zeni::Global::pi.
Scale the scene.
Implements Zeni::Video.
Definition at line 536 of file Video_GL_Shader.cpp.
References glScalef, Zeni::Vector3f::i, Zeni::Vector3f::j, and Zeni::Vector3f::k.
Referenced by set_2d_view().
|
virtual |
Select the world (model view) matrix; Call before [translate/rotate/scale] scene.
Implements Zeni::Video.
Definition at line 514 of file Video_GL_Shader.cpp.
References GL_MODELVIEW, and glMatrixMode.
Referenced by set_2d_view().
|
virtual |
Set a 2D view for a viewport.
Implements Zeni::Video.
Definition at line 195 of file Video_GL_Shader.cpp.
References Zeni::Video::get_backface_culling(), GL_BACK, GL_FRONT, glCullFace, scale_scene(), select_world_matrix(), Zeni::Video::set_2d_view(), and translate_scene().
|
virtual |
Set a 3D view for a viewport.
Implements Zeni::Video.
Definition at line 211 of file Video_GL_Shader.cpp.
References Zeni::Video::get_backface_culling(), GL_BACK, GL_FRONT, glCullFace, and Zeni::Video::set_3d_view().
|
virtual |
Set the alpha test.
Implements Zeni::Video.
Definition at line 295 of file Video_GL_Shader.cpp.
References assert, GL_ALPHA_TEST, GL_ALWAYS, GL_EQUAL, GL_GEQUAL, GL_GREATER, GL_LEQUAL, GL_LESS, GL_NEVER, GL_NOTEQUAL, glAlphaFunc, glDisable, glEnable, Zeni::Video::set_alpha_test(), Zeni::Video::ZENI_ALWAYS, Zeni::Video::ZENI_EQUAL, Zeni::Video::ZENI_GREATER, Zeni::Video::ZENI_GREATER_OR_EQUAL, Zeni::Video::ZENI_LESS, Zeni::Video::ZENI_LESS_OR_EQUAL, Zeni::Video::ZENI_NEVER, and Zeni::Video::ZENI_NOT_EQUAL.
Referenced by init().
Set ambient lighting on/off.
Implements Zeni::Video.
Definition at line 358 of file Video_GL_Shader.cpp.
References GL_LIGHT_MODEL_AMBIENT, glLightModelfv, and Zeni::Video::set_ambient_lighting().
Referenced by init().
Set backface culling on/off.
Implements Zeni::Video.
Definition at line 222 of file Video_GL_Shader.cpp.
References GL_BACK, GL_CULL_FACE, GL_FRONT, glCullFace, glDisable, glEnable, and Zeni::Video::set_backface_culling().
Referenced by init().
Set the blank background color.
Implements Zeni::Video.
Definition at line 331 of file Video_GL_Shader.cpp.
References Zeni::Color::a, Zeni::Color::b, Zeni::Color::g, glClearColor, Zeni::Color::r, and Zeni::Video::set_clear_Color().
Referenced by begin_render(), clear_render_target(), and init().
Set the current color.
Implements Zeni::Video.
Definition at line 325 of file Video_GL_Shader.cpp.
References Zeni::Color::a, Zeni::Color::b, Zeni::Color::g, glColor4f, Zeni::Color::r, and Zeni::Video::set_Color().
Referenced by init(), and Zeni::Material::set().
Set Fog.
Implements Zeni::Video.
Definition at line 412 of file Video_GL_Shader.cpp.
References GL_FOG, glEnable, Zeni::Fog::set(), and Zeni::Video::set_Fog().
Referenced by init().
Set a particular Light.
Implements Zeni::Video.
Definition at line 364 of file Video_GL_Shader.cpp.
References GL_LIGHT0, GL_LIGHT1, GL_LIGHT2, GL_LIGHT3, GL_LIGHT4, GL_LIGHT5, GL_LIGHT6, GL_LIGHT7, Zeni::Light::set(), and Zeni::Video::set_Light().
Referenced by init().
Set lighting on/off.
Implements Zeni::Video.
Definition at line 349 of file Video_GL_Shader.cpp.
References GL_LIGHTING, glDisable, glEnable, and Zeni::Video::set_lighting().
Referenced by init().
Set a Material.
Implements Zeni::Video.
Definition at line 404 of file Video_GL_Shader.cpp.
References Zeni::Material::set().
Enable a program.
Implements Zeni::Video.
Definition at line 425 of file Video_GL_Shader.cpp.
References glUseProgram(), and Zeni::Program::link().
Set the projection Matrix4f.
Implements Zeni::Video.
Definition at line 555 of file Video_GL_Shader.cpp.
References GL_PROJECTION, glLoadMatrixf, glMatrixMode, Zeni::Video::is_3d(), Zeni::Matrix4f::Scale(), and Zeni::Video::set_projection_matrix().
Set a render target.
Implements Zeni::Video.
Definition at line 434 of file Video_GL_Shader.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.
Set vertical_sync on/off.
Implements Zeni::Video.
Definition at line 238 of file Video_GL_Shader.cpp.
References APIENTRY, Zeni::Core::assert_no_error(), BOOL(), GL_EXTENSIONS, glGetString, int, SDL_ClearError(), SDL_GL_SetAttribute(), SDL_GL_SetSwapInterval(), Zeni::Video::set_vertical_sync(), and wglSwapIntervalEXT.
Referenced by init().
Set the view Matrix4f.
Implements Zeni::Video.
Definition at line 548 of file Video_GL_Shader.cpp.
References GL_MODELVIEW, glLoadMatrixf, glMatrixMode, and Zeni::Video::set_view_matrix().
|
virtual |
Set the viewport.
Implements Zeni::Video.
Definition at line 567 of file Video_GL_Shader.cpp.
References Zeni::get_Window(), glViewport, and Zeni::Video::set_viewport().
Enable or disable testing of the Z-Buffer.
Implements Zeni::Video.
Definition at line 284 of file Video_GL_Shader.cpp.
References GL_DEPTH_TEST, GL_LEQUAL, glDepthFunc, glDisable, glEnable, and Zeni::Video::set_ztest().
Referenced by init().
Enable or disable writing to the Z-Buffer.
Implements Zeni::Video.
Definition at line 278 of file Video_GL_Shader.cpp.
References glDepthMask, and Zeni::Video::set_zwrite().
Referenced by init().
Transform the scene.
Implements Zeni::Video.
Definition at line 540 of file Video_GL_Shader.cpp.
References glMultMatrixf.
Translate the scene.
Implements Zeni::Video.
Definition at line 528 of file Video_GL_Shader.cpp.
References glTranslatef, Zeni::Vector3f::i, Zeni::Vector3f::j, and Zeni::Vector3f::k.
Referenced by set_2d_view().
|
virtual |
Unapply a texture.
Implements Zeni::Video.
Definition at line 345 of file Video_GL_Shader.cpp.
References GL_TEXTURE_2D, and glDisable.
Referenced by Zeni::Material::unset().
|
protectedvirtual |
Reimplemented from Zeni::Singleton< Video >.
Definition at line 794 of file Video_GL_Shader.cpp.
References Zeni::Video::m_fragment_compiler, Zeni::Video::m_vertex_compiler, SDL_GL_DeleteContext(), and ShDestruct().
|
virtual |
Unset Fog.
Implements Zeni::Video.
Definition at line 419 of file Video_GL_Shader.cpp.
References GL_FOG, glDisable, and Zeni::Video::unset_Fog().
Unset a particular Light.
Implements Zeni::Video.
Definition at line 384 of file Video_GL_Shader.cpp.
References GL_LIGHT0, GL_LIGHT1, GL_LIGHT2, GL_LIGHT3, GL_LIGHT4, GL_LIGHT5, GL_LIGHT6, GL_LIGHT7, glDisable, and Zeni::Video::unset_Light().
Unset a Material.
Implements Zeni::Video.
Definition at line 408 of file Video_GL_Shader.cpp.
References Zeni::Material::unset().
|
virtual |
Disable a program.
< DEPRECATED: Requires SDL_GL_CONTEXT_PROFILE_COMPATIBILITY
Implements Zeni::Video.
Definition at line 430 of file Video_GL_Shader.cpp.
References glUseProgram().
|
virtual |
Unset a render target.
Implements Zeni::Video.
Definition at line 472 of file Video_GL_Shader.cpp.
References Zeni::Textures::get_bilinear_filtering(), Zeni::Textures::get_mipmapping(), 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.
|
friend |
Definition at line 71 of file Video_GL_Shader.h.