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

Lamp::BasicFramework Class Reference

基本フレームワーク More...

#include <BasicFramework.h>

Inheritance diagram for Lamp::BasicFramework:

Lamp::SimpleFramework Lamp::GraphicsDeviceObjectHolder Lamp::ConfirmGraphicsDevice Lamp::SceneFramework List of all members.

Public Member Functions

 BasicFramework (const String &name)
 コンストラクタ

virtual ~BasicFramework ()
 デストラクタ

virtual bool confirmGraphicsDevice (const D3DCapacity &deviceCapability, u_int vertexProcessingType, D3DFORMAT adapterFormat, D3DFORMAT backBufferFormat)
 グラフィックスデバイスの確認

virtual bool initializeGraphicsDeviceObjects ()
 デバイスオブジェクトの初期化

virtual void deleteGraphicsDeviceObjects ()
 デバイスオブジェクトの削除

virtual bool restoreGraphicsDeviceObjects ()
 デバイスオブジェクトのリストア

virtual void invalidateGraphicsDeviceObjects ()
 デバイスオブジェクトの無効化


Protected Member Functions

virtual void mainLoop ()
 メインループ

virtual void drawInformation ()
 情報描画

virtual void drawInformationString (const String &message, Color4c color=Color4c::white, bool alignRight=false, bool alignBottom=false)
 情報文字列描画

virtual String getFPSString () const
 FPS文字列の取得.

virtual void frameworkRun ()
 フレームワーク実行

virtual void frameworkDrawInformation ()
 フレームワーク情報表示


Protected Attributes

RECT informationDrawRect_
 情報描画矩形

ID3DXFont * font_
 フォント

D3DXFONT_DESC fontDescription_
 フォント記述

FPSMeasurementdrawFPSMeasurement_
 描画FPS計測

float drawFPS_
 描画FPS

FPSMeasurementgameFPSMeasurement_
 ゲームFPS計測

float gameFPS_
 ゲームFPS


Detailed Description

基本フレームワーク

シンプルフレームワークにID3DXによるフォント描画とFPS計測と グラフィックスデバイス選択を追加したフレームワーク。

Definition at line 46 of file BasicFramework.h.


Constructor & Destructor Documentation

Lamp::BasicFramework::BasicFramework const String name  ) 
 

コンストラクタ

Parameters:
name アプリケーション名

Definition at line 42 of file BasicFramework.cpp.

References drawFPS_, drawFPSMeasurement_, font_, fontDescription_, gameFPS_, gameFPSMeasurement_, NULL, and StdStrcpy.


Member Function Documentation

virtual bool Lamp::BasicFramework::confirmGraphicsDevice const D3DCapacity deviceCapability,
u_int  vertexProcessingType,
D3DFORMAT  adapterFormat,
D3DFORMAT  backBufferFormat
[inline, virtual]
 

グラフィックスデバイスの確認

デバイスの能力を確認して、使用するならtrue、使用しないならfalseを返す。

Parameters:
deviceCapability デバイス能力
vertexProcessingType 頂点プロセスタイプ
adapterFormat アダプタのフォーマット
backBufferFormat バックバッファのフォーマット
Returns:
デバイスの使用を許可するならばtrueを返す。

Implements Lamp::ConfirmGraphicsDevice.

Definition at line 77 of file BasicFramework.h.

void Lamp::BasicFramework::deleteGraphicsDeviceObjects  )  [virtual]
 

デバイスオブジェクトの削除

デバイスオブジェクトの削除はdeleteDeviceObjectsをオーバライドする

Implements Lamp::GraphicsDeviceObjectHolder.

Definition at line 184 of file BasicFramework.cpp.

References font_, and SafeRelease.

void Lamp::BasicFramework::drawInformationString const String message,
Color4c  color = Color4c::white,
bool  alignRight = false,
bool  alignBottom = false
[protected, virtual]
 

情報文字列描画

Parameters:
message 描画するメッセージ
color 文字の描画色
alignRight trueなら右に寄せて描画する
alignBottom trueなら下に寄せて描画する

Definition at line 141 of file BasicFramework.cpp.

References font_, Lamp::Color4c::getARGB(), Lamp::String::getBytes(), informationDrawRect_, NULL, and u_int.

Referenced by drawInformation().

String Lamp::BasicFramework::getFPSString  )  const [protected, virtual]
 

FPS文字列の取得.

Returns:
FPS文字列

Definition at line 162 of file BasicFramework.cpp.

References drawFPS_, Lamp::String::format(), and gameFPS_.

Referenced by drawInformation().

bool Lamp::BasicFramework::initializeGraphicsDeviceObjects  )  [virtual]
 

デバイスオブジェクトの初期化

デバイスオブジェクトの初期化はinitializeDeviceObjectsをオーバライドする

Returns:
成功したらtrueを返す

Implements Lamp::GraphicsDeviceObjectHolder.

Definition at line 171 of file BasicFramework.cpp.

References DirectXFailed, ErrorOut, font_, fontDescription_, and SafeRelease.

void Lamp::BasicFramework::invalidateGraphicsDeviceObjects  )  [virtual]
 

デバイスオブジェクトの無効化

デバイスオブジェクトの無効化はinvalidateDeviceObjectsをオーバライドする

Implements Lamp::GraphicsDeviceObjectHolder.

Definition at line 204 of file BasicFramework.cpp.

References font_, and NULL.

bool Lamp::BasicFramework::restoreGraphicsDeviceObjects  )  [virtual]
 

デバイスオブジェクトのリストア

デバイスオブジェクトのリストアはrestoreDeviceObjectsをオーバライドする このメソッド内ででデバイスステートを変更すると、デフォルトステートとなり、 レンダラセットアップ時にそのステートが復元されます。

Returns:
成功したらtrueを返す

Implements Lamp::GraphicsDeviceObjectHolder.

Definition at line 190 of file BasicFramework.cpp.

References DirectXFailed, ErrorOut, font_, NULL, and SafeRelease.


The documentation for this class was generated from the following files:
Generated on Wed Mar 16 10:29:44 2005 for Lamp by doxygen 1.3.2