Living without D3DX
来源:互联网 发布:vscode mactype 贴吧 编辑:程序博客网 时间:2024/05/21 09:11
General Helpers
The DirectX Tool Kit provides a number of helpers that are designed to simplify Direct3D 11 programming in the tradition of the original D3DX library. You can find the library on CodePlex and GitHub.
ID3DX10Sprite
SpriteBatch
ID3DX10Font
SpriteFont, SpriteBatch
ID3DX10Mesh
Model, ModelMesh, ModelMeshPart
D3DXCreateBox
D3DXCreateCylinder
D3DXCreateSphere
D3DXCreateTeapot
D3DXCreateTorus
GeometricPrimitive
D3DX11CreateShaderResourceViewFromFile
CreateXXXTextureFromFile
D3DX11CreateShaderResourceViewFromResource
D3DX11CreateShaderResourceViewFromMemory
CreateXXXTextureFromMemory
D3DX11CreateTextureFromFile
CreateXXXTextureFromFile
D3DX11CreateTextureFromResource
D3DX11CreateTextureFromMemory
CreateXXXTextureFromMemory
D3DX11SaveTextureToFile
SaveXXXTextureToFile
HLSL Functions
The HLSL compiler, shader reflection API, and related functionality has been broken out into it's own D3DCompileDLL for some time. D3DCompile is in the Windows 8.x SDK and is included with VS 2012 and VS 2013 Preview.
D3DXCompileShaderFromFile
D3DX10CompileFromFile
D3DX11CompileFromFile
D3DCompileFromFileD3DXCompileShader
D3D10CompileShader
D3DX10CompileFromMemory
D3DX11CompileFromMemory
D3DCompileD3DXCompileShaderFromResource
D3DX10CompileFromResource
D3DX11CompileFromResource
No direct equivalent. Can use resource APIs and then D3DCompile
above.D3DXPreprocessShader
D3DXPreprocessShaderFromFile
D3DXPreprocessShaderFromResource
D3D10PreprocessShader
D3DX10PreprocessShaderFromFile
D3DX10PreprocessShaderFromMemory
D3DX10PreprocessShaderFromResource
D3DX11PreprocessShaderFromFile
D3DX11PreprocessShaderFromMemory
D3DX11PreprocessShaderFromResource
D3DPreprocessD3DXDisassembleShader
D3D10DisassembleShader
D3DX10DisassembleShader
D3DDisassembleD3D10ReflectShader
D3DX10ReflectShader
D3DReflectD3D11Reflect
ID3DXBuffer
ID3D10Blob
ID3DBlobD3DXCreateBuffer
D3D10CreateBlob
D3DCreateBlobD3D10GetInputSignatureBlob
D3D10GetOutputSignatureBlob
D3D10GetInputAndOutputSignatureBlob
D3D10GetShaderDebugInfo
D3DGetBlobPartTexture Functions
The DirectXTex library is primarily intended for texture processing offline with tools, although it can also be used at runtime for doing texture block compression, mipmap generation, or handling more general image processing needs. DirectXTK is intended for use at runtime with light-weight helpers and image loaders, but does not provide support for general runtime texture format conversion. You can find both libraries on CodePlex and GitHub.
D3DX11ComputeNormalMap
DirectXTex library, ComputeNormalMap
D3DX11CreateShaderResourceViewFromFile
D3DX11CreateTextureFromFile
DDSTextureLoader: CreateDDSTextureFromFile
WICTextureLoader: CreateWICTextureFromFile
DirectXTex library (tools), LoadFromXXXFile
thenCreateShaderResourceView
or CreateTexture
D3DX11CreateShaderResourceViewFromMemory
D3DX11CreateTextureFromMemory
DDSTextureLoader: CreateDDSTextureFromMemory
WICTextureLoader: CreateWICTextureFromMemory
DirectXTex library (tools), LoadFromXXXMemory
thenCreateShaderResourceView
or CreateTexture
D3DX11CreateShaderResourceViewFromResource
D3DX11CreateTextureFromResource
No direct equivalent, can use Win32 resource functions and then the ‘from memory’ APIs above.
D3DX11FilterTexture
DirectXTex library, GenerateMipMaps
and GenerateMipMaps3D
D3DX11GetImageInfoFromFile
DirectXTex library, GetMetadataFromXXXFile
D3DX11GetImageInfoFromMemory
DirectXTex library, GetMetadataFromXXXMemory
D3DX11GetImageInfoFromResource
No direct equivalent, can use Win32 resource functions and then the ‘from memory’ APIs above.
D3DX11LoadTextureFromTexture
DirectXTex library, Resize
, Convert
, Compress
, Decompress
, and/or CopyRectangle
D3DX11SaveTextureToFile
ScreenGrab: SaveDDSTextureToFile
or SaveWICTextureToFile
DirectXTex library, CaptureTexture
then SaveToXXXFile
D3DX11SaveTextureToMemory
DirectXTex library, CaptureTexture
then SaveToXXXMemory
Geometry Functions
The DirectXMesh library is intended for geometry processing offline with tools, although it can be used at runtime. You can find the library on CodePlex and GitHub.
D3DXCleanMesh
Clean
D3DXComputeNormals
ComputeNormals
D3DXComputeTangent
D3DXComputeTangentFrame
D3DXComputeTangentFrameEx
ComputeTangentFrame
ID3DX10Mesh::GenerateAdjacencyAndPointReps
GenerateAdjacencyAndPointReps
ID3DX10Mesh::GenerateGSAdjacency
GenerateGSAdjacency
ID3DX10Mesh::Optimize
AttributeSort
OptimizeFacesEx
OptimizeVertices
ReorderIB
FinalizeIB
FinalizeVB
D3DXOptimizeFaces
OptimizeFaces
D3DXOptimizeVertices
OptimizeVertices
D3DXValidMesh
Validate
Math
The legacy D3DXMath library has been replaced by DirectXMath. The library is in the Windows 8.x SDK and is included with VS 2012 and VS 2013 Preview.
D3DXFLOAT16
HALFD3DXMATRIXA16
XMMATRIX or XMFLOAT4X4AD3DXQUATERNION
D3DXPLANE
D3DXCOLOR
D3DXVECTOR2
XMFLOAT2D3DXVECTOR2_16F
XMHALF2D3DXVECTOR3
XMFLOAT3D3DXVECTOR4
XMFLOAT4(or if you can guarantee the data is 16-byte aligned, XMVECTOR orXMFLOAT4A )
D3DXVECTOR4_16F
XMHALF4D3DX_PI
XM_PID3DX_1BYPI
XM_1DIVPID3DXToRadian
XMConvertToRadiansD3DXToDegree
XMConvertToDegreesD3DXBoxBoundProbe
BoundingBox::Intersects(XMVECTOR, XMVECTOR, float&)D3DXComputeBoundingBox
BoundingBox::CreateFromPointsD3DXComputeBoundingSphere
BoundingSphere::CreateFromPointsD3DXSphereBoundProbe
BoundingSphere::Intersects(XMVECTOR, XMVECTOR, float&)D3DXIntersectTriFunction
TriangleTests::IntersectsD3DXFloat32To16Array
XMConvertFloatToHalfStreamD3DXFloat16To32Array
XMConvertHalfToFloatStreamD3DXVec2Length
XMVector2Length or XMVector2LengthEstD3DXVec2LengthSq
XMVector2LengthSqD3DXVec2Dot
XMVector2DotD3DXVec2CCW
XMVector2CrossD3DXVec2Add
XMVectorAddD3DXVec2Subtract
XMVectorSubtractD3DXVec2Minimize
XMVectorMinD3DXVec2Maximize
XMVectorMaxD3DXVec2Scale
XMVectorScaleD3DXVec2Lerp
XMVectorLerp or XMVectorLerpVD3DXVec2Normalize
XMVector2Normalize or XMVector2NormalizeEstD3DXVec2Hermite
XMVectorHermite or XMVectorHermiteVD3DXVec2CatmullRom
XMVectorCatmullRom or XMVectorCatmullRomVD3DXVec2BaryCentric
XMVectorBaryCentric or XMVectorBaryCentricVD3DXVec2Transform
XMVector2TransformD3DXVec2TransformCoord
XMVector2TransformCoordD3DXVec2TransformNormal
XMVector2TransformNormalD3DXVec2TransformArray
XMVector2TransformStreamD3DXVec2TransformCoordArray
XMVector2TransformCoordStreamD3DXVec2TransformNormalArray
XMVector2TransformNormalStreamD3DXVec3Length
XMVector3Length or XMVector3LengthEstD3DXVec3LengthSq
XMVector3LengthSqD3DXVec3Dot
XMVector3DotD3DXVec3Cross
XMVector3CrossD3DXVec3Add
XMVectorAddD3DXVec3Subtract
XMVectorSubtractD3DXVec3Minimize
XMVectorMinD3DXVec3Maximize
XMVectorMaxD3DXVec3Scale
XMVectorScaleD3DXVec3Lerp
XMVectorLerp or XMVectorLerpVD3DXVec3Normalize
XMVector3Normalize or XMVector3NormalizeEstD3DXVec3Hermite
XMVectorHermite or XMVectorHermiteVD3DXVec3CatmullRom
XMVectorCatmullRom or XMVectorCatmullRomVD3DXVec3BaryCentric
XMVectorBaryCentric or XMVectorBaryCentricVD3DXVec3Transform
XMVector3TransformD3DXVec3TransformCoord
XMVector3TransformCoordD3DXVec3TransformNormal
XMVector3TransformNormalD3DXVec3TransformArray
XMVector3TransformStreamD3DXVec3TransformCoordArray
XMVector3TransformCoordStreamD3DXVec3TransformNormalArray
XMVector3TransformNormalStreamD3DXVec3Project
XMVector3ProjectD3DXVec3Unproject
XMVector3UnprojectD3DXVec3ProjectArray
XMVector3ProjectStreamD3DXVec3UnprojectArray
XMVector3UnprojectStreamD3DXVec4Length
XMVector4Length or XMVector4LengthEstD3DXVec4LengthSq
XMVector4LengthSqD3DXVec4Dot
XMVector4DotD3DXVec4Add
XMVectorAddD3DXVec4Subtract
XMVectorSubtractD3DXVec4Minimize
XMVectorMinD3DXVec4Maximize
XMVectorMaxD3DXVec4Scale
XMVectorScaleD3DXVec4Lerp
XMVectorLerp or XMVectorLerpVD3DXVec4Cross
XMVector4CrossD3DXVec4Normalize
XMVector4Normalize or XMVector4NormalizeEstD3DXVec4Hermite
XMVectorHermite or XMVectorHermiteVD3DXVec4CatmullRom
XMVectorCatmullRom or XMVectorCatmullRomVD3DXVec4BaryCentric
XMVectorBaryCentric or XMVectorBaryCentricVD3DXVec4Transform
XMVector4TransformD3DXVec4TransformArray
XMVector4TransformStreamD3DXMatrixIdentity
XMMatrixIdentityD3DXMatrixDeterminant
XMMatrixDeterminantD3DXMatrixDecompose
XMMatrixDecomposeD3DXMatrixTranspose
XMMatrixTransposeD3DXMatrixMultiply
XMMatrixMultiplyD3DXMatrixMultiplyTranspose
XMMatrixMultiplyTransposeD3DXMatrixInverse
XMMatrixInverseD3DXMatrixScaling
XMMatrixScalingD3DXMatrixTranslation
XMMatrixTranslationD3DXMatrixRotationX
XMMatrixRotationXD3DXMatrixRotationY
XMMatrixRotationYD3DXMatrixRotationZ
XMMatrixRotationZD3DXMatrixRotationAxis
XMMatrixRotationAxisD3DXMatrixRotationQuaternion
XMMatrixRotationQuaternionD3DXMatrixRotationYawPitchRoll
XMMatrixRotationRollPitchYaw(Note the order of parameters is different:
D3DXMath takes yaw, pitch, roll,
DirectXMath takes pitch, yaw, roll)
D3DXMatrixTransformation
XMMatrixTransformationD3DXMatrixTransformation2D
XMMatrixTransformation2DD3DXMatrixAffineTransformation
XMMatrixAffineTransformationD3DXMatrixAffineTransformation2D
XMMatrixAffineTransformation2DD3DXMatrixLookAtRH
XMMatrixLookAtRHD3DXMatrixLookAtLH
XMMatrixLookAtLHD3DXMatrixPerspectiveRH
XMMatrixPerspectiveRHD3DXMatrixPerspectiveLH
XMMatrixPerspectiveLHD3DXMatrixPerspectiveFovRH
XMMatrixPerspectiveFovRHD3DXMatrixPerspectiveFovLH
XMMatrixPerspectiveFovLHD3DXMatrixPerspectiveOffCenterRH
XMMatrixPerspectiveOffCenterRHD3DXMatrixPerspectiveOffCenterLH
XMMatrixPerspectiveOffCenterLHD3DXMatrixOrthoRH
XMMatrixOrthographicRHD3DXMatrixOrthoLH
XMMatrixOrthographicLHD3DXMatrixOrthoOffCenterRH
XMMatrixOrthographicOffCenterRHD3DXMatrixOrthoOffCenterLH
XMMatrixOrthographicOffCenterLHD3DXMatrixShadow
XMMatrixShadowD3DXMatrixReflect
XMMatrixReflectD3DXQuaternionLength
XMQuaternionLengthD3DXQuaternionLengthSq
XMQuaternionLengthSqD3DXQuaternionDot
XMQuaternionDotD3DXQuaternionIdentity
XMQuaternionIdentityD3DXQuaternionIsIdentity
XMQuaternionIsIdentityD3DXQuaternionConjugate
XMQuaternionConjugateD3DXQuaternionToAxisAngle
XMQuaternionToAxisAngleD3DXQuaternionRotationMatrix
XMQuaternionRotationMatrixD3DXQuaternionRotationAxis
XMQuaternionRotationAxisD3DXQuaternionRotationYawPitchRoll
XMQuaternionRotationRollPitchYaw(Note the order of parameters is different:
D3DXMath takes yaw, pitch, roll,
DirectXMath takes pitch, yaw, roll)
D3DXQuaternionMultiply
XMQuaternionMultiplyD3DXQuaternionNormalize
XMQuaternionNormalize or XMQuaternionNormalizeEstD3DXQuaternionInverse
XMQuaternionInverseD3DXQuaternionLn
XMQuaternionLnD3DXQuaternionExp
XMQuaternionExpD3DXQuaternionSlerp
XMQuaternionSlerp or XMQuaternionSlerpVD3DXQuaternionSquad
XMQuaternionSquad or XMQuaternionSquadVD3DXQuaternionSquadSetup
XMQuaternionSquadSetupD3DXQuaternionBaryCentric
XMQuaternionBaryCentric or XMQuaternionBaryCentricVD3DXPlaneDot
XMPlaneDotD3DXPlaneDotCoord
XMPlaneDotCoordD3DXPlaneDotNormal
XMPlaneDotNormalD3DXPlaneScale
XMVectorScaleD3DXPlaneNormalize
XMPlaneNormalize or XMPlaneNormalizeEstD3DXPlaneIntersectLine
XMPlaneIntersectLineD3DXPlaneFromPointNormal
XMPlaneFromPointNormalD3DXPlaneFromPoints
XMPlaneFromPointsD3DXPlaneTransform
XMPlaneTransformD3DXPlaneTransformArray
XMPlaneTransformStreamD3DXColorNegative
XMColorNegativeD3DXColorAdd
XMVectorAddD3DXColorSubtract
XMVectorSubtractD3DXColorScale
XMVectorScaleD3DXColorModulate
XMColorModulateD3DXColorLerp
XMVectorLerp or XMVectorLerpVD3DXColorAdjustSaturation
XMColorAdjustSaturationD3DXColorAdjustContrast
XMColorAdjustContrastD3DXFresnelTerm
XMFresnelTermSpherical Harmonics Math
The SHmath library is available as an add-on for DirectXMath.
XMSHEvalDirection
Evaluates the Spherical Harmonic basis functions. Equivalent toD3DXSHEvalDirection function.XMSHRotate
Rotates SH vector by a rotation matrix. Equivalent to the D3DXSHRotate function.XMSHRotateZ
Rotates the SH vector in the Z axis by an angle. Equivalent to the D3DXSHRotateZfunction.XMSHAdd
Adds two SH vectors. Equivalent to the D3DXSHAdd function.XMSHScale
Scales a SH vector. Equivalent to the D3DXSHScale function.XMSHDot
Computes the dot product of two SH vectors. Equivalent to the D3DXSHDotfunction.XMSHMultiply
XMSHMultiply2
XMSHMultiply3
XMSHMultiply4
XMSHMultiply5
XMSHMultiply6
Computes the product of two functions represented using SH. Equivalent toD3DXSHMultiply2, D3DXSHMultiply3, D3DXSHMultiply4, D3DXSHMultiply5, andD3DXSHMultiply6.XMSHEvalDirectionalLight
Evaluates a directional light and returns spectral SH data. Equivalent to theD3DXSHEvalDirectionalLight function.XMSHEvalSphericalLight
Evaluates a spherical light and returns spectral SH data. Equivalent to theD3DXEvalSphericalLight function.XMSHEvalConeLight
Evaluates a light that is a cone of constant intensity and returns spectral SH data. Equivalent to the D3DXSHEvalConeLight function.XMSHEvalHemisphereLight
Evaluates a light that is a linear interpolant between two colors over the sphere. Equivalent to the D3DXSHEvalHemisphereLight function.SHProjectCubeMap
Projects a function represented in a cube map into spherical harmonics. Equivalent to the D3DX11SHProjectCubeMap function.Effects (FX)
The Effects system for Direct3D 11 is primarily provided as a porting aid for older code. The library is available onCodePlex and GitHub.
D3DXCreateEffect
D3DXCreateEffectEx
D3DXCreateEffectFromResource
D3DXCreateEffectFromResourceEx
D3D10CompileEffectFromMemory
D3DX11CompileEffectFromMemory
D3DXCreateEffectFromFile
D3DXCreateEffectFromFileEx
D3DX11CompileEffectFromFile
D3D10CreateEffectFromMemory
D3DX11CreateEffectFromMemory
D3DXCreateEffectPool
D3D10CreateEffectPoolFromMemory
Effects 11 does not support 'effect pools'
or D3DCOMPILE_EFFECT_CHILD_EFFECT
. Effect groups provide a more efficient solution for common scenarios previously addressed with 'effect pools'
D3DXDisassembleEffect
D3D10DisassembleEffect
D3DDisassemble
D3DDisassemble10Effect
in D3DCompile
Performance/Profiling
D3DX9 included the entry-points intercepted by PIX for Windows for performance profiling. This is now handled by the DirectX runtime directly and is monitored by the Visual Studio Graphics Diagnostics tool.
D3DPERF_BeginEvent
D3DPERF_EndEvent
D3DPERF_SetMarker
D3DPERF_SetRegion
D3DPERF_QueryRepeatFrame
D3DPERF_SetOptions
D3DPERF_GetStatus
ID3DUserDefinedAnnotation which is supported by the DirectX 11.1 runtime on Windows 8.x and Windows 7 Service Pack 1 + KB2670838
If using DirectX 11.2+, you can use ID3D11DeviceContext2 directly for BeginEventInt, SetMarkerInt, and EndEvent.
UVAtlas Functions
The UVAtlas library is intended for isochart creation offline with tools, although it can be used at runtime. You can find the library on CodePlex and GitHub.
D3DXUVAtlasCreate
UVAtlasCreate
D3DXUVAtlasPartition
UVAtlasPartition
D3DXUVAtlasPack
UVAtlasPack
D3DXComputeIMTFromPerVertexSignal
UVAtlasComputeIMTFromPerVertexSignal
D3DXComputeIMTFromPerTexelSignal
UVAtlasComputeIMTFromPerTexelSignal
D3DXComputeIMTFromSignal
UVAtlasComputeIMTFromSignal
D3DXComputeIMTFromTexture
UVAtlasComputeIMTFromTexture
Note
Careful readers will note that there are a few omissions from this table.
- The
ID3DXMatrixStack
from D3DXMath doesn't have a new version, but it's actually pretty easy to implement your own. If someone has a burning need for this, please comment below. - The Precomputed Radiance Transfer (PRT) simulator is only available in closed-source form in legacy D3DX9. There are a number of papers that cover this technology in the literature, and the most generally useful parts of this functionality are the SHmath functions which are available.
- Living without D3DX
- Programmed living
- Living Park
- 【D3DX日记】D3D与D3DX的区别
- D3DX向量函数
- D3DX向量函数
- D3DX矩阵函数
- D3DX颜色函数
- D3DX Utility library
- D3DX Concrete Types
- D3DX Helper Objects
- D3DX Utility library
- D3DX Utility library概述
- D3DX矩阵函数
- D3DX Utility library
- D3DX矩阵函数
- DirectX9 D3DX几何体对象
- D3DX开发之起步
- Android
- 对面向对象的一点理解
- Java设计模式-创建型模式
- 1050. 螺旋矩阵(25)
- [深入浅出Cocoa]详解键值观察(KVO)及其实现机理
- Living without D3DX
- MyEclipse下创建的项目 导入eclipse
- eclipse中如何在当前工程中查找一个字符串
- 追求之门的开启,坚定有意义
- centos7安装mysql
- 关于用OC---购票系统的关键部分
- ITOO4.1之WCF学习(一)
- 宽字节与多字节转换函数
- zxchong的iOS bug笔记