aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChien Yang <[email protected]>2007-04-12 17:29:50 +0000
committerChien Yang <[email protected]>2007-04-12 17:29:50 +0000
commit7871bb635f0337fc1124a84d7a557736d0f2b647 (patch)
treeb909638c3768aa3745cccea35df13b7ac902998b /src
parent4a9c4dc77959be041aa9cdddf9e18c25426355a2 (diff)
Fix to Issue 226 submitted by aces.
Issue 226 - D3D : fail on stress test for the creation and destruction of Canvases git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@816 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src')
-rw-r--r--src/native/d3d/D3dCtx.cpp33
-rw-r--r--src/native/d3d/D3dDeviceInfo.cpp39
-rw-r--r--src/native/d3d/D3dDeviceInfo.hpp3
-rw-r--r--src/native/d3d/D3dDriverInfo.cpp219
-rw-r--r--src/native/d3d/D3dUtil.cpp166
5 files changed, 239 insertions, 221 deletions
diff --git a/src/native/d3d/D3dCtx.cpp b/src/native/d3d/D3dCtx.cpp
index 58b629b..cc25196 100644
--- a/src/native/d3d/D3dCtx.cpp
+++ b/src/native/d3d/D3dCtx.cpp
@@ -770,11 +770,15 @@ VOID D3dCtx::setPresentParams(JNIEnv *env, jobject obj)
d3dPresent.AutoDepthStencilFormat = deviceInfo->depthStencilFormat;
d3dPresent.EnableAutoDepthStencil = true;
- if ((antialiasing != UNNECESSARY) &&
- deviceInfo->supportAntialiasing()) {
- d3dPresent.MultiSampleType = deviceInfo->getBestMultiSampleType();
+ // Fix to Issue 226 : D3D - fail on stress test for the creation and destruction of Canvases
+ bool useMultisample = (antialiasing != UNNECESSARY) && deviceInfo->supportAntialiasing();
+
+ if (useMultisample) {
+ d3dPresent.MultiSampleType = deviceInfo->getBestMultiSampleType();
+ d3dPresent.MultiSampleQuality = 0;
} else {
- d3dPresent.MultiSampleType = D3DMULTISAMPLE_NONE;
+ d3dPresent.MultiSampleType = D3DMULTISAMPLE_NONE;
+ d3dPresent.MultiSampleQuality = 0;
}
d3dPresent.BackBufferCount = 1;
d3dPresent.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
@@ -784,7 +788,7 @@ VOID D3dCtx::setPresentParams(JNIEnv *env, jobject obj)
// we always call readRaster() just before swap.
// However in this way we can't use multisample effect
-
+ // FULLSCREEN
if (bFullScreen) {
GetWindowRect(topHwnd, &savedTopRect);
GetWindowRect(hwnd, &savedClientRect);
@@ -792,8 +796,7 @@ VOID D3dCtx::setPresentParams(JNIEnv *env, jobject obj)
d3dPresent.Windowed = false;
d3dPresent.hDeviceWindow = topHwnd;
- if ((antialiasing != UNNECESSARY) &&
- deviceInfo->supportAntialiasing()) {
+ if (useMultisample) {
d3dPresent.SwapEffect = D3DSWAPEFFECT_DISCARD;
} else {
d3dPresent.SwapEffect = D3DSWAPEFFECT_FLIP;
@@ -808,11 +811,11 @@ VOID D3dCtx::setPresentParams(JNIEnv *env, jobject obj)
d3dPresent.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
} else {
+ // WINDOWED mode
d3dPresent.Windowed = true;
d3dPresent.hDeviceWindow = hwnd;
- if ((antialiasing != UNNECESSARY) &&
- deviceInfo->supportAntialiasing()) {
+ if (useMultisample) {
d3dPresent.SwapEffect = D3DSWAPEFFECT_DISCARD;
} else {
d3dPresent.SwapEffect = D3DSWAPEFFECT_COPY;
@@ -1814,12 +1817,12 @@ DWORD D3dCtx::findBehavior()
bUseNvPerfHUD = getSystemProperty(jniEnv,"j3d.useNvPerfHUD","true");
if (bUseNvPerfHUD) // must have bForceHwdVertexProcess as true
- {
- printf("\n[Java3D]: using j3d.useNvPerfHUD=true\n");
- bForceHwdVertexProcess = true;
- bForceMixVertexProcess = false;
- bForceSWVertexProcess = false;
- }
+ {
+ printf("\n[Java3D]: using j3d.useNvPerfHUD=true and HARDWARE_VERTEXPROCESSING \n");
+ bForceHwdVertexProcess = true;
+ bForceMixVertexProcess = false;
+ bForceSWVertexProcess = false;
+ }
if (bForceHwdVertexProcess)
{
diff --git a/src/native/d3d/D3dDeviceInfo.cpp b/src/native/d3d/D3dDeviceInfo.cpp
index f018663..28683a7 100644
--- a/src/native/d3d/D3dDeviceInfo.cpp
+++ b/src/native/d3d/D3dDeviceInfo.cpp
@@ -245,23 +245,26 @@ BOOL D3dDeviceInfo::supportAntialiasing() {
void D3dDeviceInfo::findDepthStencilFormat(int minZDepth, int minZDepthStencil)
-{
+{
+ // Fix to Issue 226 : D3D - fail on stress test for the creation and destruction of Canvases
+ //sanity check of stencil and depth
+ minZDepthStencil = min(minZDepthStencil, 8);
+ minZDepth = min(minZDepth, 32);
+
depthStencilFormat = D3DFMT_UNKNOWN;
- for (int i=0; i < D3DDEPTHFORMATSIZE; i++)
- {
- //printf("\ndepthFormatSupport %s, %b",getPixelFormatName(d3dDepthFormat[i]), depthFormatSupport[i]);
- if (depthFormatSupport[i]){
- // prefer one with stencil buffer, follow by D3DFMT_D16_LOCKABLE,
- // printf("\n ZDepth %d, Stencil %d ",d3dDepthTable[i],d3dStencilDepthTable[i]);
- if (d3dDepthTable[i] >= minZDepth && d3dStencilDepthTable[i] >= minZDepthStencil )
- {
- depthStencilFormat = (D3DFORMAT) d3dDepthFormat[i];
- break;
- }
- }//if
- }// for
- // if none suitable found
+ for (int i=0; i < D3DDEPTHFORMATSIZE; i++) {
+ //printf("\ndepthFormatSupport %s, %b",getPixelFormatName(d3dDepthFormat[i]), depthFormatSupport[i]);
+ if (depthFormatSupport[i]){
+ // prefer one with stencil buffer, follow by D3DFMT_D16_LOCKABLE,
+ // printf("\n ZDepth %d, Stencil %d ",d3dDepthTable[i],d3dStencilDepthTable[i]);
+ if (d3dDepthTable[i] >= minZDepth && d3dStencilDepthTable[i] >= minZDepthStencil ) {
+ depthStencilFormat = (D3DFORMAT) d3dDepthFormat[i];
+ break;
+ }
+ }//if
+ }// for
+ // if none suitable found
}
@@ -270,14 +273,16 @@ D3DMULTISAMPLE_TYPE D3dDeviceInfo::getBestMultiSampleType()
DWORD bitmask = 0;
UINT i;
- // start with 4, if none found, try 3 and 2
- for (i=4; i < 16; i++) {
+ // Fix to Issue 226 : D3D - fail on stress test for the creation and destruction of Canvases
+ // start with 4 and up, if none found, try 3 and 2
+ for (i=4; i <= 16; i++) {
bitmask = (1 << i);
if (multiSampleSupport & bitmask) {
return (D3DMULTISAMPLE_TYPE) i;
}
}
+ // try 3 and 2
for (i=3; i >= 2; i--) {
bitmask = (1 << i);
if (multiSampleSupport & bitmask) {
diff --git a/src/native/d3d/D3dDeviceInfo.hpp b/src/native/d3d/D3dDeviceInfo.hpp
index 991d729..7960764 100644
--- a/src/native/d3d/D3dDeviceInfo.hpp
+++ b/src/native/d3d/D3dDeviceInfo.hpp
@@ -17,7 +17,8 @@
extern UINT vertexBufferMaxVertexLimit;
-#define D3DDEPTHFORMATSIZE 6
+// Fix to Issue 226 : D3D - fail on stress test for the creation and destruction of Canvases
+#define D3DDEPTHFORMATSIZE 7
class D3dDeviceInfo {
public:
diff --git a/src/native/d3d/D3dDriverInfo.cpp b/src/native/d3d/D3dDriverInfo.cpp
index 543fc3b..664a347 100644
--- a/src/native/d3d/D3dDriverInfo.cpp
+++ b/src/native/d3d/D3dDriverInfo.cpp
@@ -41,17 +41,19 @@ UINT vertexBufferMaxVertexLimit = 65535;
// Rendering state.
BOOL implicitMultisample;
-D3DFORMAT d3dDepthFormat[D3DDEPTHFORMATSIZE] = { D3DFMT_D15S1,
- D3DFMT_D24S8,
- D3DFMT_D24X4S4,
- D3DFMT_D16_LOCKABLE,
- D3DFMT_D16,
- D3DFMT_D32
- };
+// Fix to Issue 226 : D3D - fail on stress test for the creation and destruction of Canvases
+D3DFORMAT d3dDepthFormat[D3DDEPTHFORMATSIZE] = { D3DFMT_D24S8, // this is the best choice
+ D3DFMT_D24X4S4,
+ D3DFMT_D15S1,
+ D3DFMT_D24X8,
+ D3DFMT_D16_LOCKABLE,
+ D3DFMT_D16,
+ D3DFMT_D32
+};
// This should match the depth bit in the above array
-int d3dDepthTable[D3DDEPTHFORMATSIZE] = {15, 24, 24, 16, 16, 32};
-int d3dStencilDepthTable[D3DDEPTHFORMATSIZE]={ 1, 8, 4, 0, 0, 0};
+int d3dDepthTable[D3DDEPTHFORMATSIZE] = {24, 24, 15, 24, 16, 16, 32};
+int d3dStencilDepthTable[D3DDEPTHFORMATSIZE] = { 8, 4, 1, 0, 0, 0, 0};
D3DLIGHT9 ambientLight;
@@ -140,112 +142,119 @@ VOID setInfo(D3dDeviceInfo* pDevice,D3DADAPTER_IDENTIFIER9 *identifier)
VOID buildDriverList(LPDIRECT3D9 pD3D)
{
numDriver = pD3D->GetAdapterCount();
-
+
if (numDriver <= 0) {
- // keep d3dDriverList = NULL for checking later
- D3dCtx::d3dError(DRIVERNOTFOUND);
- return;
+ // keep d3dDriverList = NULL for checking later
+ D3dCtx::d3dError(DRIVERNOTFOUND);
+ return;
}
-
+
d3dDriverList = new LPD3dDriverInfo[numDriver];
-
+
if (d3dDriverList == NULL) {
- D3dCtx::d3dError(OUTOFMEMORY);
- return;
+ D3dCtx::d3dError(OUTOFMEMORY);
+ return;
}
D3dDriverInfo *pDriver;
-
- for (int i = 0; i < numDriver; i++ )
- {
- pDriver = new D3dDriverInfo();
- d3dDriverList[i] = pDriver;
+
+ for (int i = 0; i < numDriver; i++ ) {
+ pDriver = new D3dDriverInfo();
+ d3dDriverList[i] = pDriver;
pD3D->GetAdapterIdentifier(i, 0,
- &pDriver->adapterIdentifier);
+ &pDriver->adapterIdentifier);
pD3D->GetAdapterDisplayMode(i, &pDriver->desktopMode);
- computeRGBDepth(pDriver);
- pDriver->hMonitor = pD3D->GetAdapterMonitor(i);
- pDriver->iAdapter = i;
-
-
- for (int j = 0; j < numDeviceTypes; j++ )
- {
- D3DCAPS9 d3dCaps;
+ computeRGBDepth(pDriver);
+ pDriver->hMonitor = pD3D->GetAdapterMonitor(i);
+ pDriver->iAdapter = i;
+
+
+ for (int j = 0; j < numDeviceTypes; j++ ) {
+ D3DCAPS9 d3dCaps;
D3dDeviceInfo* pDevice = pDriver->d3dDeviceList[j];
pDevice->deviceType = deviceTypes[j];
pD3D->GetDeviceCaps(i, deviceTypes[j], &d3dCaps);
- pDevice->setCaps(&d3dCaps);
-
- pDevice->desktopCompatible =
- SUCCEEDED(pD3D->CheckDeviceType(i, deviceTypes[j],
- pDriver->desktopMode.Format,
- pDriver->desktopMode.Format,
- TRUE));
-
- pDevice->fullscreenCompatible =
- SUCCEEDED(pD3D->CheckDeviceType(i,deviceTypes[j],
- pDriver->desktopMode.Format,
- pDriver->desktopMode.Format,
- FALSE));
-
- pDevice->maxZBufferDepthSize = 0;
-
- if (pDevice->isHardwareTnL) {
- strcpy(pDevice->deviceName, "Transform & Light Hardware Rasterizer");
- } else if (pDevice->isHardware) {
- strcpy(pDevice->deviceName, "Hardware Rasterizer");
- } else {
- strcpy(pDevice->deviceName, "Reference Rasterizer");
- }
- //issue 135 put here info about vendor and device model
- setInfo(pDevice, &pDriver->adapterIdentifier);
-
- for (int k=0; k < D3DDEPTHFORMATSIZE; k++) {
- pDevice->depthFormatSupport[k] =
- SUCCEEDED(pD3D->CheckDeviceFormat(i, deviceTypes[j],
- pDriver->desktopMode.Format,
- D3DUSAGE_DEPTHSTENCIL,
- D3DRTYPE_SURFACE,
- d3dDepthFormat[k]))
- &&
- SUCCEEDED(pD3D->CheckDepthStencilMatch(i, deviceTypes[j],
- pDriver->desktopMode.Format,
- pDriver->desktopMode.Format,
- d3dDepthFormat[k]));
- if (pDevice->depthFormatSupport[k])
- {
- if (d3dDepthTable[k] > pDevice->maxZBufferDepthSize)
- {
- pDevice->maxZBufferDepthSize = d3dDepthTable[k];
- pDevice->maxStencilDepthSize = d3dStencilDepthTable[k];
- if (d3dStencilDepthTable[k]>0)
- {
- pDevice->supportStencil = true;
- }
- else
- {
- pDevice->supportStencil = false;
- }
- }
- }
- }
-
- DWORD bitmask = 1 << 2;
- pDevice->multiSampleSupport = 0;
- for (int mtype = D3DMULTISAMPLE_2_SAMPLES;
- mtype <= D3DMULTISAMPLE_16_SAMPLES; mtype++) {
- // consider desktop mode only for multisampling
- if (SUCCEEDED(pD3D->CheckDeviceMultiSampleType(i, deviceTypes[j],
- pDriver->desktopMode.Format,
- TRUE,
- (D3DMULTISAMPLE_TYPE) mtype,NULL)
- )) {
- pDevice->multiSampleSupport |= bitmask;
- }
- bitmask <<= 1;
- }
- }
- }
+ pDevice->setCaps(&d3dCaps);
+
+ pDevice->desktopCompatible =
+ SUCCEEDED(pD3D->CheckDeviceType(i, deviceTypes[j],
+ pDriver->desktopMode.Format,
+ pDriver->desktopMode.Format,
+ TRUE));
+
+ pDevice->fullscreenCompatible =
+ SUCCEEDED(pD3D->CheckDeviceType(i, deviceTypes[j],
+ pDriver->desktopMode.Format,
+ pDriver->desktopMode.Format,
+ FALSE));
+
+ pDevice->maxZBufferDepthSize = 0;
+
+ if (pDevice->isHardwareTnL) {
+ strcpy(pDevice->deviceName, "Transform & Light Hardware Rasterizer");
+ } else if (pDevice->isHardware) {
+ strcpy(pDevice->deviceName, "Hardware Rasterizer");
+ } else {
+ strcpy(pDevice->deviceName, "Reference Rasterizer");
+ }
+ //issue 135 put here info about vendor and device model
+ setInfo(pDevice, &pDriver->adapterIdentifier);
+
+ for (int k=0; k < D3DDEPTHFORMATSIZE; k++) {
+ pDevice->depthFormatSupport[k] =
+ SUCCEEDED(pD3D->CheckDeviceFormat(i, deviceTypes[j],
+ pDriver->desktopMode.Format,
+ D3DUSAGE_DEPTHSTENCIL,
+ D3DRTYPE_SURFACE,
+ d3dDepthFormat[k]))
+ &&
+ SUCCEEDED(pD3D->CheckDepthStencilMatch(i, deviceTypes[j],
+ pDriver->desktopMode.Format,
+ pDriver->desktopMode.Format,
+ d3dDepthFormat[k]));
+ if (pDevice->depthFormatSupport[k]) {
+ if (d3dDepthTable[k] > pDevice->maxZBufferDepthSize) {
+ pDevice->maxZBufferDepthSize = d3dDepthTable[k];
+ pDevice->maxStencilDepthSize = d3dStencilDepthTable[k];
+ if (d3dStencilDepthTable[k]>0) {
+ pDevice->supportStencil = true;
+ }
+ else {
+ pDevice->supportStencil = false;
+ }
+ }
+ }
+ }
+
+ // Fix to Issue 226 : D3D - fail on stress test for the creation and destruction of Canvases
+ DWORD bitmask = 0;
+ pDevice->multiSampleSupport = 0;
+ for (int mtype = D3DMULTISAMPLE_2_SAMPLES;
+ mtype <= D3DMULTISAMPLE_16_SAMPLES; mtype++) {
+ // consider desktop mode only for multisampling
+ HRESULT hrMSBack;
+ // HRESULT hrMSDepth; // should also check DephStencil ??? TODO - aces
+
+ bitmask = 1 << mtype;
+ hrMSBack = pD3D->CheckDeviceMultiSampleType(i, deviceTypes[j],
+ pDriver->desktopMode.Format,
+ TRUE,
+ (D3DMULTISAMPLE_TYPE) mtype, NULL);
+ if(SUCCEEDED(hrMSBack)) {
+ pDevice->multiSampleSupport |= bitmask;
+ if(debug){
+ /*
+ printf("Multisample: Back %s uses %s at bitmask %d, mtype %d, multiSampleSupport %d \n",
+ getPixelFormatName(pDriver->desktopMode.Format),
+ getMultiSampleName((D3DMULTISAMPLE_TYPE) mtype),
+ bitmask, mtype, pDevice->multiSampleSupport );
+ */
+ }
+ }//if hrMSBack
+
+ }// for mtype
+ }//for j - device Types
+ }// for i - numDriver
}
@@ -262,7 +271,7 @@ VOID D3dDriverInfo::release()
VOID printInfo()
{
- printf("Java 3D 1.4, Windows version is %d.%d ",
+ printf("Java 3D 1.5.1, Windows version is %d.%d ",
osvi.dwMajorVersion, osvi.dwMinorVersion);
printf("Build: %d, ", LOWORD(osvi.dwBuildNumber));
@@ -335,7 +344,7 @@ VOID D3dDriverInfo::initialize(JNIEnv *env)
LPDIRECT3D9 pD3D = Direct3DCreate9( D3D_SDK_VERSION );
if (debug){
printf("[Java3D] Using DirectX D3D 9.0 or higher.\n");
- printf("[Java3D] DirectX D3D renderer build 1.4.2005.12.30\n");
+ printf("[Java3D] DirectX D3D renderer build 1.5.1\n");
}
if (pD3D == NULL) {
D3dCtx::d3dError(D3DNOTFOUND);
diff --git a/src/native/d3d/D3dUtil.cpp b/src/native/d3d/D3dUtil.cpp
index f7cc160..3c0af2e 100644
--- a/src/native/d3d/D3dUtil.cpp
+++ b/src/native/d3d/D3dUtil.cpp
@@ -68,95 +68,95 @@ D3DTRANSFORMSTATETYPE transformState[] = {
#define D3DFORMATTABLESIZE 40
-D3DFORMAT d3dFormatTable[] = {
- D3DFMT_UNKNOWN,
- D3DFMT_R8G8B8,
- D3DFMT_A8R8G8B8,
- D3DFMT_X8R8G8B8,
- D3DFMT_R5G6B5,
- D3DFMT_X1R5G5B5,
- D3DFMT_A1R5G5B5,
- D3DFMT_A4R4G4B4,
- D3DFMT_R3G3B2,
- D3DFMT_A8,
- D3DFMT_A8R3G3B2,
- D3DFMT_X4R4G4B4,
- D3DFMT_A8P8,
- D3DFMT_P8,
- D3DFMT_L8,
- D3DFMT_A8L8,
- D3DFMT_A4L4,
- D3DFMT_V8U8,
- D3DFMT_L6V5U5,
- D3DFMT_X8L8V8U8,
- D3DFMT_Q8W8V8U8,
- D3DFMT_V16U16,
-// D3DFMT_W11V11U10,
- D3DFMT_UYVY,
- D3DFMT_YUY2,
- D3DFMT_DXT1,
- D3DFMT_DXT2,
- D3DFMT_DXT3,
- D3DFMT_DXT4,
- D3DFMT_DXT5,
- D3DFMT_D16_LOCKABLE,
- D3DFMT_D32,
- D3DFMT_D15S1,
- D3DFMT_D24S8,
- D3DFMT_D16,
- D3DFMT_D24X8,
- D3DFMT_D24X4S4,
- D3DFMT_VERTEXDATA,
- D3DFMT_INDEX16,
- D3DFMT_INDEX32
+D3DFORMAT d3dFormatTable[] = {
+ D3DFMT_UNKNOWN, //01
+ D3DFMT_R8G8B8, //02
+ D3DFMT_A8R8G8B8, //03
+ D3DFMT_X8R8G8B8, //04
+ D3DFMT_R5G6B5, //05
+ D3DFMT_X1R5G5B5, //06
+ D3DFMT_A1R5G5B5, //07
+ D3DFMT_A4R4G4B4, //08
+ D3DFMT_R3G3B2, //09
+ D3DFMT_A8, //10
+ D3DFMT_A8R3G3B2, //11
+ D3DFMT_X4R4G4B4, //12
+ D3DFMT_A8P8, //13
+ D3DFMT_P8, //14
+ D3DFMT_L8, //15
+ D3DFMT_A8L8, //16
+ D3DFMT_A4L4, //17
+ D3DFMT_V8U8, //18
+ D3DFMT_L6V5U5, //19
+ D3DFMT_X8L8V8U8, //20
+ D3DFMT_Q8W8V8U8, //21
+ D3DFMT_V16U16, //22
+ // D3DFMT_W11V11U10, //XX
+ D3DFMT_UYVY, //23
+ D3DFMT_YUY2, //24
+ D3DFMT_DXT1, //25
+ D3DFMT_DXT2, //26
+ D3DFMT_DXT3, //27
+ D3DFMT_DXT4, //28
+ D3DFMT_DXT5, //29
+ D3DFMT_D16_LOCKABLE, //30
+ D3DFMT_D32, //31
+ D3DFMT_D15S1, //32
+ D3DFMT_D24S8, //33
+ D3DFMT_D16, //34
+ D3DFMT_D24X8, //35
+ D3DFMT_D24X4S4, //36
+ D3DFMT_VERTEXDATA, //37
+ D3DFMT_INDEX16, //38
+ D3DFMT_INDEX32 //39
};
char *d3dFormatTableChar[] = {
- "D3DFMT_UNKNOWN",
- "D3DFMT_R8G8B8",
- "D3DFMT_A8R8G8B8",
- "D3DFMT_X8R8G8B8",
- "D3DFMT_R5G6B5",
- "D3DFMT_X1R5G5B5",
- "D3DFMT_A1R5G5B5",
- "D3DFMT_A4R4G4B4",
- "D3DFMT_R3G3B2",
- "D3DFMT_A8",
- "D3DFMT_A8R3G3B2",
- "D3DFMT_X4R4G4B4",
- "D3DFMT_A8P8",
- "D3DFMT_P8",
- "D3DFMT_L8",
- "D3DFMT_A8L8",
- "D3DFMT_A4L4",
- "D3DFMT_V8U8",
- "D3DFMT_L6V5U5",
- "D3DFMT_X8L8V8U8",
- "D3DFMT_Q8W8V8U8",
- "D3DFMT_V16U16",
- // "D3DFMT_W11V11U10",
- "D3DFMT_UYVY",
- "D3DFMT_YUY2",
- "D3DFMT_DXT1",
- "D3DFMT_DXT2",
- "D3DFMT_DXT3",
- "D3DFMT_DXT4",
- "D3DFMT_DXT5",
- "D3DFMT_D16_LOCKABLE",
- "D3DFMT_D32",
- "D3DFMT_D15S1",
- "D3DFMT_D24S8",
- "D3DFMT_D16",
- "D3DFMT_D24X8",
- "D3DFMT_D24X4S4",
- "D3DFMT_VERTEXDATA",
- "D3DFMT_INDEX16",
- "D3DFMT_INDEX32"
+ "D3DFMT_UNKNOWN", //01
+ "D3DFMT_R8G8B8", //02
+ "D3DFMT_A8R8G8B8", //03
+ "D3DFMT_X8R8G8B8", //04
+ "D3DFMT_R5G6B5", //05
+ "D3DFMT_X1R5G5B5", //06
+ "D3DFMT_A1R5G5B5", //07
+ "D3DFMT_A4R4G4B4", //08
+ "D3DFMT_R3G3B2", //09
+ "D3DFMT_A8", //10
+ "D3DFMT_A8R3G3B2", //11
+ "D3DFMT_X4R4G4B4", //12
+ "D3DFMT_A8P8", //13
+ "D3DFMT_P8", //14
+ "D3DFMT_L8", //15
+ "D3DFMT_A8L8", //16
+ "D3DFMT_A4L4", //17
+ "D3DFMT_V8U8", //18
+ "D3DFMT_L6V5U5", //19
+ "D3DFMT_X8L8V8U8", //20
+ "D3DFMT_Q8W8V8U8", //21
+ "D3DFMT_V16U16", //22
+ // "D3DFMT_W11V11U10", //XX
+ "D3DFMT_UYVY", //23
+ "D3DFMT_YUY2", //24
+ "D3DFMT_DXT1", //25
+ "D3DFMT_DXT2", //26
+ "D3DFMT_DXT3", //27
+ "D3DFMT_DXT4", //28
+ "D3DFMT_DXT5", //29
+ "D3DFMT_D16_LOCKABLE",//30
+ "D3DFMT_D32", //31
+ "D3DFMT_D15S1", //32
+ "D3DFMT_D24S8", //33
+ "D3DFMT_D16", //34
+ "D3DFMT_D24X8", //35
+ "D3DFMT_D24X4S4", //36
+ "D3DFMT_VERTEXDATA", //37
+ "D3DFMT_INDEX16", //38
+ "D3DFMT_INDEX32" //39
};
char* multipleSampleTypeTable[] = {
"D3DMULTISAMPLE_NONE",
- "D3DMULTISAMPLE_UNKNOWN"
+ "D3DMULTISAMPLE_UNKNOWN",
"D3DMULTISAMPLE_2_SAMPLES",
"D3DMULTISAMPLE_3_SAMPLES",
"D3DMULTISAMPLE_4_SAMPLES",
@@ -171,7 +171,7 @@ char* multipleSampleTypeTable[] = {
"D3DMULTISAMPLE_13_SAMPLES",
"D3DMULTISAMPLE_14_SAMPLES",
"D3DMULTISAMPLE_15_SAMPLES",
- "D3DMULTISAMPLE_16_SAMPLES",
+ "D3DMULTISAMPLE_16_SAMPLES"
};
char* swapEffectTable[] = {