aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/d3d/D3dDeviceInfo.hpp
diff options
context:
space:
mode:
authorKevin Rushforth <[email protected]>2004-06-09 04:25:41 +0000
committerKevin Rushforth <[email protected]>2004-06-09 04:25:41 +0000
commit343b658c32a6473c545187c1e276ee5d06c2686a (patch)
treead2606538b7db1c3553c53a79ccccb2ed5b5e4e2 /src/native/d3d/D3dDeviceInfo.hpp
parent06cebb1e576da6f7222f999ab059dcfa3d8edd39 (diff)
Initial creation of j3d-core-utils sources in CVS repository
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@7 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/native/d3d/D3dDeviceInfo.hpp')
-rw-r--r--src/native/d3d/D3dDeviceInfo.hpp85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/native/d3d/D3dDeviceInfo.hpp b/src/native/d3d/D3dDeviceInfo.hpp
new file mode 100644
index 0000000..7701261
--- /dev/null
+++ b/src/native/d3d/D3dDeviceInfo.hpp
@@ -0,0 +1,85 @@
+/*
+ * $RCSfile$
+ *
+ * Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * $Revision$
+ * $Date$
+ * $State$
+ */
+
+#if !defined(D3DDEVICEINFO_H)
+#define D3DDEVICEINFO_H
+
+#include "StdAfx.h"
+
+extern UINT vertexBufferMaxVertexLimit;
+
+#define D3DDEPTHFORMATSIZE 6
+
+class D3dDeviceInfo {
+public:
+ // Hardware Rasterizer
+ // Transform & Light Hardware Rasterizer
+ // Reference Rasterizer
+ char deviceName[40]; // One of above name
+ D3DDEVTYPE deviceType; // D3DDEVTYPE_HAL or D3DDEVTYPE_REF
+ BOOL desktopCompatible; // Can render in desktop mode
+ BOOL fullscreenCompatible; // Can render in fullscreen mode
+ // using current desktop mode setting
+
+ // each bitmask correspond to the support of
+ // D3DMULTISAMPLE_i_SAMPLES type, i = 2...16
+ DWORD multiSampleSupport;
+
+ // TRUE when d3dDepthFormat[i] support
+ BOOL depthFormatSupport[D3DDEPTHFORMATSIZE];
+
+ // depth format select
+ D3DFORMAT depthStencilFormat;
+
+ // max z buffer depth support
+ UINT maxZBufferDepthSize;
+
+ // Max vetex count support for each primitive
+ DWORD maxVertexCount[GEO_TYPE_INDEXED_LINE_STRIP_SET+1];
+
+ BOOL isHardware;
+ BOOL isHardwareTnL;
+ BOOL canRenderWindowed;
+ BOOL supportMipmap;
+ BOOL texturePow2Only;
+ BOOL textureSquareOnly;
+ BOOL linePatternSupport;
+ BOOL texBorderModeSupport;
+ BOOL texLerpSupport;
+ DWORD maxTextureUnitStageSupport;
+ DWORD maxTextureBlendStages;
+ DWORD maxSimultaneousTextures;
+ DWORD maxTextureWidth;
+ DWORD maxTextureHeight;
+ DWORD maxTextureDepth;
+ DWORD maxPrimitiveCount;
+ DWORD maxVertexIndex;
+ DWORD maxActiveLights;
+ DWORD maxPointSize;
+ DWORD rangeFogEnable;
+ D3DRENDERSTATETYPE fogMode;
+ int texMask;
+ int maxAnisotropy;
+
+ D3dDeviceInfo();
+ ~D3dDeviceInfo();
+
+ // set capabilities of this device
+ VOID setCaps(D3DCAPS8 *d3dCaps);
+ BOOL supportAntialiasing();
+ D3DMULTISAMPLE_TYPE getBestMultiSampleType();
+ int getTextureFeaturesMask();
+ void findDepthStencilFormat(int minZDepth);
+};
+
+#endif
+