>However, it would be advisable to keep track of these yourself, >so that you can avoid the overhead of making a useless D3D call. >The memory and processing footprint of doing this should be really low, anyways.
SetRenderState( A, valueA ) // set on device SetRenderState( A, valueB ) // set on device SetRenderState( A, valueA ) // set on device SetRenderState( A, valueB ) // set on device - only value that gets used DrawSomething()
単純にSetRenderStateだけを自前でラップしたところで SetRenderState( A, valueA ) // set on device SetRenderState( A, valueB ) // set on device SetRenderState( A, valueA ) // set on device は防げないし。 ステートの変更を自前で控えておいて、Draw〜系の呼び出し時に まとめて迎撃するのは意味がある様にも思えるけど、 これはD3Dの内部で同じことをやってくれてないのかなあ。
--------------------------- Setup - Microsoft DirectX SDK --------------------------- This version of the Microsoft DirectX SDK is not supported on this Operating System. --------------------------- OK --------------------------- ダメだぁあああああああああああ!!!!!!!
たとえば 多角形A x = -1437.273804, y = 15712.901367 x = -1444.715088, y = 15713.530273 x = -1437.696411, y = 15711.789063 多角形B x = -1437.273804, y = 15712.901367 x = -1437.696411, y = 15711.789063 x = -1433.636719, y = 15713.075195 x = -1434.369751, y = 15713.475586
//-------------------------------------------------------------------------------------- // File: DXUT.h // // DirectX SDK Direct3D sample framework // // Copyright (c) Microsoft Corporation. All rights reserved. //-------------------------------------------------------------------------------------- #pragma once #ifndef DXUT_H #define DXUT_H
#ifndef UNICODE #error "The sample framework requires a Unicode build. If you are using Microsoft Visual C++ .NET, under the General tab of the project properties change the Character Set to 'Use Unicode Character Set'." #endif
DXUT.hをインクルードしてコンパイルすると、13行目の「#error "The 〜Set'."」でerror C1189が出るんだが、どうにかならない? 正直なんでここでエラーが出るか分からないorz
ちなみに、 The sample framework requires a Unicode build. If you are using Microsoft Visual C++ .NET, under the General tab of the project properties change the Character Set to 'Use Unicode Character Set この通りにUnicodeセットでプロジェクトを変更すると、鬼のごとく参照エラーが・・・鬱だしのう