32 #ifndef ZENI_VIDEO_GL_SHADER_H
33 #define ZENI_VIDEO_GL_SHADER_H
40 #if defined(REQUIRE_GL_ES)
42 #define GL_ARRAY_BUFFER_ARB GL_ARRAY_BUFFER
43 #define GL_STATIC_DRAW_ARB GL_STATIC_DRAW
44 #define glBindFramebufferEXT glBindFramebuffer
45 #define glBindRenderbufferEXT glBindRenderbuffer
47 #define glFramebufferRenderbufferEXT glFramebufferRenderbuffer
48 #define glFramebufferTexture2DEXT glFramebufferTexture2D
49 #define glGenFramebuffersEXT glGenFramebuffers
50 #define glGenRenderbuffersEXT glGenRenderbuffers
51 #define glRenderbufferStorageEXT glRenderbufferStorage
57 typedef _XDisplay Display;
58 typedef long unsigned int XID;
83 bool begin_prerender();
87 void clear_depth_buffer();
90 int get_maximum_anisotropy()
const;
91 bool has_vertex_buffers()
const;
94 void set_2d_view(
const std::pair<Point2f, Point2f> & ,
95 const std::pair<Point2i, Point2i> & = std::make_pair(
Point2i(),
get_Video().get_render_target_size()),
96 const bool &fix_aspect_ratio =
false);
97 void set_3d_view(
const Camera & ,
98 const std::pair<Point2i, Point2i> & = std::make_pair(
Point2i(),
get_Video().get_render_target_size()));
99 void set_backface_culling(
const bool &on);
100 void set_vertical_sync(
const bool &on);
101 void set_zwrite(
const bool &
enabled);
102 void set_ztest(
const bool &
enabled);
103 void set_alpha_test(
const bool &
enabled,
const TEST &test,
const float &
value);
109 void apply_Texture(
const unsigned long &
id);
111 void unapply_Texture();
114 void set_lighting(
const bool &on =
true);
115 void set_ambient_lighting(
const Color &
color);
116 void set_Light(
const int &number,
const Light &
light);
117 void unset_Light(
const int &number);
118 void set_Material(
const Material &material);
119 void unset_Material(
const Material &material);
122 void set_Fog(
const Fog &fog);
127 void unset_program();
131 void unset_render_target();
133 const Point2i & get_render_target_size()
const;
136 void select_world_matrix();
137 void push_world_stack();
138 void pop_world_stack();
139 void translate_scene(
const Vector3f &direction);
140 void rotate_scene(
const Vector3f &about,
const float &radians);
141 void scale_scene(
const Vector3f &factor);
142 void transform_scene(
const Matrix4f &transformation);
145 Point2f get_pixel_offset()
const;
146 void set_view_matrix(
const Matrix4f &view);
147 void set_projection_matrix(
const Matrix4f &projection);
148 void set_viewport(
const std::pair<Point2i, Point2i> &viewport =
152 Texture * load_Texture(
const String &
filename,
const bool &repeat,
const bool &lazy_loading =
false);
156 const float &glyph_height,
const float &virtual_screen_height);
162 #if SDL_VERSION_ATLEAST(1,3,0)
163 virtual void alert_window_destroyed();
171 #if SDL_VERSION_ATLEAST(1,3,0)
175 #if !defined(REQUIRE_GL_ES) && defined(_LINUX)
180 int m_maximum_anisotropy;
185 #ifdef MANUAL_GL_VSYNC_DELAY
An Abstraction of a Light.
const GLubyte GLuint GLuint GLuint GLuint alpha GLboolean GLboolean GLboolean GLboolean alpha GLint GLint GLsizei GLsizei GLenum type GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint border GLenum GLint GLint GLint GLint GLint GLsizei GLsizei height GLsizei GLsizei GLenum GLenum const GLvoid *pixels GLenum GLint GLint GLint GLint j2 GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum light
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
The Video Rendering Singleton.
GLenum GLsizei const GLuint GLboolean enabled
void apply_Texture(const String &name)
Apply a texture by name.
static void init(struct bs2b *bs2b)
static void render(const Vertex_Buffer_Macrorenderer ¯orenderer, std::vector< Vertex_Buffer::Vertex_Buffer_Range * > &descriptors)
An Abstraction of a Material.
void * SDL_GLContext
An opaque handle to an OpenGL context.
EGLImageKHR EGLint * name
void apply_Texture(const String &name)
Apply a texture by name.
An Abstraction of a Texture.
A Featureful 3-Space Vector Class.
The OpenGL Rendering System.
GLbitfield GLuint program
void(* PFNGLXSWAPINTERVALEXTPROC)(Display *dpy, GLXDrawable drawable, int interval)
int(* PFNGLXSWAPINTERVALSGIPROC)(int interval)
A Vertex_Buffer that accepts Triangle and Quadrilaterals.
GLenum GLenum GLuint texture
EGLSurface EGLint void ** value
A base class for Vertex_Shader and Fragment_Shader.
Video & get_Video()
Get access to the singleton.
A Featureful 4-Space Matrix Class.
A 2D Point represented with floats.
A 2D Point represented with integers.