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

# Lamp::RenderingDevice Class Reference

レンダリングデバイス More...

`#include <RenderingDevice.h>`

List of all members.

## Public Member Functions
virtual void | setRenderState (D3DRENDERSTATETYPE type, u_int state)
| レンダーステートの設定
virtual void | setTextureState (u_int stage, D3DTEXTURESTAGESTATETYPE type, u_int state)
| テクスチャステートの設定
virtual void | setSamplerState (u_int stage, D3DSAMPLERSTATETYPE type, u_int state)
| サンプラステートの設定
virtual void | beginStateBlock ()
| ステートブロックの開始
virtual Direct3DStateBlock * | endStateBlock ()
| ステートブロックの終了
virtual void | applyStateBlock (Direct3DStateBlock *stateBlock)
| ステートブロックの適用
virtual void | applyDefaultStateBlock ()
| デフォルトステートブロックの適用
virtual DimensionI | getRenderTargetSize ()
| レンダーターゲットサイズの取得
virtual bool | beginScene ()
| シーンの開始
virtual void | endScene ()
| シーンの終了
virtual void | setProjectionMatrix (const Matrix44 &projectionMatrix)
| 投影行列の設定
virtual void | setViewMatrix (const Matrix44 &viewMatrix)
| ビュー行列の設定
virtual void | setWorldMatrix (const Matrix34 &worldMatrix)
| ワールド行列の設定
virtual void | setTextureTransform2 (u_int stage, const TexCoord2 &repeat, const TexCoord2 &offset)
| テクスチャトランスフォーム設定
virtual void | setViewport (const RectangleI &rectangle)
| ビューポートの設定
virtual void | resetViewport ()
| ビューポートのリセット
virtual void | setLighting (bool lighting)
| ライティングの設定
virtual void | setAmbientColor (const Color3f &ambientColor)
| アンビエントカラーの設定
virtual void | enableDirectionalLight (int lightIndex, DirectionalLight *directionalLight)
| ディレクショナルライトを有効にする
virtual void | enablePointLight (int lightIndex, PointLight *pointLight)
| ポイントライトを有効にする
virtual void | closeLight (int lightIndex)
| ライトを閉じる
virtual void | setMaterial (const Color3f &diffuseColor, const Color3f &specularColor, const Color3f &ambientColor, const Color3f &emissiveColor, float specularPower, float alpha)
| マテリアルの設定
virtual void | setBlending (bool blendingFlag)
| ブレンディングの設定
virtual void | setBlendMode (int mode, int source, int destination)
| ブレンドモードの設定
virtual void | setTexture (int textureStage, Texture *texture)
| テクスチャの設定
virtual void | setTexture (int textureStage, Direct3DTexture *texture)
| テクスチャの設定
virtual void | setTextureAddressMode2 (int textureStage, int addressModeU, int addressModeV)
| テクスチャアドレスモードの設定
virtual Direct3DTexture * | createTexture (D3DFORMAT format, int width, int height)
| テクスチャの作成
virtual D3DLOCKED_RECT | lockTexture (Direct3DTexture *texture, int mipmapLevel)
| テクスチャのロック
virtual void | unlockTexture (Direct3DTexture *texture, int mipmapLevel)
| テクスチャのアンロック
virtual void | setColorTextureStage (int colorStage, D3DTEXTUREOP operation, u_int arg1, u_int arg2, int uvIndex)
| カラーテクスチャステージ設定
virtual void | closeColorTextureStage (int colorStage)
| カラーテクスチャステージを閉じる
virtual void | setAlphaTextureStage (int alphaTextureStage)
| アルファテクスチャステージ設定
virtual void | setFog (Fog *fog)
| フォグの設定
virtual void | setZTest (bool zTest)
| Zテストの設定.
virtual Direct3DIndexBuffer * | createStaticIndexBuffer (int bufferSize)
| 静的インデックスバッファの構築
virtual u_char * | lockStaticIndexBuffer (Direct3DIndexBuffer *indexBuffer, int offset, int size)
| 静的インデックスバッファのロック
virtual void | unlockStaticIndexBuffer (Direct3DIndexBuffer *indexBuffer)
| 静的インデックスバッファのアンロック
virtual void | writeStaticIndexBuffer (Direct3DIndexBuffer *indexBuffer, const void *data, int dataSize)
| 静的インデックスバッファの書き込み
virtual Direct3DIndexBuffer * | createDynamicIndexBuffer (int bufferSize)
| 動的インデックスバッファの構築
virtual void | writeDynamicIndexBuffer (Direct3DIndexBuffer *indexBuffer, const void *data, int dataSize)
| 動的インデックスバッファの書き込み
virtual void | setIndexBuffer (Direct3DIndexBuffer *indexBuffer)
| インデックスバッファの設定
virtual int | createVertexDeclaration (Direct3DVertexDeclaration **vertexDeclaration, bool hasPosition, int weightsPerVertex, int bonesPerVertex, bool hasNormal, bool hasColor, int texCoordSetCount, const TexCoord::Type *texCoordTypeArray)
| 頂点記述の構築
virtual void | setVertexDeclaration (Direct3DVertexDeclaration *vertexDeclaration)
| 頂点記述の設定
virtual Direct3DVertexBuffer * | createStaticVertexBuffer (int bufferSize)
| 静的頂点バッファの構築
virtual void | writeStaticVertexBuffer (Direct3DVertexBuffer *vertexBuffer, int bufferSize, int vertexCount, const Vector3 *positions, int weightsPerVertex, const float *weights, int bonesBerVertex, const u_char *boneIndices, const Vector3 *normals, const Color4c *colors, int texCoordSetCount, const TexCoord::Type *texCoordTypeArray, const float *const *texCoords)
| 静的頂点バッファの書き込み
virtual Direct3DVertexBuffer * | createDynamicVertexBuffer (int bufferSize)
| 動的頂点バッファの構築
virtual u_char * | lockDynamicVertexBuffer (Direct3DVertexBuffer *vertexBuffer, int offset, int size)
| 動的頂点バッファのロック
virtual void | unlockDynamicVertexBuffer (Direct3DVertexBuffer *vertexBuffer)
| 動的頂点バッファのアンロック
virtual void | writeDynamicVertexBuffer (Direct3DVertexBuffer *vertexBuffer, int bufferSize, int vertexCount, const Vector3 *positions, int weightsPerVertex, const float *weights, int bonesBerVertex, const u_char *boneIndices, const Vector3 *normals, const Color4c *colors, int texCoordSetCount, const TexCoord::Type *texCoordTypeArray, const float *const *texCoords)
| 動的頂点バッファの書き込み
virtual void | setVertexBuffer (Direct3DVertexBuffer *vertexBuffer, int vertexSize)
| 頂点バッファの設定
virtual void | drawTriangleList (int primitiveCount)
| 三角リスト描画
virtual void | drawIndexedTriangleList (int vertexCount, int primitiveCount)
| インデックス三角リスト描画
virtual void | drawIndexedTriangleList (int baseVertexIndex, int minIndex, int vertexCount, int startIndex, int primitiveCount)
| インデックス三角リスト描画
virtual void | drawLineList (int primitiveCount)
| ラインリスト描画
virtual void | drawIndexedLineList (int vertexCount, int primitiveCount)
| インデックスラインリスト描画
virtual void | resetCounter ()
| カウンタのリセット
virtual void | addVertexCount (int drawPolygonCount, int drawVertexCount)
| 頂点カウントの追加
virtual int | getDrawPrimitiveCount ()
| DrawPrimitiveカウントの取得.
virtual int | getDrawPolygonCount ()
| 描画ポリゴンカウントの取得
virtual int | getDrawVertexCount ()
| 描画頂点カウント
## Static Public Member Functions
RenderingDevice * | getInstance ()
| インスタンス取得
## Static Public Attributes
const int | maxActiveLightCount_
| 最大アクティブライト数
## Protected Member Functions
| RenderingDevice (GraphicsDeviceCapacity *capacity)
| コンストラクタ
virtual | ~RenderingDevice ()
| デストラクタ
virtual void | writeVertices (u_char *buffer, int bufferSize, int vertexCount, const Vector3 *positions, int weightsPerVertex, const float *weights, int bonesBerVertex, const u_char *boneIndices, const Vector3 *normals, const Color4c *colors, int texCoordSetCount, const TexCoord::Type *texCoordTypeArray, const float *const *texCoords)
| 頂点データの書き込み
virtual void | setD3DVector (D3DVECTOR &destination, const Vector3 &source)
| D3Dベクトルの設定.
virtual void | setD3DColor (D3DCOLORVALUE &destination, const Color4f &source)
| D3Dカラーの設定.
virtual void | setD3DColor (D3DCOLORVALUE &destination, const Color3f &source)
| D3Dカラーの設定.
virtual void | restoreDefaultStateBlock (Direct3DDevice *direct3DDevice)
| デフォルトステートブロックのリストア
virtual void | invalidateDefaultStateBlock ()
| デフォルトステートブロックの無効化
## Friends
class | LampGraphics

## Detailed Description

レンダリングデバイス

Definition at line 40 of file RenderingDevice.h.

## Constructor & Destructor Documentation

Lamp::RenderingDevice::RenderingDevice | ( | GraphicsDeviceCapacity * | capacity | ) | `[protected]`

  | コンストラクタ Parameters:
  capacity | デバイス能力
Definition at line 47 of file RenderingDevice.cpp. References Assert, NULL, and resetCounter().

## Member Function Documentation

virtual void Lamp::RenderingDevice::addVertexCount | ( | int | drawPolygonCount,
|  | int | drawVertexCount
| ) | `[inline, virtual]`

  | 頂点カウントの追加 Parameters:
  drawPolygonCount | 描画ポリゴンカウント
  drawVertexCount | 描画頂点カウント
Definition at line 572 of file RenderingDevice.h.

void Lamp::RenderingDevice::applyStateBlock | ( | Direct3DStateBlock * | stateBlock | ) | `[virtual]`

  | ステートブロックの適用 Parameters:
  stateBlock | ステートブロック
Definition at line 96 of file RenderingDevice.cpp. References Assert, DirectXCheck, and NULL. Referenced by applyDefaultStateBlock(), and Lamp::Renderer::rendering().

bool Lamp::RenderingDevice::beginScene | ( |  | ) | `[virtual]`

| シーンの開始 Returns: 成功すればtrueを返す Definition at line 124 of file RenderingDevice.cpp. References DirectXFailed. Referenced by Lamp::BasicFramework::frameworkDrawInformation(), Lamp::SpriteRenderer::render(), Lamp::PrimitiveRenderer::render(), and Lamp::Renderer::rendering().

void Lamp::RenderingDevice::closeColorTextureStage | ( | int | colorStage | ) | `[virtual]`

  | カラーテクスチャステージを閉じる Parameters:
  colorStage | カラーステージ
Definition at line 388 of file RenderingDevice.cpp. References setColorTextureStage(), and setTextureState(). Referenced by Lamp::BasicShaderFixed::buildStateBlock().

void Lamp::RenderingDevice::closeLight | ( | int | lightIndex | ) | `[virtual]`

  | ライトを閉じる Parameters:
  lightIndex | ライトインデックス
Definition at line 251 of file RenderingDevice.cpp. References DirectXCheck, and maxActiveLightCount_. Referenced by Lamp::FixedShader::setupFixedLight().

Direct3DIndexBuffer * Lamp::RenderingDevice::createDynamicIndexBuffer | ( | int | bufferSize | ) | `[virtual]`

  | 動的インデックスバッファの構築 Parameters:
  bufferSize | バッファサイズ
Returns: 動的インデックスバッファ Definition at line 504 of file RenderingDevice.cpp. References Assert, Direct3DIndexBuffer, DirectXCheck, and NULL. Referenced by Lamp::MeshData::getIndexBuffer().

Direct3DVertexBuffer * Lamp::RenderingDevice::createDynamicVertexBuffer | ( | int | bufferSize | ) | `[virtual]`

  | 動的頂点バッファの構築 Parameters:
  bufferSize | バッファサイズ
Returns: 動的頂点バッファ Definition at line 660 of file RenderingDevice.cpp. References Assert, Direct3DVertexBuffer, DirectXCheck, and NULL. Referenced by Lamp::CharacterMesh::createVertexBuffer(), Lamp::MeshData::getVertexBuffer(), and Lamp::SpriteGraphicsBuffer::setup().

Direct3DIndexBuffer * Lamp::RenderingDevice::createStaticIndexBuffer | ( | int | bufferSize | ) | `[virtual]`

  | 静的インデックスバッファの構築 Parameters:
  bufferSize | バッファサイズ
Returns: 静的インデックスバッファ Definition at line 468 of file RenderingDevice.cpp. References Assert, Direct3DIndexBuffer, DirectXCheck, and NULL. Referenced by Lamp::SpriteGraphicsBuffer::buildIndexBuffer().

Direct3DVertexBuffer * Lamp::RenderingDevice::createStaticVertexBuffer | ( | int | bufferSize | ) | `[virtual]`

  | 静的頂点バッファの構築 Parameters:
  bufferSize | バッファサイズ
Returns: 静的頂点バッファ Definition at line 634 of file RenderingDevice.cpp. References Assert, Direct3DVertexBuffer, DirectXCheck, and NULL.

Direct3DTexture * Lamp::RenderingDevice::createTexture | ( | D3DFORMAT | format,
|  | int | width,
|  | int | height
| ) | `[virtual]`

  | テクスチャの作成 Parameters:
  format | フォーマット
  width | 幅
  height | 高さ
Returns: テクスチャ Definition at line 355 of file RenderingDevice.cpp. References Direct3DTexture, DirectXCheck, and NULL.

int Lamp::RenderingDevice::createVertexDeclaration | ( | Direct3DVertexDeclaration ** | vertexDeclaration,
|  | bool | hasPosition,
|  | int | weightsPerVertex,
|  | int | bonesPerVertex,
|  | bool | hasNormal,
|  | bool | hasColor,
|  | int | texCoordSetCount,
|  | const TexCoord::Type * | texCoordTypeArray
| ) | `[virtual]`

  | 頂点記述の構築 Parameters:
  vertexDeclaration | [out] 頂点記述
  hasPosition | 位置を持つか
  weightsPerVertex | 頂点あたりウェイト数
  bonesPerVertex | 頂点あたりボーン数
  hasNormal | 法線を持つか
  hasColor | 頂点カラーを持つか
  texCoordSetCount | テクスチャ座標セット数
  texCoordTypeArray | テクスチャ座標タイプ配列
Returns: 頂点サイズ Definition at line 535 of file RenderingDevice.cpp. References Assert, D3DVertexElement, DirectXCheck, NULL, and u_int. Referenced by Lamp::CharacterMesh::createVertexDeclaration(), Lamp::PrimitiveRenderer::setPositionColorVertexDeclaration(), Lamp::PrimitiveRenderer::setPositionVertexDeclaration(), and Lamp::SpriteGraphicsBuffer::setup().

void Lamp::RenderingDevice::drawIndexedLineList | ( | int | vertexCount,
|  | int | primitiveCount
| ) | `[virtual]`

  | インデックスラインリスト描画 Parameters:
  vertexCount | 頂点数
  primitiveCount | プリミティブ数
Definition at line 735 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::PrimitiveRenderer::renderRequest().

void Lamp::RenderingDevice::drawIndexedTriangleList | ( | int | baseVertexIndex,
|  | int | minIndex,
|  | int | vertexCount,
|  | int | startIndex,
|  | int | primitiveCount
| ) | `[virtual]`

  | インデックス三角リスト描画 Parameters:
  baseVertexIndex | 頂点インデックスオフセット
  minIndex | 最小インデックス
  vertexCount | 頂点数
  startIndex | 開始インデックス
  primitiveCount | プリミティブ数
Definition at line 723 of file RenderingDevice.cpp. References DirectXCheck.

void Lamp::RenderingDevice::drawIndexedTriangleList | ( | int | vertexCount,
|  | int | primitiveCount
| ) | `[virtual]`

  | インデックス三角リスト描画 Parameters:
  vertexCount | 頂点数
  primitiveCount | プリミティブ数
Definition at line 716 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::Shader::drawCall(), and Lamp::SpriteGraphicsBuffer::render().

void Lamp::RenderingDevice::drawLineList | ( | int | primitiveCount | ) | `[virtual]`

  | ラインリスト描画 Parameters:
  primitiveCount | プリミティブ数
Definition at line 730 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::PrimitiveRenderer::renderRequest().

void Lamp::RenderingDevice::drawTriangleList | ( | int | primitiveCount | ) | `[virtual]`

  | 三角リスト描画 Parameters:
  primitiveCount | プリミティブ数
Definition at line 711 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::Shader::drawCall().

void Lamp::RenderingDevice::enableDirectionalLight | ( | int | lightIndex,
|  | DirectionalLight * | directionalLight
| ) | `[virtual]`

  | ディレクショナルライトを有効にする Parameters:
  lightIndex | ライトインデックス
  directionalLight | ディレクショナルライト
Definition at line 219 of file RenderingDevice.cpp. References Assert, D3DLight, DirectXCheck, Lamp::DirectionalLight::getDiffuseColor(), Lamp::DirectionalLight::getSpecularColor(), Lamp::DirectionalLight::getWorldDirection(), maxActiveLightCount_, setD3DColor(), and setD3DVector(). Referenced by Lamp::FixedShader::setupFixedLight().

void Lamp::RenderingDevice::enablePointLight | ( | int | lightIndex,
|  | PointLight * | pointLight
| ) | `[virtual]`

  | ポイントライトを有効にする Parameters:
  lightIndex | ライトインデックス
  pointLight | ポイントライト
Definition at line 233 of file RenderingDevice.cpp. References Assert, D3DLight, DirectXCheck, Lamp::PointLight::getAttenuation0(), Lamp::PointLight::getAttenuation1(), Lamp::PointLight::getAttenuation2(), Lamp::PointLight::getDiffuseColor(), Lamp::PointLight::getGlobalRange(), Lamp::PointLight::getSpecularColor(), Lamp::PointLight::getWorldPosition(), maxActiveLightCount_, setD3DColor(), and setD3DVector(). Referenced by Lamp::FixedShader::setupFixedLight().

Direct3DStateBlock * Lamp::RenderingDevice::endStateBlock | ( |  | ) | `[virtual]`

| ステートブロックの終了 Returns: ステートブロック Definition at line 89 of file RenderingDevice.cpp. References Direct3DStateBlock, and DirectXCheck. Referenced by Lamp::Renderer::buildRendererStateBlock(), and Lamp::BasicShaderFixed::buildStateBlock().

virtual int Lamp::RenderingDevice::getDrawPolygonCount | ( |  | ) | `[inline, virtual]`

| 描画ポリゴンカウントの取得 Returns: 描画ポリゴンカウント Definition at line 588 of file RenderingDevice.h.

virtual int Lamp::RenderingDevice::getDrawPrimitiveCount | ( |  | ) | `[inline, virtual]`

| DrawPrimitiveカウントの取得. Returns: DrawPrimitiveカウント Definition at line 582 of file RenderingDevice.h.

virtual int Lamp::RenderingDevice::getDrawVertexCount | ( |  | ) | `[inline, virtual]`

| 描画頂点カウント Returns: 描画頂点カウント Definition at line 594 of file RenderingDevice.h.

RenderingDevice* Lamp::RenderingDevice::getInstance | ( |  | ) | `[inline, static]`

| インスタンス取得 Returns: インスタンス Definition at line 51 of file RenderingDevice.h. References Assert, and NULL.

DimensionI Lamp::RenderingDevice::getRenderTargetSize | ( |  | ) | `[virtual]`

| レンダーターゲットサイズの取得 Returns: レンダーターゲットサイズ Definition at line 111 of file RenderingDevice.cpp. References D3DSurfaceDescription, Direct3DSurface, DirectXCheck, and SafeRelease. Referenced by Lamp::SpriteRenderer::applyRendererState(), resetViewport(), and Lamp::SpriteRenderState::SpriteRenderState().

u_char * Lamp::RenderingDevice::lockDynamicVertexBuffer | ( | Direct3DVertexBuffer * | vertexBuffer,
|  | int | offset,
|  | int | size
| ) | `[virtual]`

  | 動的頂点バッファのロック Parameters:
  vertexBuffer | 動的頂点バッファ
  offset | オフセット
  size | サイズ
Returns: 書き込みアドレス Definition at line 672 of file RenderingDevice.cpp. References DirectXCheck, u_char, and u_int. Referenced by Lamp::SpriteGraphicsBuffer::render(), and writeDynamicVertexBuffer().

u_char * Lamp::RenderingDevice::lockStaticIndexBuffer | ( | Direct3DIndexBuffer * | indexBuffer,
|  | int | offset,
|  | int | size
| ) | `[virtual]`

  | 静的インデックスバッファのロック Parameters:
  indexBuffer | インデックスバッファ
  offset | オフセット
  size | サイズ
Returns: 書き込みアドレス Definition at line 479 of file RenderingDevice.cpp. References Assert, DirectXCheck, NULL, and u_char. Referenced by Lamp::SpriteGraphicsBuffer::buildIndexBuffer(), and writeStaticIndexBuffer().

D3DLOCKED_RECT Lamp::RenderingDevice::lockTexture | ( | Direct3DTexture * | texture,
|  | int | mipmapLevel
| ) | `[virtual]`

  | テクスチャのロック Parameters:
  texture | テクスチャ
  mipmapLevel | ミップマップレベル
Returns: ロックされた矩形 Definition at line 364 of file RenderingDevice.cpp. References DirectXCheck, and NULL. Referenced by Lamp::SpritePictureRGBA8::compileImage(), Lamp::SpritePictureRGB8::compileImage(), Lamp::PictureRGBA8::compileImage(), and Lamp::PictureRGB8::compileImage().

void Lamp::RenderingDevice::restoreDefaultStateBlock | ( | Direct3DDevice * | direct3DDevice | ) | `[protected, virtual]`

  | デフォルトステートブロックのリストア Parameters:
  direct3DDevice | Direct3Dデバイス
Definition at line 102 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::LampGraphics::deviceReset().

void Lamp::RenderingDevice::setAlphaTextureStage | ( | int | alphaTextureStage | ) | `[virtual]`

  | アルファテクスチャステージ設定 Parameters:
  alphaTextureStage | アルファテクスチャステージ
Definition at line 400 of file RenderingDevice.cpp. References setTextureState(). Referenced by Lamp::BasicShaderFixed::buildStateBlock().

void Lamp::RenderingDevice::setAmbientColor | ( | const Color3f & | ambientColor | ) | `[virtual]`

  | アンビエントカラーの設定 Parameters:
  ambientColor | アンビエントカラー
Definition at line 213 of file RenderingDevice.cpp. References Lamp::Color4c::getARGB(), and setRenderState(). Referenced by Lamp::FixedShader::setupFixedLight().

void Lamp::RenderingDevice::setBlending | ( | bool | blendingFlag | ) | `[virtual]`

  | ブレンディングの設定 Parameters:
  blendingFlag | ブレンディングフラグ
Definition at line 282 of file RenderingDevice.cpp. References setRenderState(). Referenced by Lamp::BlendSpriteState::apply(), Lamp::PrimitiveRenderer::render(), and Lamp::Renderer::rendering().

void Lamp::RenderingDevice::setBlendMode | ( | int | mode,
|  | int | source,
|  | int | destination
| ) | `[virtual]`

  | ブレンドモードの設定 Parameters:
  mode | ブレンドモード
  source | ブレンドソース
  destination | ブレンドデスティネーション
Definition at line 287 of file RenderingDevice.cpp. References Assert, and setRenderState(). Referenced by Lamp::BlendSpriteState::apply(), Lamp::Shader::buildMaterialStart(), and Lamp::PrimitiveRenderer::render().

void Lamp::RenderingDevice::setColorTextureStage | ( | int | colorStage,
|  | D3DTEXTUREOP | operation,
|  | u_int | arg1,
|  | u_int | arg2,
|  | int | uvIndex
| ) | `[virtual]`

  | カラーテクスチャステージ設定 Parameters:
  colorStage | カラーステージ
  operation | ステージの操作
  arg1 | 第一引数
  arg2 | 第二引数
  uvIndex | UVインデックス
Definition at line 379 of file RenderingDevice.cpp. References setTextureState(). Referenced by closeColorTextureStage(), Lamp::FixedShader::setFixedBaseTexture(), Lamp::FixedShader::setFixedLightTexture(), and Lamp::FixedShader::setFixedStainTexture().

void Lamp::RenderingDevice::setD3DColor | ( | D3DCOLORVALUE & | destination,
|  | const Color3f & | source
| ) | `[protected, virtual]`

  | D3Dカラーの設定. Parameters:
  destination | 設定先
  source | 設定元
Definition at line 817 of file RenderingDevice.cpp. References Lamp::Color3f::b, Lamp::Color3f::g, and Lamp::Color3f::r.

void Lamp::RenderingDevice::setD3DColor | ( | D3DCOLORVALUE & | destination,
|  | const Color4f & | source
| ) | `[protected, virtual]`

  | D3Dカラーの設定. Parameters:
  destination | 設定先
  source | 設定元
Definition at line 808 of file RenderingDevice.cpp. References Lamp::Color4f::a, Lamp::Color4f::b, Lamp::Color4f::g, and Lamp::Color4f::r. Referenced by enableDirectionalLight(), enablePointLight(), and setMaterial().

void Lamp::RenderingDevice::setD3DVector | ( | D3DVECTOR & | destination,
|  | const Vector3 & | source
| ) | `[protected, virtual]`

  | D3Dベクトルの設定. Parameters:
  destination | 設定先
  source | 設定元
Definition at line 800 of file RenderingDevice.cpp. References Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z. Referenced by enableDirectionalLight(), and enablePointLight().

void Lamp::RenderingDevice::setFog | ( | Fog * | fog | ) | `[virtual]`

  | フォグの設定 Parameters:
  fog | フォグ
Definition at line 426 of file RenderingDevice.cpp. References Lamp::Color4c::getARGB(), Lamp::Fog::getColor(), Lamp::Fog::getDensity(), Lamp::Fog::getFar(), Lamp::Fog::getMode(), Lamp::Fog::getNear(), Lamp::Fog::isEnabled(), setRenderState(), and u_int. Referenced by Lamp::Renderer::initializeGlobalSettings().

void Lamp::RenderingDevice::setIndexBuffer | ( | Direct3DIndexBuffer * | indexBuffer | ) | `[virtual]`

  | インデックスバッファの設定 Parameters:
  indexBuffer | インデックスバッファ
Definition at line 528 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::Shader::drawCall(), Lamp::PrimitiveRenderer::renderRequest(), and Lamp::SpriteGraphicsBuffer::setup().

void Lamp::RenderingDevice::setLighting | ( | bool | lighting | ) | `[virtual]`

  | ライティングの設定 Parameters:
  lighting | ライティングを行うならtrue
Definition at line 208 of file RenderingDevice.cpp. References setRenderState().

void Lamp::RenderingDevice::setMaterial | ( | const Color3f & | diffuseColor,
|  | const Color3f & | specularColor,
|  | const Color3f & | ambientColor,
|  | const Color3f & | emissiveColor,
|  | float | specularPower,
|  | float | alpha
| ) | `[virtual]`

  | マテリアルの設定 Parameters:
  diffuseColor | ディフューズカラー
  specularColor | スペキュラカラー
  ambientColor | アンビエントカラー
  emissiveColor | エミッシブカラー
  specularPower | スペキュラパワー
  alpha | アルファ
Definition at line 260 of file RenderingDevice.cpp. References D3DMaterial, DirectXCheck, setD3DColor(), and setRenderState(). Referenced by Lamp::BasicShaderFixed::buildStateBlock(), and Lamp::PrimitiveRenderer::render().

void Lamp::RenderingDevice::setProjectionMatrix | ( | const Matrix44 & | projectionMatrix | ) | `[virtual]`

  | 投影行列の設定 Parameters:
  projectionMatrix | 投影行列
Definition at line 138 of file RenderingDevice.cpp. References Lamp::Matrix44::array, DirectXCheck, and Lamp::Matrix44::transpose(). Referenced by Lamp::SpriteRenderer::applyRendererState(), Lamp::Renderer::initializeGlobalSettings(), and Lamp::PrimitiveRenderer::render().

void Lamp::RenderingDevice::setRenderState | ( | D3DRENDERSTATETYPE | type,
|  | u_int | state
| ) | `[virtual]`

  | レンダーステートの設定 Parameters:
  type | レンダーステートタイプ
  state | レンダーステート
Definition at line 65 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::ColorSpriteState::apply(), Lamp::SpriteRenderer::applyRendererState(), Lamp::Shader::buildMaterialStart(), Lamp::Renderer::buildRendererStateBlock(), Lamp::PrimitiveRenderer::render(), Lamp::Renderer::rendering(), Lamp::PrimitiveRenderer::renderRequest(), Lamp::FixedShader::resetFogOptionFixed(), setAmbientColor(), setBlending(), setBlendMode(), setFog(), Lamp::FixedShader::setFogOptionFixed(), setLighting(), setMaterial(), Lamp::FixedShader::setupFixedDraw(), and setZTest().

void Lamp::RenderingDevice::setSamplerState | ( | u_int | stage,
|  | D3DSAMPLERSTATETYPE | type,
|  | u_int | state
| ) | `[virtual]`

  | サンプラステートの設定 Parameters:
  stage | ステージ
  type | サンプラステートタイプ
  state | サンプラステート
Definition at line 76 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::SpriteRenderer::applyRendererState(), Lamp::Renderer::buildRendererStateBlock(), and setTextureAddressMode2().

void Lamp::RenderingDevice::setTexture | ( | int | textureStage,
|  | Direct3DTexture * | texture
| ) | `[virtual]`

  | テクスチャの設定 Parameters:
  textureStage | テクスチャステージ
  texture | Direct3Dテクスチャ
Definition at line 327 of file RenderingDevice.cpp. References DirectXCheck.

void Lamp::RenderingDevice::setTexture | ( | int | textureStage,
|  | Texture * | texture
| ) | `[virtual]`

  | テクスチャの設定 Parameters:
  textureStage | テクスチャステージ
  texture | テクスチャ
Definition at line 322 of file RenderingDevice.cpp. References DirectXCheck, and Lamp::Texture::getD3DTexture(). Referenced by Lamp::SpriteRenderState::request(), and Lamp::FixedShader::setFixedTexture().

void Lamp::RenderingDevice::setTextureAddressMode2 | ( | int | textureStage,
|  | int | addressModeU,
|  | int | addressModeV
| ) | `[virtual]`

  | テクスチャアドレスモードの設定 Parameters:
  textureStage | テクスチャステージ
  addressModeU | アドレスモードU
  addressModeV | アドレスモードV
Definition at line 332 of file RenderingDevice.cpp. References Assert, and setSamplerState(). Referenced by Lamp::AddressModeSpriteState::apply(), and Lamp::FixedShader::setFixedTexture().

void Lamp::RenderingDevice::setTextureState | ( | u_int | stage,
|  | D3DTEXTURESTAGESTATETYPE | type,
|  | u_int | state
| ) | `[virtual]`

  | テクスチャステートの設定 Parameters:
  stage | ステージ
  type | テクスチャステートタイプ
  state | テクスチャステート
Definition at line 70 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::SpriteRenderer::applyRendererState(), closeColorTextureStage(), Lamp::PrimitiveRenderer::render(), setAlphaTextureStage(), setColorTextureStage(), and setTextureTransform2().

void Lamp::RenderingDevice::setTextureTransform2 | ( | u_int | stage,
|  | const TexCoord2 & | repeat,
|  | const TexCoord2 & | offset
| ) | `[virtual]`

  | テクスチャトランスフォーム設定 Parameters:
  stage | テクスチャステージ
  repeat | リピート
  offset | オフセット
Definition at line 165 of file RenderingDevice.cpp. References Lamp::Matrix44::array, DirectXCheck, setTextureState(), Lamp::TexCoord2::u, and Lamp::TexCoord2::v. Referenced by Lamp::FixedShader::setFixedTexture().

void Lamp::RenderingDevice::setVertexBuffer | ( | Direct3DVertexBuffer * | vertexBuffer,
|  | int | vertexSize
| ) | `[virtual]`

  | 頂点バッファの設定 Parameters:
  vertexBuffer | 頂点バッファ
  vertexSize | 頂点サイズ
Definition at line 703 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::FixedShader::drawFixed(), Lamp::PrimitiveRenderer::renderRequest(), and Lamp::SpriteGraphicsBuffer::setup().

void Lamp::RenderingDevice::setVertexDeclaration | ( | Direct3DVertexDeclaration * | vertexDeclaration | ) | `[virtual]`

  | 頂点記述の設定 Parameters:
  vertexDeclaration | 頂点記述
Definition at line 626 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::FixedShader::drawFixed(), Lamp::PrimitiveRenderer::setPositionColorVertexDeclaration(), Lamp::PrimitiveRenderer::setPositionVertexDeclaration(), and Lamp::SpriteGraphicsBuffer::setup().

void Lamp::RenderingDevice::setViewMatrix | ( | const Matrix44 & | viewMatrix | ) | `[virtual]`

  | ビュー行列の設定 Parameters:
  viewMatrix | ビュー行列
Definition at line 146 of file RenderingDevice.cpp. References Lamp::Matrix44::array, DirectXCheck, and Lamp::Matrix44::transpose(). Referenced by Lamp::SpriteRenderer::applyRendererState(), Lamp::Renderer::initializeGlobalSettings(), and Lamp::PrimitiveRenderer::render().

void Lamp::RenderingDevice::setViewport | ( | const RectangleI & | rectangle | ) | `[virtual]`

  | ビューポートの設定 Parameters:
  rectangle | 矩形
Definition at line 186 of file RenderingDevice.cpp. References D3DViewport, DirectXCheck, Lamp::RectangleI::height, Lamp::RectangleI::width, Lamp::RectangleI::x, and Lamp::RectangleI::y. Referenced by Lamp::ViewportSpriteState::apply(), and resetViewport().

void Lamp::RenderingDevice::setWorldMatrix | ( | const Matrix34 & | worldMatrix | ) | `[virtual]`

  | ワールド行列の設定 Parameters:
  worldMatrix | ワールド行列
Definition at line 154 of file RenderingDevice.cpp. References Lamp::Matrix44::array, DirectXCheck, Lamp::Matrix34::m00, Lamp::Matrix34::m01, Lamp::Matrix34::m02, Lamp::Matrix34::m03, Lamp::Matrix34::m10, Lamp::Matrix34::m11, Lamp::Matrix34::m12, Lamp::Matrix34::m13, Lamp::Matrix34::m20, Lamp::Matrix34::m21, Lamp::Matrix34::m22, and Lamp::Matrix34::m23. Referenced by Lamp::PrimitiveRenderer::renderRequest(), and Lamp::FixedShader::setMatrixFixed().

void Lamp::RenderingDevice::setZTest | ( | bool | zTest | ) | `[virtual]`

  | Zテストの設定. Parameters:
  zTest | Zテストを行うならtrue
Definition at line 460 of file RenderingDevice.cpp. References setRenderState(). Referenced by Lamp::SpriteRenderer::applyRendererState(), Lamp::Shader::buildMaterialStart(), and Lamp::PrimitiveRenderer::renderRequest().

void Lamp::RenderingDevice::unlockDynamicVertexBuffer | ( | Direct3DVertexBuffer * | vertexBuffer | ) | `[virtual]`

  | 動的頂点バッファのアンロック Parameters:
  vertexBuffer | 動的頂点バッファ
Definition at line 683 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::SpriteGraphicsBuffer::render(), and writeDynamicVertexBuffer().

void Lamp::RenderingDevice::unlockStaticIndexBuffer | ( | Direct3DIndexBuffer * | indexBuffer | ) | `[virtual]`

  | 静的インデックスバッファのアンロック Parameters:
  indexBuffer | インデックスバッファ
Definition at line 488 of file RenderingDevice.cpp. References Assert, DirectXCheck, and NULL. Referenced by Lamp::SpriteGraphicsBuffer::buildIndexBuffer(), and writeStaticIndexBuffer().

void Lamp::RenderingDevice::unlockTexture | ( | Direct3DTexture * | texture,
|  | int | mipmapLevel
| ) | `[virtual]`

  | テクスチャのアンロック Parameters:
  texture | テクスチャ
  mipmapLevel | ミップマップレベル
Definition at line 372 of file RenderingDevice.cpp. References DirectXCheck. Referenced by Lamp::SpritePictureRGBA8::compileImage(), Lamp::SpritePictureRGB8::compileImage(), Lamp::PictureRGBA8::compileImage(), and Lamp::PictureRGB8::compileImage().

void Lamp::RenderingDevice::writeDynamicIndexBuffer | ( | Direct3DIndexBuffer * | indexBuffer,
|  | const void * | data,
|  | int | dataSize
| ) | `[virtual]`

  | 動的インデックスバッファの書き込み Parameters:
  indexBuffer | インデックスバッファ
  data | データ
  dataSize | データサイズ
Definition at line 515 of file RenderingDevice.cpp. References Assert, DirectXCheck, NULL, and u_char. Referenced by Lamp::MeshData::getIndexBuffer().

void Lamp::RenderingDevice::writeDynamicVertexBuffer | ( | Direct3DVertexBuffer * | vertexBuffer,
|  | int | bufferSize,
|  | int | vertexCount,
|  | const Vector3 * | positions,
|  | int | weightsPerVertex,
|  | const float * | weights,
|  | int | bonesBerVertex,
|  | const u_char * | boneIndices,
|  | const Vector3 * | normals,
|  | const Color4c * | colors,
|  | int | texCoordSetCount,
|  | const TexCoord::Type * | texCoordTypeArray,
|  | const float *const * | texCoords
| ) | `[virtual]`

  | 動的頂点バッファの書き込み Parameters:
  vertexBuffer | 動的頂点バッファ
  bufferSize | バッファサイズ
  vertexCount | 頂点数
  positions | 位置配列
  weightsPerVertex | 頂点あたりウェイト数
  weights | ウェイト配列
  bonesBerVertex | 頂点あたりボーン数
  boneIndices | ボーンインデックス配列
  normals | 法線配列
  colors | 頂点カラー配列
  texCoordSetCount | テクスチャ座標セット数
  texCoordTypeArray | テクスチャ座標タイプ配列
  texCoords | テクスチャ座標配列
Definition at line 689 of file RenderingDevice.cpp. References lockDynamicVertexBuffer(), u_char, unlockDynamicVertexBuffer(), and writeVertices(). Referenced by Lamp::MeshData::getVertexBuffer(), and Lamp::CharacterMesh::setupVertexBuffer().

void Lamp::RenderingDevice::writeStaticIndexBuffer | ( | Direct3DIndexBuffer * | indexBuffer,
|  | const void * | data,
|  | int | dataSize
| ) | `[virtual]`

  | 静的インデックスバッファの書き込み Parameters:
  indexBuffer | インデックスバッファ
  data | データ
  dataSize | データサイズ
Definition at line 495 of file RenderingDevice.cpp. References Assert, lockStaticIndexBuffer(), NULL, u_char, and unlockStaticIndexBuffer().

void Lamp::RenderingDevice::writeStaticVertexBuffer | ( | Direct3DVertexBuffer * | vertexBuffer,
|  | int | bufferSize,
|  | int | vertexCount,
|  | const Vector3 * | positions,
|  | int | weightsPerVertex,
|  | const float * | weights,
|  | int | bonesBerVertex,
|  | const u_char * | boneIndices,
|  | const Vector3 * | normals,
|  | const Color4c * | colors,
|  | int | texCoordSetCount,
|  | const TexCoord::Type * | texCoordTypeArray,
|  | const float *const * | texCoords
| ) | `[virtual]`

  | 静的頂点バッファの書き込み Parameters:
  vertexBuffer | 静的頂点バッファ
  bufferSize | バッファサイズ
  vertexCount | 頂点数
  positions | 位置配列
  weightsPerVertex | 頂点あたりウェイト数
  weights | ウェイト配列
  bonesBerVertex | 頂点あたりボーン数
  boneIndices | ボーンインデックス配列
  normals | 法線配列
  colors | 頂点カラー配列
  texCoordSetCount | テクスチャ座標セット数
  texCoordTypeArray | テクスチャ座標タイプ配列
  texCoords | テクスチャ座標配列
Definition at line 645 of file RenderingDevice.cpp. References DirectXCheck, u_char, and writeVertices().

void Lamp::RenderingDevice::writeVertices | ( | u_char * | buffer,
|  | int | bufferSize,
|  | int | vertexCount,
|  | const Vector3 * | positions,
|  | int | weightsPerVertex,
|  | const float * | weights,
|  | int | bonesBerVertex,
|  | const u_char * | boneIndices,
|  | const Vector3 * | normals,
|  | const Color4c * | colors,
|  | int | texCoordSetCount,
|  | const TexCoord::Type * | texCoordTypeArray,
|  | const float *const * | texCoords
| ) | `[protected, virtual]`

  | 頂点データの書き込み Parameters:
  buffer | 書き込みバッファ
  bufferSize | バッファサイズ
  vertexCount | 頂点数
  positions | 位置配列
  weightsPerVertex | 頂点あたりウェイト数
  weights | ウェイト配列
  bonesBerVertex | 頂点あたりボーン数
  boneIndices | ボーンインデックス配列
  normals | 法線配列
  colors | 頂点カラー配列
  texCoordSetCount | テクスチャ座標セット数
  texCoordTypeArray | テクスチャ座標タイプ配列
  texCoords | テクスチャ座標配列
Definition at line 744 of file RenderingDevice.cpp. References Assert, NULL, u_char, and u_int. Referenced by writeDynamicVertexBuffer(), and writeStaticVertexBuffer().

## Member Data Documentation

const int Lamp::RenderingDevice::maxActiveLightCount_`[static]`

| Initial value:
        Renderer::maxActiveLightCount_
最大アクティブライト数 Definition at line 40 of file RenderingDevice.cpp. Referenced by closeLight(), enableDirectionalLight(), and enablePointLight().

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

- RenderingDevice.h
- RenderingDevice.cpp