Panda3D
Macros | Typedefs | Functions
dxGraphicsStateGuardian9.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "dxGraphicsStateGuardian9.h"
#include "config_dxgsg9.h"
#include "displayRegion.h"
#include "renderBuffer.h"
#include "geom.h"
#include "graphicsWindow.h"
#include "graphicsEngine.h"
#include "lens.h"
#include "ambientLight.h"
#include "directionalLight.h"
#include "pointLight.h"
#include "spotlight.h"
#include "textureAttrib.h"
#include "texGenAttrib.h"
#include "shadeModelAttrib.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 "rescaleNormalAttrib.h"
#include "fogAttrib.h"
#include "depthOffsetAttrib.h"
#include "lightAttrib.h"
#include "stencilAttrib.h"
#include "scissorAttrib.h"
#include "clipPlaneAttrib.h"
#include "fog.h"
#include "throw_event.h"
#include "geomVertexFormat.h"
#include "geomVertexData.h"
#include "geomTriangles.h"
#include "geomTristrips.h"
#include "geomTrifans.h"
#include "geomLines.h"
#include "geomLinestrips.h"
#include "geomPoints.h"
#include "geomVertexReader.h"
#include "dxGeomMunger9.h"
#include "config_gobj.h"
#include "dxVertexBufferContext9.h"
#include "dxIndexBufferContext9.h"
#include "dxOcclusionQueryContext9.h"
#include "pStatTimer.h"
#include "pStatCollector.h"
#include "wdxGraphicsBuffer9.h"
#include "config_pgraph.h"
#include "shaderGenerator.h"
#include <mmsystem.h>
#include <dxsdkver.h>

Go to the source code of this file.

Macros

#define __D3DLIGHT_RANGE_MAX   ((PN_stdfloat)sqrt(FLT_MAX))
 
#define CHECK_COMPRESSED_FMT(mode, fmt)
 
#define DIRECTX_SDK_VERSION   SDK_VERSION (_DXSDK_PRODUCT_MAJOR, _DXSDK_PRODUCT_MINOR) << "." << SDK_VERSION (_DXSDK_BUILD_MAJOR, _DXSDK_BUILD_MINOR)
 
#define GAMMA_1   (255.0 * 256.0)
 
#define MY_D3DRGBA(r, g, b, a)   ((D3DCOLOR) D3DCOLOR_COLORVALUE(r, g, b, a))
 
#define SDK_VERSION(major, minor)   tostring(major) << "." << tostring(minor)
 
#define tostring(x)   #x
 
#define TOTAL_RENDER_TO_TEXTURE_FORMATS   3
 

Typedefs

typedef std::string KEY
 
typedef struct _KEY_ELEMENT KEY_ELEMENT
 
typedef struct _KEY_LIST KEY_LIST
 

Functions

void _create_gamma_table_dx9 (PN_stdfloat gamma, unsigned short *original_red_table, unsigned short *original_green_table, unsigned short *original_blue_table, unsigned short *red_table, unsigned short *green_table, unsigned short *blue_table)
 
KEY_ELEMENT * add_to_key_list (KEY key, KEY_LIST *key_list)
 
 CPT (TransformState) DXGraphicsStateGuardian9
 Given a lens, calculates the appropriate projection matrix for use with this gsg. More...
 
void delete_key_list (KEY_LIST *key_list)
 
KEY_ELEMENT * first_key_element (KEY_LIST *key_list)
 
KEY_ELEMENT * new_key_element (KEY key, KEY_LIST *key_list)
 
KEY_LIST * new_key_list (void)
 
KEY_ELEMENT * next_key_element (KEY_ELEMENT *key_element)
 
 PT (OcclusionQueryContext) DXGraphicsStateGuardian9
 Ends a previous call to begin_occlusion_query(). More...
 
 PT (GeomMunger) DXGraphicsStateGuardian9
 Creates a new GeomMunger object to munge vertices appropriate to this GSG for the indicated state. More...
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
mike
Date
1999-02-02
Author
fperazzi, PandaSE
Date
2010-05-05

Definition in file dxGraphicsStateGuardian9.cxx.

Macro Definition Documentation

◆ CHECK_COMPRESSED_FMT

#define CHECK_COMPRESSED_FMT (   mode,
  fmt 
)
Value:
if (_screen->_supported_tex_formats_mask & fmt##_FLAG) {\
if (dxgsg9_cat.is_debug()) {\
dxgsg9_cat.debug() << "Compressed texture format " << #fmt << " supported\n";\
}\
_supports_compressed_texture = true;\
_compressed_texture_formats.set_bit(Texture::mode);\
}

Function Documentation

◆ CPT()

CPT ( TransformState  )

Given a lens, calculates the appropriate projection matrix for use with this gsg.

Note that the projection matrix depends a lot upon the coordinate system of the rendering API.

The return value is a TransformState if the lens is acceptable, NULL if it is not.

Definition at line 909 of file dxGraphicsStateGuardian9.cxx.

References Lens::is_linear().

Referenced by DXGraphicsStateGuardian9::bind_light().

◆ PT() [1/2]

Ends a previous call to begin_occlusion_query().

This call returns the OcclusionQueryContext object that will (eventually) report the number of pixels that passed the depth test between the call to begin_occlusion_query() and end_occlusion_query().

Definition at line 745 of file dxGraphicsStateGuardian9.cxx.

◆ PT() [2/2]

PT ( GeomMunger  )

Creates a new GeomMunger object to munge vertices appropriate to this GSG for the indicated state.

Definition at line 770 of file dxGraphicsStateGuardian9.cxx.