Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::Graphics::View Class Reference

Root drawing device (context). More...

#include <View.h>

Collaboration diagram for Teddy::Graphics::View:

Collaboration graph
[legend]
List of all members.

Public Methods

 View (int width, int height, Teddy::MixIn::Options options)
 View constructor. More...

void reshape (int w, int h)
 Surface reshape callback function. More...

void display ()
 Displaying surface. More...

void displayPs (char *filename)
 Displaying surface. More...

const Teddy::Maths::TVector2<
int > & 
getSize () const
float getRatio ()
 Return aspect ratio of View. More...

int getFrames ()
float getLastFrame ()
float getFps ()
float getFpsTime ()
float getLastTime ()
void setWindowManager (Teddy::PhysicalComponents::WindowManager *wm)
Teddy::Maths::Matrix getOrthoMatrix (float left, float right, float bottom, float top, float nearval, float farval)
void setProjectionMatrix ()
 Set projection matrix to identity. More...

void setProjectionMatrix (const Teddy::Maths::Matrix &m)
void setModelViewMatrix ()
 Set modelview matrix to identity. More...

void setModelViewMatrix (const Teddy::Maths::Matrix &m)
void setTextureMatrix (const Teddy::Maths::Matrix &m)
void setTexture (Texture *t)
void setCull (unsigned long dir)
void beginPoints ()
void beginLines ()
void beginLineStrip ()
void beginLineLoop ()
void beginTriangles ()
void beginTriangleStrip ()
void beginTriangleFan ()
void beginQuads ()
void beginQuadStrip ()
void beginPolygon ()
void end ()
void vertex (const Teddy::Maths::TVector< float > &v, const Teddy::Maths::TVector2< float > &t) const
void vertex (const Teddy::Maths::TVector2< float > &v, const Teddy::Maths::TVector2< float > &t) const
void vertex (const float x, const float y) const
void vertex (const Teddy::Maths::TVector< int > &v) const
void vertex (const Teddy::Maths::TVector< float > &v) const
void vertex (const Teddy::Maths::TVector< double > &v) const
void vertex (const Teddy::Maths::TVector2< int > &v) const
void vertex (const Teddy::Maths::TVector2< float > &v) const
void vertex (const Teddy::Maths::TVector2< double > &v) const
void normal (const Teddy::Maths::TVector< int > &n) const
void normal (const Teddy::Maths::TVector< float > &n) const
void normal (const Teddy::Maths::TVector< double > &n) const
void normal (const Teddy::Maths::TVector2< int > &n) const
void normal (const Teddy::Maths::TVector2< float > &n) const
void normal (const Teddy::Maths::TVector2< double > &n) const
void texture (const Teddy::Maths::TVector< int > &t) const
void texture (const Teddy::Maths::TVector< float > &t) const
void texture (const Teddy::Maths::TVector< double > &t) const
void texture (const Teddy::Maths::TVector2< int > &t) const
void texture (const Teddy::Maths::TVector2< float > &t) const
void texture (const Teddy::Maths::TVector2< double > &t) const
void color (const float r, const float g, const float b, const float a=1) const
void color (const Color &c) const
void begin2d ()
 View interface - Prepare Area for rendering 2D graphics. More...

void end2d ()
 View interface - End rendering 2D graphics. More...

void printExtensions ()
bool hasExtension (const char *ext_name)
 Is the extension supported? More...

char * getExtensions ()
char * getVendor ()
char * getRenderer ()
char * getVersion ()
int getMaxTextureSize ()
int getMaxLights ()
Teddy::Maths::TVector< int > getMaxViewportDims ()
void drawString (const Teddy::Maths::TVector2< float > &pos, const char *str, Font *font)
void drawRect (const float x1, const float y1, const float x2, const float y2)
 Area Graphics interface - Draw non-filled rectangle - changed polygonmode.. More...

void drawFillRect (const float x1, const float y1, const float x2, const float y2)
 Area Graphics interface - Draw filled rectangle - changed polygonmode.. More...

void drawBiColRect (const float x1, const float y1, const float x2, const float y2, const Color &top_left, const Color &bottom_right)
 Area Graphics interface - Draw twocolor rectangle. More...

void blit (const Teddy::Maths::TVector2< float > &pos, Texture *t)
void setClear (bool clear)
void setClearColor (const Color &clear_color)
bool getClear ()
 Return clear status. More...

void begin3d ()
 View interface - Prepare Area for rendering 3D graphics. More...

void end3d ()
 View interface - End rendering 3D graphics. More...

void setState (const int feature, const bool state)
 Return viewport. More...

bool getState (const int feature)
void enable (const int feature)
 Enable OpenGL feature - only if not already enabled. More...

void disable (const int feature)
 Disable OpenGL feature - only if not already disabled. More...

void setPolygonMode (const unsigned int polygon_mode)
 Set gl polygon mode. More...

void setShadeModel (const unsigned int shade_model)
 Set gl shade model. More...

void setFrontFace (const unsigned int front_face)
void setBlendFunc (const unsigned int sfactor, const unsigned int dfactor)
 Set blending function. More...

void setClearDepth (const float depth)
void setFogStart (const float start)
 Set fog start. More...

void setFogEnd (const float end)
 Set fog end. More...

void setFogMode (const unsigned int mode)
 Set fog mode. More...

void setFogColor (float *color)
 Set fog color. More...

int getScreenWidth ()
int getScreenHeight ()
bool pngScreenshot (char *filename)
SDL_Surface * getSurface ()
 Access sdl surface directly. More...

Teddy::MixIn::OptionsgetOptions ()

Static Public Methods

void init ()
 Initialize graphics device feature mapping. More...

char * feature_to_str (int a)
 Return description for graphics feature. More...

unsigned int getCode (unsigned int a)
void check ()
 Check if there are any OpenGL errors. More...


Static Public Attributes

const int OPT_FRAME = (1ul<<1ul)
const int OPT_FULLSCREEN = (1ul<<2ul)
const int OPT_MULTI_WINDOW = (1ul<<3ul)
const int OPT_SEPARATE_SPECULAR_COLOR = (1ul<<4ul)
const int OPT_FONT_FIX = (1ul<<5ul)
const unsigned long CULL_FACE = 1
const unsigned long BLEND = 2
const unsigned long FOG = 3
const unsigned long NORMALIZE = 4
const unsigned long ALPHA_TEST = 5
const unsigned long DEPTH_TEST = 6
const unsigned long STENCIL_TEST = 7
const unsigned long SCISSOR_TEST = 8
const unsigned long TEXTURE_1D = 9
const unsigned long TEXTURE_2D = 10
const unsigned long POINT_SMOOTH = 11
const unsigned long LINE_SMOOTH = 12
const unsigned long POLYGON_SMOOTH = 13
const unsigned long POINT_OFFSET = 14
const unsigned long LINE_OFFSET = 15
const unsigned long POLYGON_OFFSET = 16
const unsigned long LIGHTING = 19
const unsigned long LIGHT0 = 20
const unsigned long LIGHT1 = 21
const unsigned long LIGHT2 = 22
const unsigned long LIGHT3 = 23
const unsigned long LIGHT4 = 24
const unsigned long LIGHT5 = 25
const unsigned long LIGHT6 = 26
const unsigned long LIGHT7 = 27
const unsigned long COLOR_MATERIAL = 28

Static Protected Methods

void displayOne ()
 View::display() calls active->display();. More...

void reshapeOne (int w, int h)

Protected Attributes

Teddy::MixIn::Options options
SDL_Surface * sdl_surface
Teddy::PhysicalComponents::WindowManagerwindow_manager
Texturecurrent_texture
Teddy::Maths::TVector2< int > size
int current_element
int current_matrix_mode
float ratio
bool clear
Color clear_color
unsigned int gl_blend_source_factor
unsigned int gl_blend_destination_factor
unsigned int gl_fog_mode
unsigned int gl_polygon_mode
unsigned int gl_shade_model
float gl_fog_start
float gl_fog_end
float gl_fog_color [4]
float gl_clear_depth
bool gl_feature [256]
int frames
unsigned long last_frame
unsigned long last_time
unsigned long last_fps
float fps
int screen_width
int screen_height

Static Protected Attributes

View * active = NULL
FILE * fp
 For png screenshot writer. More...


Static Private Attributes

unsigned int feature_to_code [256]

Detailed Description

Root drawing device (context).

View is a low level graphics device. A View must be created before any graphics related functions can be used.

Definition at line 65 of file View.h.


Constructor & Destructor Documentation

Teddy::Graphics::View::View int    width,
int    height,
Teddy::MixIn::Options    options
 

View constructor.

Parameters:
width  Witdh of view in pixels
height  Height of view in pixels
options  Options: any combination of

Definition at line 161 of file View.cpp.

References active, check, clear, clear_color, current_element, current_matrix_mode, current_texture, Teddy::SysSupport::dmsg, Teddy::SysSupport::fmsg, fps, frames, getExtensions, getRenderer, getVendor, getVersion, gl_blend_destination_factor, gl_blend_source_factor, gl_clear_depth, gl_feature, gl_fog_color, gl_fog_end, gl_fog_mode, gl_fog_start, GL_LIGHT_MODEL_COLOR_CONTROL_EXT, gl_polygon_mode, GL_SEPARATE_SPECULAR_COLOR_EXT, gl_shade_model, hasExtension, IntVector2, Teddy::MixIn::Options::isDisabled, Teddy::MixIn::Options::isEnabled, last_fps, last_frame, last_time, Teddy::SysSupport::M_GL, Teddy::SysSupport::M_INIT, Teddy::SysSupport::M_WM, Teddy::SysSupport::msg, OPT_FONT_FIX, OPT_FRAME, OPT_FULLSCREEN, OPT_SEPARATE_SPECULAR_COLOR, options, ratio, screen_height, screen_width, sdl_surface, setBlendFunc, setCull, and size.


Member Function Documentation

void Teddy::Graphics::View::begin2d  
 

View interface - Prepare Area for rendering 2D graphics.

Definition at line 567 of file View.cpp.

References BLEND, C_WHITE, check, color, CULL_FACE, DEPTH_TEST, disable, getOrthoMatrix, LIGHTING, setModelViewMatrix, setPolygonMode, setProjectionMatrix, and size.

void Teddy::Graphics::View::begin3d  
 

View interface - Prepare Area for rendering 3D graphics.

Definition at line 591 of file View.cpp.

void Teddy::Graphics::View::beginLineLoop  
 

Definition at line 66 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

void Teddy::Graphics::View::beginLines  
 

Definition at line 48 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

void Teddy::Graphics::View::beginLineStrip  
 

Definition at line 57 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

Referenced by drawBiColRect.

void Teddy::Graphics::View::beginPoints  
 

Definition at line 39 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

void Teddy::Graphics::View::beginPolygon  
 

Definition at line 119 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

void Teddy::Graphics::View::beginQuads  
 

Definition at line 101 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

Referenced by drawFillRect, and drawRect.

void Teddy::Graphics::View::beginQuadStrip  
 

Definition at line 110 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

void Teddy::Graphics::View::beginTriangleFan  
 

Definition at line 92 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

void Teddy::Graphics::View::beginTriangles  
 

Definition at line 74 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

void Teddy::Graphics::View::beginTriangleStrip  
 

Definition at line 83 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

void Teddy::Graphics::View::blit const Teddy::Maths::TVector2< float > &    pos,
Texture   t
 

void Teddy::Graphics::View::check   [static]
 

Check if there are any OpenGL errors.

Definition at line 684 of file View.cpp.

References Teddy::SysSupport::emsg, and Teddy::SysSupport::M_GL.

Referenced by begin2d, and View.

void Teddy::Graphics::View::color const Color   c const
 

Definition at line 191 of file ViewGL.cpp.

void Teddy::Graphics::View::color const float    r,
const float    g,
const float    b,
const float    a = 1
const
 

Definition at line 186 of file ViewGL.cpp.

Referenced by begin2d, drawBiColRect, and setFogColor.

void Teddy::Graphics::View::disable const int    feature
 

Disable OpenGL feature - only if not already disabled.

Definition at line 506 of file View.cpp.

References Teddy::SysSupport::dmsg, feature_to_str, getCode, gl_feature, and Teddy::SysSupport::M_GL.

Referenced by begin2d, and setState.

void Teddy::Graphics::View::display  
 

Displaying surface.

Definition at line 87 of file View.cpp.

References clear, clear_color, current_texture, Teddy::PhysicalComponents::WindowManager::draw, fps, frames, last_fps, last_frame, last_time, and window_manager.

void Teddy::Graphics::View::displayOne   [static, protected]
 

View::display() calls active->display();.

Definition at line 380 of file View.cpp.

References active.

Referenced by reshape.

void Teddy::Graphics::View::displayPs char *    filename
 

Displaying surface.

Definition at line 61 of file View.cpp.

References clear, clear_color, current_texture, Teddy::PhysicalComponents::WindowManager::draw, and window_manager.

void Teddy::Graphics::View::drawBiColRect const float    x1,
const float    y1,
const float    x2,
const float    y2,
const Color   top_left,
const Color   bottom_right
 

Area Graphics interface - Draw twocolor rectangle.

Definition at line 114 of file ViewDraw.cpp.

References beginLineStrip, color, end, and vertex.

void Teddy::Graphics::View::drawFillRect const float    x1,
const float    y1,
const float    x2,
const float    y2
 

Area Graphics interface - Draw filled rectangle - changed polygonmode..

Definition at line 67 of file ViewDraw.cpp.

References beginQuads, end, Teddy::SysSupport::M_GL, Teddy::SysSupport::msg, setPolygonMode, and vertex.

void Teddy::Graphics::View::drawRect const float    x1,
const float    y1,
const float    x2,
const float    y2
 

Area Graphics interface - Draw non-filled rectangle - changed polygonmode..

Definition at line 102 of file ViewDraw.cpp.

References beginQuads, end, setPolygonMode, and vertex.

void Teddy::Graphics::View::drawString const Teddy::Maths::TVector2< float > &    pos,
const char *    str,
Font   font
 

void Teddy::Graphics::View::enable const int    feature
 

Enable OpenGL feature - only if not already enabled.

Definition at line 495 of file View.cpp.

References Teddy::SysSupport::dmsg, feature_to_str, getCode, gl_feature, and Teddy::SysSupport::M_GL.

Referenced by setState.

void Teddy::Graphics::View::end  
 

Definition at line 128 of file ViewGL.cpp.

References current_element, Teddy::SysSupport::M_GL, and Teddy::SysSupport::msg.

Referenced by drawBiColRect, drawFillRect, drawRect, hasExtension, and setFogEnd.

void Teddy::Graphics::View::end2d  
 

View interface - End rendering 2D graphics.

Definition at line 586 of file View.cpp.

void Teddy::Graphics::View::end3d  
 

View interface - End rendering 3D graphics.

Definition at line 596 of file View.cpp.

char * Teddy::Graphics::View::feature_to_str int    a [static]
 

Return description for graphics feature.

Definition at line 104 of file ViewFeatures.cpp.

References ALPHA_TEST, BLEND, COLOR_MATERIAL, CULL_FACE, DEPTH_TEST, FOG, LIGHT0, LIGHT1, LIGHT2, LIGHT3, LIGHT4, LIGHT5, LIGHT6, LIGHT7, LIGHTING, LINE_OFFSET, LINE_SMOOTH, NORMALIZE, POINT_OFFSET, POINT_SMOOTH, POLYGON_OFFSET, POLYGON_SMOOTH, SCISSOR_TEST, STENCIL_TEST, TEXTURE_1D, and TEXTURE_2D.

Referenced by disable, enable, and getState.

bool Teddy::Graphics::View::getClear  
 

Return clear status.

Definition at line 449 of file View.cpp.

References clear.

unsigned int Teddy::Graphics::View::getCode unsigned int    a [static]
 

Definition at line 98 of file ViewFeatures.cpp.

References feature_to_code.

Referenced by disable, enable, and getState.

char * Teddy::Graphics::View::getExtensions  
 

Definition at line 369 of file ViewGL.cpp.

Referenced by hasExtension, and View.

float Teddy::Graphics::View::getFps  
 

Definition at line 403 of file View.cpp.

References fps.

float Teddy::Graphics::View::getFpsTime  
 

int Teddy::Graphics::View::getFrames  
 

Definition at line 393 of file View.cpp.

References frames.

float Teddy::Graphics::View::getLastFrame  
 

Definition at line 398 of file View.cpp.

References last_frame.

float Teddy::Graphics::View::getLastTime  
 

Definition at line 408 of file View.cpp.

References last_time.

int Teddy::Graphics::View::getMaxLights  
 

Definition at line 417 of file ViewGL.cpp.

int Teddy::Graphics::View::getMaxTextureSize  
 

Definition at line 410 of file ViewGL.cpp.

Teddy::Maths::TVector<int> Teddy::Graphics::View::getMaxViewportDims  
 

Teddy::MixIn::Options& Teddy::Graphics::View::getOptions   [inline]
 

Definition at line 214 of file View.h.

References options.

Matrix Teddy::Graphics::View::getOrthoMatrix float    left,
float    right,
float    bottom,
float    top,
float    nearval,
float    farval
 

Definition at line 540 of file View.cpp.

Referenced by begin2d.

float Teddy::Graphics::View::getRatio  
 

Return aspect ratio of View.

Returns:
Aspect ratio of View

Definition at line 389 of file View.cpp.

References ratio.

char * Teddy::Graphics::View::getRenderer  
 

Definition at line 388 of file ViewGL.cpp.

Referenced by View.

int Teddy::Graphics::View::getScreenHeight  
 

Definition at line 418 of file View.cpp.

References screen_height.

int Teddy::Graphics::View::getScreenWidth  
 

Definition at line 413 of file View.cpp.

References screen_width.

const Teddy::Maths::TVector2< int > & Teddy::Graphics::View::getSize   const
 

Definition at line 529 of file View.cpp.

References Teddy::SysSupport::dmsg, Teddy::SysSupport::M_WM, and size.

bool Teddy::Graphics::View::getState const int    feature
 

Definition at line 454 of file View.cpp.

References Teddy::SysSupport::dmsg, feature_to_str, getCode, gl_feature, and Teddy::SysSupport::M_GL.

SDL_Surface * Teddy::Graphics::View::getSurface  
 

Access sdl surface directly.

Definition at line 704 of file View.cpp.

References sdl_surface.

char * Teddy::Graphics::View::getVendor  
 

Definition at line 379 of file ViewGL.cpp.

Referenced by View.

char * Teddy::Graphics::View::getVersion  
 

Definition at line 399 of file ViewGL.cpp.

Referenced by View.

bool Teddy::Graphics::View::hasExtension const char *    ext_name
 

Is the extension supported?

Definition at line 713 of file View.cpp.

References end, and getExtensions.

Referenced by View.

void Teddy::Graphics::View::init   [static]
 

Initialize graphics device feature mapping.

Definition at line 67 of file ViewFeatures.cpp.

References ALPHA_TEST, BLEND, COLOR_MATERIAL, CULL_FACE, DEPTH_TEST, Teddy::SysSupport::dmsg, feature_to_code, FOG, LIGHT0, LIGHT1, LIGHT2, LIGHT3, LIGHT4, LIGHT5, LIGHT6, LIGHT7, LIGHTING, LINE_OFFSET, LINE_SMOOTH, Teddy::SysSupport::M_INIT, NORMALIZE, POINT_OFFSET, POINT_SMOOTH, POLYGON_OFFSET, POLYGON_SMOOTH, SCISSOR_TEST, STENCIL_TEST, TEXTURE_1D, and TEXTURE_2D.

Referenced by Teddy::Application::BaseRoot::start.

void Teddy::Graphics::View::normal const Teddy::Maths::TVector2< double > &    n const
 

void Teddy::Graphics::View::normal const Teddy::Maths::TVector2< float > &    n const
 

void Teddy::Graphics::View::normal const Teddy::Maths::TVector2< int > &    n const
 

void Teddy::Graphics::View::normal const Teddy::Maths::TVector< double > &    n const
 

void Teddy::Graphics::View::normal const Teddy::Maths::TVector< float > &    n const
 

void Teddy::Graphics::View::normal const Teddy::Maths::TVector< int > &    n const
 

bool Teddy::Graphics::View::pngScreenshot char *    filename
 

Definition at line 70 of file ViewScreenshot.cpp.

References fp, and size.

void Teddy::Graphics::View::printExtensions  
 

Definition at line 709 of file View.cpp.

void Teddy::Graphics::View::reshape int    w,
int    h
 

Surface reshape callback function.

Definition at line 519 of file View.cpp.

References displayOne, ratio, size, Teddy::PhysicalComponents::WindowManager::update, Vector2, and window_manager.

void Teddy::Graphics::View::reshapeOne int    w,
int    h
[static, protected]
 

void Teddy::Graphics::View::setBlendFunc const unsigned int    sfactor,
const unsigned int    dfactor
 

Set blending function.

Definition at line 632 of file View.cpp.

References gl_blend_destination_factor, and gl_blend_source_factor.

Referenced by View.

void Teddy::Graphics::View::setClear bool    clear
 

Set clear status. If clear status is true, each frame is cleared before the components are drawn. Otherwise it is not cleared.

Definition at line 443 of file View.cpp.

References clear.

void Teddy::Graphics::View::setClearColor const Color   clear_color
 

Definition at line 130 of file View.cpp.

References clear_color.

void Teddy::Graphics::View::setClearDepth const float    depth
 

void Teddy::Graphics::View::setCull unsigned long    dir
 

Definition at line 135 of file View.cpp.

References Teddy::SysSupport::M_INIT, and Teddy::SysSupport::msg.

Referenced by View.

void Teddy::Graphics::View::setFogColor float *    color
 

Set fog color.

Definition at line 657 of file View.cpp.

References color.

void Teddy::Graphics::View::setFogEnd const float    end
 

Set fog end.

Definition at line 676 of file View.cpp.

References end.

void Teddy::Graphics::View::setFogMode const unsigned int    mode
 

Set fog mode.

Definition at line 646 of file View.cpp.

References gl_fog_mode.

void Teddy::Graphics::View::setFogStart const float    start
 

Set fog start.

Definition at line 665 of file View.cpp.

References gl_fog_start.

void Teddy::Graphics::View::setFrontFace const unsigned int    front_face
 

void Teddy::Graphics::View::setModelViewMatrix const Teddy::Maths::Matrix   m
 

void Teddy::Graphics::View::setModelViewMatrix  
 

Set modelview matrix to identity.

Definition at line 158 of file ViewGL.cpp.

References current_matrix_mode.

Referenced by begin2d.

void Teddy::Graphics::View::setPolygonMode const unsigned int    polygon_mode
 

Set gl polygon mode.

Definition at line 601 of file View.cpp.

References Teddy::SysSupport::dmsg, gl_polygon_mode, and Teddy::SysSupport::M_GL.

Referenced by begin2d, drawFillRect, and drawRect.

void Teddy::Graphics::View::setProjectionMatrix const Teddy::Maths::Matrix   m
 

void Teddy::Graphics::View::setProjectionMatrix  
 

Set projection matrix to identity.

Definition at line 137 of file ViewGL.cpp.

References current_matrix_mode.

Referenced by begin2d.

void Teddy::Graphics::View::setShadeModel const unsigned int    shade_model
 

Set gl shade model.

Definition at line 623 of file View.cpp.

References gl_shade_model.

void Teddy::Graphics::View::setState const int    feature,
const bool    state
 

Return viewport.

Definition at line 429 of file View.cpp.

References disable, and enable.

void Teddy::Graphics::View::setTexture Texture   t
 

Definition at line 433 of file ViewGL.cpp.

References current_texture.

void Teddy::Graphics::View::setTextureMatrix const Teddy::Maths::Matrix   m
 

void Teddy::Graphics::View::setWindowManager Teddy::PhysicalComponents::WindowManager   wm
 

Definition at line 535 of file View.cpp.

References window_manager.

void Teddy::Graphics::View::texture const Teddy::Maths::TVector2< double > &    t const
 

void Teddy::Graphics::View::texture const Teddy::Maths::TVector2< float > &    t const
 

void Teddy::Graphics::View::texture const Teddy::Maths::TVector2< int > &    t const
 

void Teddy::Graphics::View::texture const Teddy::Maths::TVector< double > &    t const
 

void Teddy::Graphics::View::texture const Teddy::Maths::TVector< float > &    t const
 

void Teddy::Graphics::View::texture const Teddy::Maths::TVector< int > &    t const
 

void Teddy::Graphics::View::vertex const Teddy::Maths::TVector2< double > &    v const
 

void Teddy::Graphics::View::vertex const Teddy::Maths::TVector2< float > &    v const
 

void Teddy::Graphics::View::vertex const Teddy::Maths::TVector2< int > &    v const
 

void Teddy::Graphics::View::vertex const Teddy::Maths::TVector< double > &    v const
 

void Teddy::Graphics::View::vertex const Teddy::Maths::TVector< float > &    v const
 

void Teddy::Graphics::View::vertex const Teddy::Maths::TVector< int > &    v const
 

void Teddy::Graphics::View::vertex const float    x,
const float    y
const
 

Definition at line 196 of file ViewGL.cpp.

void Teddy::Graphics::View::vertex const Teddy::Maths::TVector2< float > &    v,
const Teddy::Maths::TVector2< float > &    t
const
 

void Teddy::Graphics::View::vertex const Teddy::Maths::TVector< float > &    v,
const Teddy::Maths::TVector2< float > &    t
const
 

Referenced by drawBiColRect, drawFillRect, and drawRect.


Member Data Documentation

View * Teddy::Graphics::View::active = NULL [static, protected]
 

Definition at line 50 of file View.cpp.

Referenced by displayOne, and View.

const unsigned long Teddy::Graphics::View::ALPHA_TEST = 5 [static]
 

Definition at line 39 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::BLEND = 2 [static]
 

Definition at line 36 of file ViewFeatures.cpp.

Referenced by begin2d, feature_to_str, and init.

bool Teddy::Graphics::View::clear [protected]
 

Definition at line 231 of file View.h.

Referenced by display, displayPs, getClear, setClear, and View.

Color Teddy::Graphics::View::clear_color [protected]
 

Definition at line 232 of file View.h.

Referenced by display, displayPs, setClearColor, and View.

const unsigned long Teddy::Graphics::View::COLOR_MATERIAL = 28 [static]
 

Definition at line 60 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::CULL_FACE = 1 [static]
 

Definition at line 35 of file ViewFeatures.cpp.

Referenced by begin2d, feature_to_str, and init.

int Teddy::Graphics::View::current_element [protected]
 

Definition at line 228 of file View.h.

Referenced by beginLineLoop, beginLines, beginLineStrip, beginPoints, beginPolygon, beginQuads, beginQuadStrip, beginTriangleFan, beginTriangles, beginTriangleStrip, end, and View.

int Teddy::Graphics::View::current_matrix_mode [protected]
 

Definition at line 229 of file View.h.

Referenced by setModelViewMatrix, setProjectionMatrix, and View.

Texture* Teddy::Graphics::View::current_texture [protected]
 

Definition at line 226 of file View.h.

Referenced by display, displayPs, setTexture, and View.

const unsigned long Teddy::Graphics::View::DEPTH_TEST = 6 [static]
 

Definition at line 40 of file ViewFeatures.cpp.

Referenced by begin2d, feature_to_str, and init.

unsigned int Teddy::Graphics::View::feature_to_code [static, private]
 

Definition at line 63 of file ViewFeatures.cpp.

Referenced by getCode, and init.

const unsigned long Teddy::Graphics::View::FOG = 3 [static]
 

Definition at line 37 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

FILE* Teddy::Graphics::View::fp [static, protected]
 

For png screenshot writer.

Definition at line 253 of file View.h.

Referenced by pngScreenshot.

float Teddy::Graphics::View::fps [protected]
 

Definition at line 247 of file View.h.

Referenced by display, getFps, and View.

int Teddy::Graphics::View::frames [protected]
 

Definition at line 243 of file View.h.

Referenced by display, getFrames, and View.

unsigned int Teddy::Graphics::View::gl_blend_destination_factor [protected]
 

Definition at line 234 of file View.h.

Referenced by setBlendFunc, and View.

unsigned int Teddy::Graphics::View::gl_blend_source_factor [protected]
 

Definition at line 233 of file View.h.

Referenced by setBlendFunc, and View.

float Teddy::Graphics::View::gl_clear_depth [protected]
 

Definition at line 241 of file View.h.

Referenced by View.

bool Teddy::Graphics::View::gl_feature[256] [protected]
 

Definition at line 242 of file View.h.

Referenced by disable, enable, getState, and View.

float Teddy::Graphics::View::gl_fog_color[4] [protected]
 

Definition at line 240 of file View.h.

Referenced by View.

float Teddy::Graphics::View::gl_fog_end [protected]
 

Definition at line 239 of file View.h.

Referenced by View.

unsigned int Teddy::Graphics::View::gl_fog_mode [protected]
 

Definition at line 235 of file View.h.

Referenced by setFogMode, and View.

float Teddy::Graphics::View::gl_fog_start [protected]
 

Definition at line 238 of file View.h.

Referenced by setFogStart, and View.

unsigned int Teddy::Graphics::View::gl_polygon_mode [protected]
 

Definition at line 236 of file View.h.

Referenced by setPolygonMode, and View.

unsigned int Teddy::Graphics::View::gl_shade_model [protected]
 

Definition at line 237 of file View.h.

Referenced by setShadeModel, and View.

unsigned long Teddy::Graphics::View::last_fps [protected]
 

Definition at line 246 of file View.h.

Referenced by display, and View.

unsigned long Teddy::Graphics::View::last_frame [protected]
 

Definition at line 244 of file View.h.

Referenced by display, getLastFrame, and View.

unsigned long Teddy::Graphics::View::last_time [protected]
 

Definition at line 245 of file View.h.

Referenced by display, getLastTime, and View.

const unsigned long Teddy::Graphics::View::LIGHT0 = 20 [static]
 

Definition at line 52 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::LIGHT1 = 21 [static]
 

Definition at line 53 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::LIGHT2 = 22 [static]
 

Definition at line 54 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::LIGHT3 = 23 [static]
 

Definition at line 55 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::LIGHT4 = 24 [static]
 

Definition at line 56 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::LIGHT5 = 25 [static]
 

Definition at line 57 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::LIGHT6 = 26 [static]
 

Definition at line 58 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::LIGHT7 = 27 [static]
 

Definition at line 59 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::LIGHTING = 19 [static]
 

Definition at line 51 of file ViewFeatures.cpp.

Referenced by begin2d, feature_to_str, and init.

const unsigned long Teddy::Graphics::View::LINE_OFFSET = 15 [static]
 

Definition at line 49 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::LINE_SMOOTH = 12 [static]
 

Definition at line 46 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::NORMALIZE = 4 [static]
 

Definition at line 38 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const int Teddy::Graphics::View::OPT_FONT_FIX = (1ul<<5ul) [static]
 

Definition at line 57 of file View.cpp.

Referenced by View.

const int Teddy::Graphics::View::OPT_FRAME = (1ul<<1ul) [static]
 

Definition at line 53 of file View.cpp.

Referenced by View.

const int Teddy::Graphics::View::OPT_FULLSCREEN = (1ul<<2ul) [static]
 

Definition at line 54 of file View.cpp.

Referenced by View.

const int Teddy::Graphics::View::OPT_MULTI_WINDOW = (1ul<<3ul) [static]
 

Definition at line 55 of file View.cpp.

const int Teddy::Graphics::View::OPT_SEPARATE_SPECULAR_COLOR = (1ul<<4ul) [static]
 

Definition at line 56 of file View.cpp.

Referenced by View.

Teddy::MixIn::Options Teddy::Graphics::View::options [protected]
 

Definition at line 223 of file View.h.

Referenced by getOptions, and View.

const unsigned long Teddy::Graphics::View::POINT_OFFSET = 14 [static]
 

Definition at line 48 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::POINT_SMOOTH = 11 [static]
 

Definition at line 45 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::POLYGON_OFFSET = 16 [static]
 

Definition at line 50 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::POLYGON_SMOOTH = 13 [static]
 

Definition at line 47 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

float Teddy::Graphics::View::ratio [protected]
 

Definition at line 230 of file View.h.

Referenced by getRatio, reshape, and View.

const unsigned long Teddy::Graphics::View::SCISSOR_TEST = 8 [static]
 

Definition at line 42 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

int Teddy::Graphics::View::screen_height [protected]
 

Definition at line 249 of file View.h.

Referenced by getScreenHeight, and View.

int Teddy::Graphics::View::screen_width [protected]
 

Definition at line 248 of file View.h.

Referenced by getScreenWidth, and View.

SDL_Surface* Teddy::Graphics::View::sdl_surface [protected]
 

Definition at line 224 of file View.h.

Referenced by getSurface, and View.

Teddy::Maths::TVector2<int> Teddy::Graphics::View::size [protected]
 

Definition at line 227 of file View.h.

Referenced by begin2d, getSize, pngScreenshot, reshape, and View.

const unsigned long Teddy::Graphics::View::STENCIL_TEST = 7 [static]
 

Definition at line 41 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::TEXTURE_1D = 9 [static]
 

Definition at line 43 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

const unsigned long Teddy::Graphics::View::TEXTURE_2D = 10 [static]
 

Definition at line 44 of file ViewFeatures.cpp.

Referenced by feature_to_str, and init.

Teddy::PhysicalComponents::WindowManager* Teddy::Graphics::View::window_manager [protected]
 

Definition at line 225 of file View.h.

Referenced by display, displayPs, reshape, and setWindowManager.


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