Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

renderer_c Class Reference

Renderer class. More...

#include <render.h>


Public Methods

void set_viewpos (const vec3_t pos)
 set point of view

vec3_c get_viewpos ()
 get point of view

void set_viewtarget (const vec3_t pos)
 set target

vec3_c get_viewtarget ()
 get target

void set_viewup (const vec3_t pos)
 set up vector

vec3_c get_viewup ()
 get up vector

vec3_c get_viewdir ()
 get forward vector

vec3_c get_viewright ()
 get right vector

vec3_c get_viewup2 ()
 get transformed up vector

void render_verts (const vertex_t *verts, ulong count, ushort type)
void render_quad (const vertex_t *verts)
void draw_pic (float x1, float y1, float x2, float y2, float u1, float v1, float u2, float v2, sshort texture, ushort blendtype)
void draw_pic_shader (float x1, float y1, float x2, float y2, float u1, float v1, float u2, float v2, const shader_t *shader)
void draw_rotated_pic (float angle, float x1, float y1, float width, float height, float u1, float v1, float u2, float v2, sshort texture, ushort blendtype)
 draw a rotated picture

void draw_rotated_pic_shader (float angle, float x1, float y1, float width, float height, float u1, float v1, float u2, float v2, const shader_t *shader)
 draw a rotated picture

void draw_billboard (const vec3_t pos, const vec2_t size, sshort texture, ushort blendtype)
 Draw a 3d billboard.

void draw_billboard_shader (const vec3_t pos, const vec2_t size, const shader_t *shader)
 Draw a 3d billboard.

void draw_lensflares (const lensflare_t *flare, const vec2_t pos, ulong count, float intensity)
float draw_char (float x, float y, float size, char c, const font_t *fnt)
float get_stringwidth (const char *c, const font_t *fnt)
ushort get_string_pixelwidth (const char *c, const font_t *fnt)
void draw_string (float x, float y, float size, const char *c, const font_t *fnt, ulong flags)
 draw a string

void set_color (color_t color)
 set current active color

color_t get_color ()
 get current active color

void set_blending (ushort blendtype)
 set current blending (alpha, additive etc.)

void set_zbuffer (ushort buftype)
 set current zbuffer testing

void set_zwrite (bool enable)
 enable/disable zbuffer write

void set_culling (ushort cullmode)
 set current culling

void set_fog (bool enable)
 enable/disable fog

void set_fog_params (float near, float far, color_t color)
 set current fog parameters

void set_target_texture (sshort n)
 render to texture

void set_target_backbuffer ()
 render to backbuffer

void set_spheremapping (bool enable)
 enable/disable sphere mapping


Detailed Description

Main rendering and renderstate class.

Definition at line 224 of file render.h.


Member Function Documentation

float draw_char float    x,
float    y,
float    size,
char    c,
const font_t   fnt
 

draw a character Draws a single character. Returns the width of the character. Using Alphablending.

Definition at line 126 of file r_font.cpp.

References font_s::shader.

void draw_lensflares const lensflare_t   flare,
const vec2_t    pos,
ulong    count,
float    intensity
 

draw lensflares Draws a set of lensflares. Use _vector_project to convert world coordinates intor screen coordinates.

Definition at line 248 of file r_draw.cpp.

References color_interpolate(), vec3_c::set(), vec2_t, VECT_X, and VECT_Y.

void draw_pic float    x1,
float    y1,
float    x2,
float    y2,
float    u1,
float    v1,
float    u2,
float    v2,
sshort    texture,
ushort    blendtype
 

draw a picture Draws a 2d picture on the screen using a given texture.

Definition at line 60 of file r_draw.cpp.

void draw_pic_shader float    x1,
float    y1,
float    x2,
float    y2,
float    u1,
float    v1,
float    u2,
float    v2,
const shader_t   shader
 

draw a picture Draws a 2d picture on the screen using a given shader.

Definition at line 111 of file r_draw.cpp.

ushort get_string_pixelwidth const char *    c,
const font_t   fnt
 

get a string's width in pixels returns the width of a string in pixels

Definition at line 187 of file r_font.cpp.

References font_s::widths.

float get_stringwidth const char *    c,
const font_t   fnt
 

get a string's width returns the width of a string in worldspace

Definition at line 173 of file r_font.cpp.

References font_s::width, and font_s::widths.

void render_quad const vertex_t   verts
 

Render a quad Renders 4 vertices as a PT_TRIANGLEFAN

Definition at line 552 of file r_main.cpp.

void render_verts const vertex_t   verts,
ulong    count,
ushort    type
 

Render vertices Renders vertices, applying the current color.

Definition at line 364 of file r_main.cpp.

References shaderpass_s::angle, shaderpass_s::blendtype, shaderpass_s::color, shaderpass_s::color1, shaderpass_s::color2, color_from_floats(), color_interpolate(), color_to_vec(), shaderpass_s::colorwave, shader_s::dynamic, shaderpass_s::fog, shaderpass_s::ignorediffuse, shaderpass_s::magfilter, shaderpass_s::matrix, shaderpass_s::minfilter, shaderpass_s::offsetx, shaderpass_s::offsety, shader_s::passcount, shader_s::passes, shaderpass_s::rotation, shaderpass_s::scalewavex, shaderpass_s::scalewavey, shaderpass_s::scalex, shaderpass_s::scaley, shaderpass_s::scrollx, shaderpass_s::scrolly, shader_get_waveform_frac(), shaderpass_s::shiny, shaderpass_s::soffsetx, shaderpass_s::soffsety, shaderpass_s::texture, shaderpass_s::texwrapu, shaderpass_s::texwrapv, shader_waveform_s::type, and vec4_t.


The documentation for this class was generated from the following files:
Generated on Wed Dec 18 15:48:49 2002 for omicron engine by doxygen1.2.18