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

GraphicsDeviceSettings.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 // Lamp : Open source game middleware
00003 // Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //------------------------------------------------------------------------------
00019 
00020 /** @file
00021  * グラフィックスデバイス設定ヘッダ
00022  * @author Junpee
00023  */
00024 
00025 #ifndef GRAPHICS_DEVICE_SETTINGS_H_
00026 #define GRAPHICS_DEVICE_SETTINGS_H_
00027 
00028 #include <Graphics/Enumeration/GraphicsDeviceComboInformation.h>
00029 
00030 namespace Lamp{
00031 
00032 class GraphicsAdapterInformation;
00033 class GraphicsDeviceInformation;
00034 
00035 //------------------------------------------------------------------------------
00036 /**
00037  * グラフィックスデバイス設定
00038  */
00039 class GraphicsDeviceSettings{
00040 public:
00041     //--------------------------------------------------------------------------
00042     /**
00043      * インスタンス取得
00044      * @return インスタンス
00045      */
00046     static GraphicsDeviceSettings* getInstance(){
00047         Assert(instance_ != NULL);
00048         return instance_;
00049     }
00050 
00051     //--------------------------------------------------------------------------
00052     /**
00053      * コンストラクタ
00054      */
00055     GraphicsDeviceSettings(){
00056         Assert(instance_ == NULL);
00057         instance_ = this;
00058         isWindowed_ = true;
00059         // ウィンドウモード
00060         windowedAdapterInformation_ = NULL;
00061         windowedDeviceInformation_ = NULL;
00062         windowedDeviceComboInformation_ = NULL;
00063         windowedDisplayMode_.Width = 0;
00064         windowedDisplayMode_.Height = 0;
00065         windowedDisplayMode_.Format = D3DFMT_UNKNOWN;
00066         windowedDisplayMode_.RefreshRate = 0;
00067         windowedDepthStencilFormat_ = D3DFMT_UNKNOWN;
00068         windowedMultiSampleType_ = D3DMULTISAMPLE_NONE;
00069         windowedMultiSampleQuality_ = 0;
00070         windowedVertexProcessingType_ = VertexProcessingType::software;
00071         windowedPresentationInterval_ = 0;
00072         windowSize_.set(0, 0);
00073         // フルスクリーンモード
00074         fullscreenAdapterInformation_ = NULL;
00075         fullscreenDeviceInformation_ = NULL;
00076         fullscreenDeviceComboInformation_ = NULL;
00077         fullscreenDisplayMode_.Width = 0;
00078         fullscreenDisplayMode_.Height = 0;
00079         fullscreenDisplayMode_.Format = D3DFMT_UNKNOWN;
00080         fullscreenDisplayMode_.RefreshRate = 0;
00081         fullscreenDepthStencilFormat_ = D3DFMT_UNKNOWN;
00082         fullscreenMultiSampleType_ = D3DMULTISAMPLE_NONE;
00083         fullscreenMultiSampleQuality_ = 0;
00084         fullscreenVertexProcessingType_ = VertexProcessingType::software;
00085         fullscreenPresentationInterval_ = 0;
00086     }
00087 
00088     /**
00089      * デストラクタ
00090      */
00091     ~GraphicsDeviceSettings(){
00092         Assert(instance_ == this);
00093         instance_ = NULL;
00094     }
00095     /**
00096      * プレゼンテーションパラメータの構築
00097      * @param parameters [out] プレゼンテーションパラメータへのポインタ
00098      * @param windowHandle ウィンドウハンドル
00099      */
00100     virtual void buildPresentationParameters(
00101         D3DPRESENT_PARAMETERS* parameters, HWND windowHandle){
00102         // ウィンドウモードの設定
00103         parameters->Windowed = isWindowed();
00104         // ウィンドウハンドルの設定
00105         parameters->hDeviceWindow = windowHandle;
00106         // バックバッファは1枚
00107         parameters->BackBufferCount = 1;
00108         // マルチサンプルの設定
00109         parameters->MultiSampleType = getMultiSampleType();
00110         parameters->MultiSampleQuality = getMultiSampleQuality();
00111         // スワップ方式はドライバに任せる
00112         parameters->SwapEffect = D3DSWAPEFFECT_DISCARD;
00113         // 深度、ステンシルフォーマットが有効であれば使用する。
00114         bool useDepthBuffer = getDepthStencilEnabled();
00115         parameters->EnableAutoDepthStencil = useDepthBuffer;
00116         parameters->AutoDepthStencilFormat = getDepthStencilFormat();
00117         parameters->Flags = 0;
00118         if(useDepthBuffer){
00119             parameters->Flags |= D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL;
00120         }
00121         // バックバッファの設定
00122         DimensionI backBufferSize = getBackBufferSize();
00123         parameters->BackBufferWidth = backBufferSize.width;
00124         parameters->BackBufferHeight = backBufferSize.height;
00125         parameters->BackBufferFormat = getBackBufferFormat();
00126         parameters->PresentationInterval = getPresentationInterval();
00127         if(isWindowed()){
00128             parameters->FullScreen_RefreshRateInHz = 0;
00129         }else{
00130             parameters->FullScreen_RefreshRateInHz =
00131                 getDisplayMode().RefreshRate;
00132         }
00133     }
00134 
00135     //--------------------------------------------------------------------------
00136     /**
00137      * ウィンドウモードの設定
00138      * @param isWindowed ウィンドウモードならtrue
00139      */
00140     virtual void setWindowed(bool isWindowed){ isWindowed_ = isWindowed; }
00141 
00142     /**
00143      * ウィンドウモードの取得
00144      * @return ウィンドウモードならtrue
00145      */
00146     virtual bool isWindowed(){ return isWindowed_; }
00147 
00148     //--------------------------------------------------------------------------
00149     /**
00150      * バックバッファサイズの取得
00151      * @return バックバッファサイズ
00152      */
00153     virtual DimensionI getBackBufferSize(){
00154         DimensionI backBufferSize;
00155         if(isWindowed()){
00156             backBufferSize.set(windowSize_.width, windowSize_.height);
00157         }else{
00158             backBufferSize.set(getDisplayMode().Width, getDisplayMode().Height);
00159         }
00160         return backBufferSize;
00161     }
00162 
00163     /**
00164      * バックバッファフォーマットの取得
00165      * @return バックバッファフォーマット
00166      */
00167     virtual D3DFORMAT getBackBufferFormat(){
00168         return getDeviceComboInformation()->getBackBufferFormat();
00169     }
00170 
00171     //--------------------------------------------------------------------------
00172     /**
00173      * アダプタ情報の設定
00174      * @param adapterInformation アダプタ情報
00175      */
00176     virtual void setAdapterInformation(
00177         GraphicsAdapterInformation* adapterInformation){
00178         if(isWindowed_){ windowedAdapterInformation_ = adapterInformation;; }
00179         else{ fullscreenAdapterInformation_ = adapterInformation; }
00180     }
00181 
00182     /**
00183      * アダプタ情報の取得
00184      * @return アダプタ情報
00185      */
00186     virtual GraphicsAdapterInformation* getAdapterInformation(){
00187         if(isWindowed_){ return windowedAdapterInformation_; }
00188         else{ return fullscreenAdapterInformation_; }
00189     }
00190 
00191     //--------------------------------------------------------------------------
00192     /**
00193      * デバイス情報の設定
00194      * @param deviceInformation デバイス情報
00195      */
00196     virtual void setDeviceInformation(
00197         GraphicsDeviceInformation* deviceInformation){
00198         if(isWindowed_){ windowedDeviceInformation_ = deviceInformation;; }
00199         else{ fullscreenDeviceInformation_ = deviceInformation; }
00200     }
00201 
00202     /**
00203      * デバイス情報の取得
00204      * @return デバイス情報
00205      */
00206     virtual GraphicsDeviceInformation* getDeviceInformation(){
00207         if(isWindowed_){ return windowedDeviceInformation_; }
00208         else{ return fullscreenDeviceInformation_; }
00209     }
00210 
00211     //--------------------------------------------------------------------------
00212     /**
00213      * デバイスコンボ情報の設定
00214      * @param deviceComboInformation デバイスコンボ情報
00215      */
00216     virtual void setDeviceComboInformation(
00217         GraphicsDeviceComboInformation* deviceComboInformation){
00218         if(isWindowed_){
00219             windowedDeviceComboInformation_ = deviceComboInformation;
00220         }else{
00221             fullscreenDeviceComboInformation_ = deviceComboInformation;
00222         }
00223     }
00224 
00225     /**
00226      * デバイスコンボ情報の取得
00227      * @return デバイスコンボ情報
00228      */
00229     virtual GraphicsDeviceComboInformation* getDeviceComboInformation(){
00230         if(isWindowed_){ return windowedDeviceComboInformation_; }
00231         else{ return fullscreenDeviceComboInformation_; }
00232     }
00233 
00234     //--------------------------------------------------------------------------
00235     /**
00236      * ディスプレイモードの設定
00237      * @param displayMode ディスプレイモード
00238      */
00239     virtual void setDisplayMode(D3DDISPLAYMODE displayMode){
00240         if(isWindowed_){ windowedDisplayMode_ = displayMode; }
00241         else{ fullscreenDisplayMode_ = displayMode; }
00242     }
00243 
00244     /**
00245      * ディスプレイモードの取得
00246      * @return ディスプレイモード
00247      */
00248     virtual D3DDISPLAYMODE getDisplayMode(){
00249         if(isWindowed_){ return windowedDisplayMode_; }
00250         else{ return fullscreenDisplayMode_; }
00251     }
00252 
00253     //--------------------------------------------------------------------------
00254     /**
00255      * 深度、ステンシルが有効か
00256      * @return 深度、ステンシルが有効ならtrue
00257      */
00258     virtual bool getDepthStencilEnabled(){
00259         return (getDepthStencilFormat() != D3DFMT_UNKNOWN);
00260     }
00261 
00262     /**
00263      * 深度、ステンシルフォーマットの設定
00264      * @param depthStencilFormat 深度、ステンシルフォーマット
00265      */
00266     virtual void setDepthStencilFormat(D3DFORMAT depthStencilFormat){
00267         if(isWindowed_){ windowedDepthStencilFormat_ = depthStencilFormat; }
00268         else{ fullscreenDepthStencilFormat_ = depthStencilFormat; }
00269     }
00270 
00271     /**
00272      * 深度、ステンシルフォーマットの取得
00273      * @return 深度、ステンシルフォーマット
00274      */
00275     virtual D3DFORMAT getDepthStencilFormat(){
00276         if(isWindowed_){ return windowedDepthStencilFormat_; }
00277         else{ return fullscreenDepthStencilFormat_; }
00278     }
00279 
00280     //--------------------------------------------------------------------------
00281     /**
00282      * マルチサンプルタイプの設定
00283      * @param multiSampleType マルチサンプルタイプ
00284      */
00285     virtual void setMultiSampleType(D3DMULTISAMPLE_TYPE multiSampleType){
00286         if(isWindowed_){ windowedMultiSampleType_ = multiSampleType; }
00287         else{ fullscreenMultiSampleType_ = multiSampleType; }
00288     }
00289 
00290     /**
00291      * マルチサンプルタイプの取得
00292      * @return マルチサンプルタイプ
00293      */
00294     virtual D3DMULTISAMPLE_TYPE getMultiSampleType(){
00295         if(isWindowed_){ return windowedMultiSampleType_; }
00296         else{ return fullscreenMultiSampleType_; }
00297     }
00298 
00299     //--------------------------------------------------------------------------
00300     /**
00301      * マルチサンプルクォリティの設定
00302      * @param multiSampleQuality マルチサンプルクォリティ
00303      */
00304     virtual void setMultiSampleQuality(u_int multiSampleQuality){
00305         if(isWindowed_){ windowedMultiSampleQuality_ = multiSampleQuality; }
00306         else{ fullscreenMultiSampleQuality_ = multiSampleQuality; }
00307     }
00308 
00309     /**
00310      * マルチサンプルクォリティの取得
00311      * @return マルチサンプルクォリティ
00312      */
00313     virtual u_int getMultiSampleQuality(){
00314         if(isWindowed_){ return windowedMultiSampleQuality_; }
00315         else{ return fullscreenMultiSampleQuality_; }
00316     }
00317 
00318     //--------------------------------------------------------------------------
00319     /**
00320      * 頂点プロセスタイプの設定
00321      * @param vertexProcessingType 頂点プロセスタイプ
00322      */
00323     virtual void setVertexProcessingType(
00324         VertexProcessingType vertexProcessingType){
00325         if(isWindowed_){ windowedVertexProcessingType_ = vertexProcessingType; }
00326         else{ fullscreenVertexProcessingType_ = vertexProcessingType; }
00327     }
00328 
00329     /**
00330      * 頂点プロセスタイプの取得
00331      * @return 頂点プロセスタイプ
00332      */
00333     virtual VertexProcessingType getVertexProcessingType(){
00334         if(isWindowed_){ return windowedVertexProcessingType_; }
00335         else{ return fullscreenVertexProcessingType_; }
00336     }
00337 
00338     //--------------------------------------------------------------------------
00339     /**
00340      * プレゼンテーション間隔の設定
00341      * @param presentationInterval プレゼンテーション間隔
00342      */
00343     virtual void setPresentationInterval(u_int presentationInterval){
00344         if(isWindowed_){ windowedPresentationInterval_ = presentationInterval; }
00345         else{ fullscreenPresentationInterval_ = presentationInterval; }
00346     }
00347 
00348     /**
00349      * プレゼンテーション間隔の取得
00350      * @return プレゼンテーション間隔
00351      */
00352     virtual u_int getPresentationInterval(){
00353         if(isWindowed_){ return windowedPresentationInterval_; }
00354         else{ return fullscreenPresentationInterval_; }
00355     }
00356 
00357     //--------------------------------------------------------------------------
00358     // ウィンドウモード
00359     //--------------------------------------------------------------------------
00360     /**
00361      * ウィンドウモードアダプタ情報の設定
00362      * @param adapterInformation ウィンドウモードアダプタ情報
00363      */
00364     virtual void setWindowedAdapterInformation(
00365         GraphicsAdapterInformation* adapterInformation){
00366         windowedAdapterInformation_ = adapterInformation;
00367     }
00368 
00369     /**
00370      * ウィンドウモードアダプタ情報の取得
00371      * @return ウィンドウモードアダプタ情報
00372      */
00373     virtual GraphicsAdapterInformation* getWindowedAdapterInformation(){
00374         return windowedAdapterInformation_;
00375     }
00376 
00377     //--------------------------------------------------------------------------
00378     /**
00379      * ウィンドウモードデバイス情報の設定
00380      * @param deviceInformation ウィンドウモードデバイス情報
00381      */
00382     virtual void setWindowedDeviceInformation(
00383         GraphicsDeviceInformation* deviceInformation){
00384         windowedDeviceInformation_ = deviceInformation;
00385     }
00386 
00387     /**
00388      * ウィンドウモードデバイス情報の取得
00389      * @return ウィンドウモードデバイス情報
00390      */
00391     virtual GraphicsDeviceInformation* getWindowedDeviceInformation(){
00392         return windowedDeviceInformation_;
00393     }
00394 
00395     //--------------------------------------------------------------------------
00396     /**
00397      * ウィンドウモードデバイスコンボ情報の設定
00398      * @param deviceComboInformation ウィンドウモードデバイスコンボ情報
00399      */
00400     virtual void setWindowedDeviceComboInformation(
00401         GraphicsDeviceComboInformation* deviceComboInformation){
00402         windowedDeviceComboInformation_ = deviceComboInformation;
00403     }
00404 
00405     /**
00406      * ウィンドウモードデバイスコンボ情報の取得
00407      * @return ウィンドウモードデバイスコンボ情報
00408      */
00409     virtual GraphicsDeviceComboInformation* getWindowedDeviceComboInformation(){
00410         return windowedDeviceComboInformation_;
00411     }
00412 
00413     //--------------------------------------------------------------------------
00414     /**
00415      * ウィンドウモードディスプレイモードの設定
00416      * @param displayMode ウィンドウモードディスプレイモード
00417      */
00418     virtual void setWindowedDisplayMode(D3DDISPLAYMODE displayMode){
00419         windowedDisplayMode_ = displayMode;
00420     }
00421 
00422     /**
00423      * ウィンドウモードディスプレイモードの取得
00424      * @return ウィンドウモードディスプレイモード
00425      */
00426     virtual D3DDISPLAYMODE getWindowedDisplayMode(){
00427         return windowedDisplayMode_;
00428     }
00429 
00430     //--------------------------------------------------------------------------
00431     /**
00432      * ウィンドウモード深度、ステンシルフォーマットの設定
00433      * @param depthStencilFormat ウィンドウモード深度、ステンシルフォーマット
00434      */
00435     virtual void setWindowedDepthStencilFormat(D3DFORMAT depthStencilFormat){
00436         windowedDepthStencilFormat_ = depthStencilFormat;
00437     }
00438 
00439     /**
00440      * ウィンドウモード深度、ステンシルフォーマットの取得
00441      * @return ウィンドウモード深度、ステンシルフォーマット
00442      */
00443     virtual D3DFORMAT getWindowedDepthStencilFormat(){
00444         return windowedDepthStencilFormat_;
00445     }
00446 
00447     //--------------------------------------------------------------------------
00448     /**
00449      * ウィンドウモードマルチサンプルタイプの設定
00450      * @param multiSampleType ウィンドウモードマルチサンプルタイプ
00451      */
00452     virtual void setWindowedMultiSampleType(
00453         D3DMULTISAMPLE_TYPE multiSampleType){
00454         windowedMultiSampleType_ = multiSampleType;
00455     }
00456 
00457     /**
00458      * ウィンドウモードマルチサンプルタイプの取得
00459      * @return ウィンドウモードマルチサンプルタイプ
00460      */
00461     virtual D3DMULTISAMPLE_TYPE getWindowedMultiSampleType(){
00462         return windowedMultiSampleType_;
00463     }
00464 
00465     //--------------------------------------------------------------------------
00466     /**
00467      * ウィンドウモードマルチサンプルクォリティの設定
00468      * @param multiSampleQuality ウィンドウモードマルチサンプルクォリティ
00469      */
00470     virtual void setWindowedMultiSampleQuality(u_int multiSampleQuality){
00471         windowedMultiSampleQuality_ = multiSampleQuality;
00472     }
00473 
00474     /**
00475      * ウィンドウモードマルチサンプルクォリティの取得
00476      * @return ウィンドウモードマルチサンプルクォリティ
00477      */
00478     virtual u_int getWindowedMultiSampleQuality(){
00479         return windowedMultiSampleQuality_;
00480     }
00481 
00482     //--------------------------------------------------------------------------
00483     /**
00484      * ウィンドウモード頂点プロセスタイプの設定
00485      * @param vertexProcessingType ウィンドウモード頂点プロセスタイプ
00486      */
00487     virtual void setWindowedVertexProcessingType(
00488         VertexProcessingType vertexProcessingType){
00489         windowedVertexProcessingType_ = vertexProcessingType;
00490     }
00491 
00492     /**
00493      * ウィンドウモード頂点プロセスタイプの取得
00494      * @return ウィンドウモード頂点プロセスタイプ
00495      */
00496     virtual VertexProcessingType getWindowedVertexProcessingType(){
00497         return windowedVertexProcessingType_;
00498     }
00499 
00500     //--------------------------------------------------------------------------
00501     /**
00502      * ウィンドウモードプレゼンテーション間隔の設定
00503      * @param presentationInterval ウィンドウモードプレゼンテーション間隔
00504      */
00505     virtual void setWindowedPresentationInterval(u_int presentationInterval){
00506         windowedPresentationInterval_ = presentationInterval;
00507     }
00508 
00509     /**
00510      * ウィンドウモードプレゼンテーション間隔の取得
00511      * @return ウィンドウモードプレゼンテーション間隔
00512      */
00513     virtual u_int getWindowedPresentationInterval(){
00514         return windowedPresentationInterval_;
00515     }
00516 
00517     //--------------------------------------------------------------------------
00518     /**
00519      * ウィンドウサイズの設定
00520      * @param size ウィンドウサイズ
00521      */
00522     virtual void setWindowSize(DimensionI size){ windowSize_ = size; }
00523 
00524     /**
00525      * ウィンドウサイズの取得
00526      * @return ウィンドウサイズ
00527      */
00528     virtual const DimensionI& getWindowSize(){ return windowSize_; }
00529 
00530     //--------------------------------------------------------------------------
00531     // フルスクリーンモード
00532     //--------------------------------------------------------------------------
00533     /**
00534      * フルスクリーンモードアダプタ情報の設定
00535      * @param adapterInformation フルスクリーンモードアダプタ情報
00536      */
00537     virtual void setFullscreenAdapterInformation(
00538         GraphicsAdapterInformation* adapterInformation){
00539         fullscreenAdapterInformation_ = adapterInformation;
00540     }
00541 
00542     /**
00543      * フルスクリーンモードアダプタ情報の取得
00544      * @return フルスクリーンモードアダプタ情報
00545      */
00546     virtual GraphicsAdapterInformation* getFullscreenAdapterInformation(){
00547         return fullscreenAdapterInformation_;
00548     }
00549 
00550     //--------------------------------------------------------------------------
00551     /**
00552      * フルスクリーンモードデバイス情報の設定
00553      * @param deviceInformation フルスクリーンモードデバイス情報
00554      */
00555     virtual void setFullscreenDeviceInformation(
00556         GraphicsDeviceInformation* deviceInformation){
00557         fullscreenDeviceInformation_ = deviceInformation;
00558     }
00559 
00560     /**
00561      * フルスクリーンモードデバイス情報の取得
00562      * @return フルスクリーンモードデバイス情報
00563      */
00564     virtual GraphicsDeviceInformation* getFullscreenDeviceInformation(){
00565         return fullscreenDeviceInformation_;
00566     }
00567 
00568     //--------------------------------------------------------------------------
00569     /**
00570      * フルスクリーンモードデバイスコンボ情報の設定
00571      * @param deviceComboInformation フルスクリーンモードデバイスコンボ情報
00572      */
00573     virtual void setFullscreenDeviceComboInformation(
00574         GraphicsDeviceComboInformation* deviceComboInformation){
00575         fullscreenDeviceComboInformation_ = deviceComboInformation;
00576     }
00577 
00578     /**
00579      * フルスクリーンモードデバイスコンボ情報の取得
00580      * @return フルスクリーンモードデバイスコンボ情報
00581      */
00582     virtual GraphicsDeviceComboInformation*
00583         getFullscreenDeviceComboInformation(){
00584         return fullscreenDeviceComboInformation_;
00585     }
00586 
00587     //--------------------------------------------------------------------------
00588     /**
00589      * フルスクリーンモードディスプレイモードの設定
00590      * @param displayMode フルスクリーンモードディスプレイモード
00591      */
00592     virtual void setFullscreenDisplayMode(D3DDISPLAYMODE displayMode){
00593         fullscreenDisplayMode_ = displayMode;
00594     }
00595 
00596     /**
00597      * フルスクリーンモードディスプレイモードの取得
00598      * @return フルスクリーンモードディスプレイモード
00599      */
00600     virtual D3DDISPLAYMODE getFullscreenDisplayMode(){
00601         return fullscreenDisplayMode_;
00602     }
00603 
00604     //--------------------------------------------------------------------------
00605     /**
00606      * フルスクリーンモード深度、ステンシルフォーマットの設定
00607      * @param depthStencilFormat フルスクリーンモード深度、ステンシルフォーマット
00608      */
00609     virtual void setFullscreenDepthStencilFormat(D3DFORMAT depthStencilFormat){
00610         fullscreenDepthStencilFormat_ = depthStencilFormat;
00611     }
00612 
00613     /**
00614      * フルスクリーンモード深度、ステンシルフォーマットの取得
00615      * @return フルスクリーンモード深度、ステンシルフォーマット
00616      */
00617     virtual D3DFORMAT getFullscreenDepthStencilFormat(){
00618         return fullscreenDepthStencilFormat_;
00619     }
00620 
00621     //--------------------------------------------------------------------------
00622     /**
00623      * フルスクリーンモードマルチサンプルタイプの設定
00624      * @param multiSampleType フルスクリーンモードマルチサンプルタイプ
00625      */
00626     virtual void setFullscreenMultiSampleType(
00627         D3DMULTISAMPLE_TYPE multiSampleType){
00628         fullscreenMultiSampleType_ = multiSampleType;
00629     }
00630 
00631     /**
00632      * フルスクリーンモードマルチサンプルタイプの取得
00633      * @return フルスクリーンモードマルチサンプルタイプ
00634      */
00635     virtual D3DMULTISAMPLE_TYPE getFullscreenMultiSampleType(){
00636         return fullscreenMultiSampleType_;
00637     }
00638 
00639     //--------------------------------------------------------------------------
00640     /**
00641      * フルスクリーンモードマルチサンプルクォリティの設定
00642      * @param multiSampleQuality フルスクリーンモードマルチサンプルクォリティ
00643      */
00644     virtual void setFullscreenMultiSampleQuality(u_int multiSampleQuality){
00645         fullscreenMultiSampleQuality_ = multiSampleQuality;
00646     }
00647 
00648     /**
00649      * フルスクリーンモードマルチサンプルクォリティの取得
00650      * @return フルスクリーンモードマルチサンプルクォリティ
00651      */
00652     virtual u_int getFullscreenMultiSampleQuality(){
00653         return fullscreenMultiSampleQuality_;
00654     }
00655 
00656     //--------------------------------------------------------------------------
00657     /**
00658      * フルスクリーンモード頂点プロセスタイプの設定
00659      * @param vertexProcessingType フルスクリーンモード頂点プロセスタイプ
00660      */
00661     virtual void setFullscreenVertexProcessingType(
00662         VertexProcessingType vertexProcessingType){
00663         fullscreenVertexProcessingType_ = vertexProcessingType;
00664     }
00665 
00666     /**
00667      * フルスクリーンモード頂点プロセスタイプの取得
00668      * @return フルスクリーンモード頂点プロセスタイプ
00669      */
00670     virtual VertexProcessingType getFullscreenVertexProcessingType(){
00671         return fullscreenVertexProcessingType_;
00672     }
00673 
00674     //--------------------------------------------------------------------------
00675     /**
00676      * フルスクリーンモードプレゼンテーション間隔の設定
00677      * @param presentationInterval フルスクリーンモードプレゼンテーション間隔
00678      */
00679     virtual void setFullscreenPresentationInterval(u_int presentationInterval){
00680         fullscreenPresentationInterval_ = presentationInterval;
00681     }
00682 
00683     /**
00684      * フルスクリーンモードプレゼンテーション間隔の取得
00685      * @return フルスクリーンモードプレゼンテーション間隔
00686      */
00687     virtual u_int getFullscreenPresentationInterval(){
00688         return fullscreenPresentationInterval_;
00689     }
00690 
00691 private:
00692     // ウィンドウモードか
00693     bool isWindowed_;
00694 
00695     //--------------------------------------------------------------------------
00696     // ウィンドウモード
00697     //--------------------------------------------------------------------------
00698 
00699     // アダプタ情報
00700     GraphicsAdapterInformation* windowedAdapterInformation_;
00701     // デバイス情報
00702     GraphicsDeviceInformation* windowedDeviceInformation_;
00703     // デバイスコンボ情報
00704     GraphicsDeviceComboInformation* windowedDeviceComboInformation_;
00705     // ディスプレイモード
00706     D3DDISPLAYMODE windowedDisplayMode_;
00707     // 深度、ステンシルフォーマット
00708     D3DFORMAT windowedDepthStencilFormat_;
00709     // マルチサンプルタイプ
00710     D3DMULTISAMPLE_TYPE windowedMultiSampleType_;
00711     // マルチサンプルクォリティ
00712     u_int windowedMultiSampleQuality_;
00713     // 頂点プロセスタイプ
00714     VertexProcessingType windowedVertexProcessingType_;
00715     // プレゼンテーション間隔
00716     u_int windowedPresentationInterval_;
00717     // ウィンドウサイズ
00718     DimensionI windowSize_;
00719 
00720     //--------------------------------------------------------------------------
00721     // フルスクリーンモード
00722     //--------------------------------------------------------------------------
00723 
00724     // アダプタ情報
00725     GraphicsAdapterInformation* fullscreenAdapterInformation_;
00726     // デバイス情報
00727     GraphicsDeviceInformation* fullscreenDeviceInformation_;
00728     // デバイスコンボ情報
00729     GraphicsDeviceComboInformation* fullscreenDeviceComboInformation_;
00730     // ディスプレイモード
00731     D3DDISPLAYMODE fullscreenDisplayMode_;
00732     // 深度、ステンシルフォーマット
00733     D3DFORMAT fullscreenDepthStencilFormat_;
00734     // マルチサンプルタイプ
00735     D3DMULTISAMPLE_TYPE fullscreenMultiSampleType_;
00736     // マルチサンプルクォリティ
00737     u_int fullscreenMultiSampleQuality_;
00738     // 頂点プロセスタイプ
00739     VertexProcessingType fullscreenVertexProcessingType_;
00740     // プレゼンテーション間隔
00741     u_int fullscreenPresentationInterval_;
00742 
00743     // インスタンス
00744     static GraphicsDeviceSettings* instance_;
00745 
00746 };
00747 
00748 //------------------------------------------------------------------------------
00749 } // End of namespace Lamp
00750 #endif // End of GRAPHICS_DEVICE_SETTINGS_H_
00751 //------------------------------------------------------------------------------

Generated on Wed Mar 16 10:29:31 2005 for Lamp by doxygen 1.3.2