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

dxGraphicsStateGuardian8.cxx File Reference

#include "dxGraphicsStateGuardian8.h"
#include "config_dxgsg8.h"
#include <d3dx8.h>
#include "displayRegion.h"
#include "renderBuffer.h"
#include "geom.h"
#include "geomSphere.h"
#include "geomIssuer.h"
#include "graphicsWindow.h"
#include "graphicsChannel.h"
#include "lens.h"
#include "perspectiveLens.h"
#include "ambientLight.h"
#include "directionalLight.h"
#include "pointLight.h"
#include "spotlight.h"
#include "textureAttrib.h"
#include "lightAttrib.h"
#include "cullFaceAttrib.h"
#include "transparencyAttrib.h"
#include "alphaTestAttrib.h"
#include "depthTestAttrib.h"
#include "depthWriteAttrib.h"
#include "colorWriteAttrib.h"
#include "texMatrixAttrib.h"
#include "materialAttrib.h"
#include "renderModeAttrib.h"
#include "fogAttrib.h"
#include "depthOffsetAttrib.h"
#include "fog.h"
#include <mmsystem.h>

Go to the source code of this file.

Compounds

struct  draw_sprite_vertex_less
struct  POS_COLOR_TEX_VERTEX
struct  POS_NORM_COLOR_TEX_VERTEX
struct  POS_TEX_VERTEX
class  WrappedSprite
class  WrappedSpriteSortPtr

Defines

#define DISABLE_POLYGON_OFFSET_DECALING
#define NO_MULTIPLE_DISPLAY_REGIONS
#define PER_NORMAL   NormalOnly
#define PER_COLOR   ColorOnly
#define PER_TEXCOORD   TexCoordOnly
#define VSHADER_XFORMMATRIX_CONSTANTREGNUMSTART   4
#define __D3DLIGHT_RANGE_MAX   ((float)sqrt(FLT_MAX))
#define CountDPs(nv, nt)
#define MY_D3DRGBA(r, g, b, a)   ((D3DCOLOR) D3DCOLOR_COLORVALUE(r,g,b,a))
#define REQUIRED_DESTBLENDCAPS   (D3DPBLENDCAPS_ZERO|D3DPBLENDCAPS_ONE| D3DPBLENDCAPS_SRCALPHA)
#define REQUIRED_SRCBLENDCAPS   (D3DPBLENDCAPS_ZERO|D3DPBLENDCAPS_ONE| D3DPBLENDCAPS_INVSRCALPHA)
#define REQUIRED_TEXFILTERCAPS   (D3DPTFILTERCAPS_MAGFLINEAR | D3DPTFILTERCAPS_MIPFPOINT | D3DPTFILTERCAPS_MINFLINEAR)
#define TRILINEAR_MIPMAP_TEXFILTERCAPS   (D3DPTFILTERCAPS_MIPFLINEAR | D3DPTFILTERCAPS_MINFLINEAR)
#define REQUIRED_TEXBLENDCAPS   (D3DTEXOPCAPS_MODULATE | D3DTEXOPCAPS_SELECTARG1 | D3DTEXOPCAPS_SELECTARG2)

Enumerations

enum  DrawLoopFlags {
  NothingSet = 0, NormalOnly, ColorOnly, Normal_Color,
  TexCoordOnly, Normal_TexCoord, Color_TexCoord, Normal_Color_TexCoord
}
enum  DP_Type { DrawPrim, DrawIndexedPrim }
enum  GeomVertFormat { FlatVerts, IndexedVerts, MixedFmtVerts }

Functions

INLINE DWORD Colorf_to_D3DCOLOR (const Colorf &cColorf)
void INLINE TestDrawPrimFailure (DP_Type dptype, HRESULT hr, IDirect3DDevice8 *pD3DDevice, DWORD nVerts, DWORD nTris)
 PT (SavedFrameBuffer) DXGraphicsStateGuardian8
bool refill_tex_callback (TextureContext *tc, void *void_dxgsg_ptr)
bool delete_tex_callback (TextureContext *tc, void *void_dxgsg_ptr)
bool recreate_tex_callback (TextureContext *tc, void *void_dxgsg_ptr)
HRESULT SetViewMatrix (D3DMATRIX &mat, D3DXVECTOR3 &vFrom, D3DXVECTOR3 &vAt, D3DXVECTOR3 &vWorldUp)
HRESULT CreateDX8Cursor (LPDIRECT3DDEVICE8 pd3dDevice, HCURSOR hCursor, BOOL bAddWatermark)

Variables

const int VERT_BUFFER_SIZE = (32*6*1024L)
D3DMATRIX matIdentity
const char * DP_Type_Strs [3] = {"DrawPrimitive","DrawIndexedPrimitive"}
POS_TEX_VERTEX junk11
POS_COLOR_TEX_VERTEX junk22
POS_NORM_COLOR_TEX_VERTEX junk33


Define Documentation

#define __D3DLIGHT_RANGE_MAX   ((float)sqrt(FLT_MAX))
 

Definition at line 97 of file dxGraphicsStateGuardian8.cxx.

Referenced by DXGraphicsStateGuardian8::bind_light().

#define CountDPs nv,
nt   ) 
 

Definition at line 120 of file dxGraphicsStateGuardian8.cxx.

#define DISABLE_POLYGON_OFFSET_DECALING
 

Definition at line 65 of file dxGraphicsStateGuardian8.cxx.

#define MY_D3DRGBA r,
g,
b,
a   )     ((D3DCOLOR) D3DCOLOR_COLORVALUE(r,g,b,a))
 

Definition at line 123 of file dxGraphicsStateGuardian8.cxx.

#define NO_MULTIPLE_DISPLAY_REGIONS
 

Definition at line 78 of file dxGraphicsStateGuardian8.cxx.

#define PER_COLOR   ColorOnly
 

Definition at line 89 of file dxGraphicsStateGuardian8.cxx.

#define PER_NORMAL   NormalOnly
 

Definition at line 88 of file dxGraphicsStateGuardian8.cxx.

#define PER_TEXCOORD   TexCoordOnly
 

Definition at line 90 of file dxGraphicsStateGuardian8.cxx.

#define REQUIRED_DESTBLENDCAPS   (D3DPBLENDCAPS_ZERO|D3DPBLENDCAPS_ONE| D3DPBLENDCAPS_SRCALPHA)
 

#define REQUIRED_SRCBLENDCAPS   (D3DPBLENDCAPS_ZERO|D3DPBLENDCAPS_ONE| D3DPBLENDCAPS_INVSRCALPHA)
 

#define REQUIRED_TEXBLENDCAPS   (D3DTEXOPCAPS_MODULATE | D3DTEXOPCAPS_SELECTARG1 | D3DTEXOPCAPS_SELECTARG2)
 

#define REQUIRED_TEXFILTERCAPS   (D3DPTFILTERCAPS_MAGFLINEAR | D3DPTFILTERCAPS_MIPFPOINT | D3DPTFILTERCAPS_MINFLINEAR)
 

#define TRILINEAR_MIPMAP_TEXFILTERCAPS   (D3DPTFILTERCAPS_MIPFLINEAR | D3DPTFILTERCAPS_MINFLINEAR)
 

#define VSHADER_XFORMMATRIX_CONSTANTREGNUMSTART   4
 

Definition at line 93 of file dxGraphicsStateGuardian8.cxx.

Referenced by DXGraphicsStateGuardian8::issue_transform().


Enumeration Type Documentation

enum DP_Type
 

Enumeration values:
DrawPrim 
DrawIndexedPrim 

Definition at line 1090 of file dxGraphicsStateGuardian8.cxx.

enum DrawLoopFlags
 

Enumeration values:
NothingSet 
NormalOnly 
ColorOnly 
Normal_Color 
TexCoordOnly 
Normal_TexCoord 
Color_TexCoord 
Normal_Color_TexCoord 

Definition at line 84 of file dxGraphicsStateGuardian8.cxx.

Referenced by DXGraphicsStateGuardian8::draw_prim_inner_loop(), and DXGraphicsStateGuardian7::draw_prim_inner_loop().

enum GeomVertFormat
 

Enumeration values:
FlatVerts 
IndexedVerts 
MixedFmtVerts 

Definition at line 1260 of file dxGraphicsStateGuardian8.cxx.


Function Documentation

INLINE DWORD Colorf_to_D3DCOLOR const Colorf cColorf  ) 
 

_X86_

_X86_

Definition at line 132 of file dxGraphicsStateGuardian8.cxx.

References alpha, blue, DXGraphicsStateGuardian8::set_color_clear_value(), and w.

Referenced by DXGraphicsStateGuardian7::draw_multitri(), DXGraphicsStateGuardian7::draw_point(), DXGraphicsStateGuardian8::draw_prim_setup(), DXGraphicsStateGuardian7::draw_prim_setup(), DXGraphicsStateGuardian7::prepare_texture(), DXGraphicsStateGuardian8::set_ambient_light(), DXGraphicsStateGuardian8::set_color_clear_value(), DXGraphicsStateGuardian7::set_color_clear_value(), DXGraphicsStateGuardian8::transform_color(), and DXGraphicsStateGuardian7::transform_color().

HRESULT CreateDX8Cursor LPDIRECT3DDEVICE8  pd3dDevice,
HCURSOR  hCursor,
BOOL  bAddWatermark
 

Definition at line 4926 of file dxGraphicsStateGuardian8.cxx.

References HDC(), NULL, RELEASE, RELEASE_ONCE, SAFE_DELETE_ARRAY, x, and y.

Referenced by wdxGraphicsWindow8::init_resized_window().

bool delete_tex_callback TextureContext tc,
void *  void_dxgsg_ptr
 

Definition at line 4562 of file dxGraphicsStateGuardian8.cxx.

References DCAST, DXTextureContext8::DeleteTexture(), and tc.

Referenced by DXGraphicsStateGuardian8::DeleteAllDeviceObjects(), and DXGraphicsStateGuardian7::prepare_texture().

PT SavedFrameBuffer   ) 
 

Definition at line 4437 of file dxGraphicsStateGuardian8.cxx.

References buffer, PixelBuffer::depth_buffer(), DisplayRegion::get_pixel_height(), DisplayRegion::get_pixel_width(), NULL, RenderBuffer::T_back, and RenderBuffer::T_depth.

bool recreate_tex_callback TextureContext tc,
void *  void_dxgsg_ptr
 

Definition at line 4570 of file dxGraphicsStateGuardian8.cxx.

References DXGraphicsStateGuardian8::_pScrn, DXTextureContext8::CreateTexture(), DCAST, NULL, and tc.

Referenced by DXGraphicsStateGuardian7::prepare_texture(), and DXGraphicsStateGuardian8::RecreateAllDeviceObjects().

bool refill_tex_callback TextureContext tc,
void *  void_dxgsg_ptr
 

Definition at line 4552 of file dxGraphicsStateGuardian8.cxx.

References DCAST, DXTextureContext8::FillDDSurfTexturePixels(), and tc.

Referenced by DXGraphicsStateGuardian7::prepare_texture().

HRESULT SetViewMatrix D3DMATRIX &  mat,
D3DXVECTOR3 &  vFrom,
D3DXVECTOR3 &  vAt,
D3DXVECTOR3 &  vWorldUp
 

Definition at line 4830 of file dxGraphicsStateGuardian8.cxx.

Referenced by DXGraphicsStateGuardian7::prepare_texture().

void INLINE TestDrawPrimFailure DP_Type  dptype,
HRESULT  hr,
IDirect3DDevice8 *  pD3DDevice,
DWORD  nVerts,
DWORD  nTris
 

Definition at line 1093 of file dxGraphicsStateGuardian8.cxx.

References CountDPs, D3DERRORSTRING, and DP_Type_Strs.

Referenced by DXGraphicsStateGuardian8::draw_line(), DXGraphicsStateGuardian7::draw_line(), DXGraphicsStateGuardian8::draw_linestrip_base(), DXGraphicsStateGuardian7::draw_linestrip_base(), DXGraphicsStateGuardian8::draw_multitri(), DXGraphicsStateGuardian7::draw_multitri(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_point(), DXGraphicsStateGuardian8::draw_sphere(), DXGraphicsStateGuardian7::draw_sphere(), DXGraphicsStateGuardian8::draw_sprite(), DXGraphicsStateGuardian7::draw_sprite(), DXGraphicsStateGuardian8::draw_tri(), DXGraphicsStateGuardian7::draw_tri(), and DXGraphicsStateGuardian7::prepare_texture().


Variable Documentation

const char* DP_Type_Strs[3] = {"DrawPrimitive","DrawIndexedPrimitive"} [static]
 

Definition at line 1091 of file dxGraphicsStateGuardian8.cxx.

Referenced by TestDrawPrimFailure().

POS_TEX_VERTEX junk11
 

Definition at line 5099 of file dxGraphicsStateGuardian8.cxx.

POS_COLOR_TEX_VERTEX junk22
 

Definition at line 5100 of file dxGraphicsStateGuardian8.cxx.

POS_NORM_COLOR_TEX_VERTEX junk33
 

Definition at line 5101 of file dxGraphicsStateGuardian8.cxx.

D3DMATRIX matIdentity [static]
 

Definition at line 95 of file dxGraphicsStateGuardian8.cxx.

Referenced by DXGraphicsStateGuardian8::draw_sprite(), and DXGraphicsStateGuardian8::DXGraphicsStateGuardian8().

const int VERT_BUFFER_SIZE = (32*6*1024L)
 

Definition at line 74 of file dxGraphicsStateGuardian8.cxx.


Generated on Fri Apr 18 00:10:42 2003 for Panda by doxygen1.3