私のアプリケーションは、nVidia Optimusラップトップ上で実際のGPUを使用して常に実行されます。nVidia Optimusを使用してアプリケーションに実際のGPUを使用するように強制しますか?
「オプティマスシステムでの高性能グラフィックスレンダリングを有効にする」からGlobal Variable NvOptimusEnablement (new in Driver Release 302) Starting with the Release 302 drivers, application developers can direct the Optimus driver at runtime to use the High Performance Graphics to render any application–even those applications for which there is no existing application profile. They can do this by exporting a global variable named NvOptimusEnablement. The Optimus driver looks for the existence and value of the export. Only the LSB of the DWORD matters at this time. A value of 0x00000001 indicates that rendering should be performed using High Performance Graphics. A value of 0x00000000 indicates that this method should be ignored. Example Usage:
extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; }
問題は、私は、この使用デルファイをしたいということです。私が読んだことから、いくつかのハックが存在しても、Delphiは変数のエクスポートをサポートしていません。私はそれらのいくつかを試しましたが、動作させることができませんでした。
同じnvidiaドキュメントでは、適切なGPUを強制することは、静的にリストされた一揃いのDLLの1つにリンクすることで実現できます。しかし、私は使用していないdllにリンクしたくありません。 (なぜopengl.dllがそれらのどれでもないのです。)単純なエクスポートされた変数はもっときれいです。
アプリケーションプロファイルの作成はどうですか? –
このQはdupeのように見えます:http://stackoverflow.com/questions/3641983/export-a-global-symbol-from-a-delphi-dll –
C++プログラムからグローバルをエクスポートすると、その名前は装飾されていますか。見つけ出すにはdumpbinかdependを使います。その後、同じ装飾をデルファイの輸出に適用します。 –