/*
* Copyright 2007 Andras Kovacs
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
import "oaidl.idl";
import "ocidl.idl";
import "dxgi.idl";
import "d3dcommon.idl";
cpp_quote("#ifndef _D3D10_CONSTANTS")
cpp_quote("#define _D3D10_CONSTANTS")
const float D3D10_DEFAULT_BLEND_FACTOR_ALPHA = 1.0;
const float D3D10_DEFAULT_BLEND_FACTOR_BLUE = 1.0;
const float D3D10_DEFAULT_BLEND_FACTOR_GREEN = 1.0;
const float D3D10_DEFAULT_BLEND_FACTOR_RED = 1.0;
const float D3D10_DEFAULT_BORDER_COLOR_COMPONENT = 0.0;
const float D3D10_DEFAULT_SLOPE_SCALED_DEPTH_BIAS = 0.0;
const float D3D10_DEFAULT_DEPTH_BIAS_CLAMP = 0.0;
const float D3D10_DEFAULT_MAX_ANISOTROPY = 16.0;
const float D3D10_DEFAULT_MIP_LOD_BIAS = 0.0;
const float D3D10_DEFAULT_VIEWPORT_MAX_DEPTH = 0.0;
const float D3D10_DEFAULT_VIEWPORT_MIN_DEPTH = 0.0;
const float D3D10_FLOAT16_FUSED_TOLERANCE_IN_ULP = 0.6;
const float D3D10_FLOAT32_MAX = 3.402823466e+38;
const float D3D10_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = 0.6;
const float D3D10_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR = 2.4;
const float D3D10_FLOAT_TO_SRGB_EXPONENT_NUMERATOR = 1.0;
const float D3D10_FLOAT_TO_SRGB_OFFSET = 0.055;
const float D3D10_FLOAT_TO_SRGB_SCALE_1 = 12.92;
const float D3D10_FLOAT_TO_SRGB_SCALE_2 = 1.055;
const float D3D10_FLOAT_TO_SRGB_THRESHOLD = 0.0031308;
const float D3D10_FTOI_INSTRUCTION_MAX_INPUT = 2147483647.999;
const float D3D10_FTOI_INSTRUCTION_MIN_INPUT = -2147483648.999;
const float D3D10_FTOU_INSTRUCTION_MAX_INPUT = 4294967295.999;
const float D3D10_FTOU_INSTRUCTION_MIN_INPUT = 0.0;
const float D3D10_LINEAR_GAMMA = 1.0;
const float D3D10_MAX_BORDER_COLOR_COMPONENT = 1.0;
const float D3D10_MAX_DEPTH = 1.0;
const float D3D10_MAX_POSITION_VALUE = 3.402823466e+34;
const float D3D10_MIN_BORDER_COLOR_COMPONENT = 0.0;
const float D3D10_MIN_DEPTH = 0.0;
const float D3D10_MIP_LOD_BIAS_MAX = 15.99;
const float D3D10_MIP_LOD_BIAS_MIN = -16.0;
const float D3D10_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.5;
const float D3D10_MULTISAMPLE_ANTIALIAS_LINE_WIDTH = 1.4;
const float D3D10_SRGB_GAMMA = 2.2;
const float D3D10_SRGB_TO_FLOAT_DENOMINATOR_1 = 12.92;
const float D3D10_SRGB_TO_FLOAT_DENOMINATOR_2 = 1.055;
const float D3D10_SRGB_TO_FLOAT_EXPONENT = 2.4;
const float D3D10_SRGB_TO_FLOAT_OFFSET = 0.055;
const float D3D10_SRGB_TO_FLOAT_THRESHOLD = 0.04045;
const float D3D10_SRGB_TO_FLOAT_TOLERANCE_IN_ULP = 0.5;
const float D3D10_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.0;
const float D3D_SPEC_VERSION = 1.050005;
const int D3D10_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = -10;
const int D3D10_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = -8;
const int D3D10_VIEWPORT_BOUNDS_MIN = -16384;
cpp_quote("#endif")
cpp_quote("#define MAKE_D3D10_HRESULT(code) MAKE_HRESULT( 1, _FACD3D10, code)")
cpp_quote("#define MAKE_D3D10_STATUS(code) MAKE_HRESULT( 0, _FACD3D10, code)")
cpp_quote("#define D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS MAKE_D3D10_HRESULT(1)")
cpp_quote("#define D3D10_ERROR_FILE_NOT_FOUND MAKE_D3D10_HRESULT(2)")
typedef enum D3D10_BLEND {
D3D10_BLEND_ZERO = 1,
D3D10_BLEND_ONE = 2,
D3D10_BLEND_BLEND_FACTOR = 14,
D3D10_BLEND_SRC1_COLOR = 16,
D3D10_BLEND_SRC1_ALPHA = 18,
} D3D10_BLEND;
typedef enum D3D10_BLEND_OP {
D3D10_BLEND_OP_ADD = 1,
typedef enum D3D10_DEPTH_WRITE_MASK {
typedef enum D3D10_COMPARISON_FUNC {
typedef enum D3D10_STENCIL_OP {
typedef enum D3D10_FILL_MODE {
D3D10_FILL_WIREFRAME = 2,
typedef enum D3D10_CULL_MODE {
D3D10_CULL_NONE = 1,
typedef enum D3D10_FILTER {
D3D10_FILTER_MIN_MAG_MIP_LINEAR = 0x15,
D3D10_FILTER_ANISOTROPIC = 0x55,
D3D10_FILTER_TEXT_1BIT = 0x80000000
} D3D10_FILTER;
typedef enum D3D10_COUNTER {
D3D10_COUNTER_DEVICE_DEPENDENT_0 = 0x40000000
typedef enum D3D10_COUNTER_TYPE {
typedef enum D3D10_RESOURCE_DIMENSION {
typedef enum D3D10_USAGE {
} D3D10_USAGE;
typedef enum D3D10_BIND_FLAG {
D3D10_BIND_VERTEX_BUFFER = 0x1,
D3D10_BIND_INDEX_BUFFER = 0x2,
D3D10_BIND_CONSTANT_BUFFER = 0x4,
D3D10_BIND_SHADER_RESOURCE = 0x8,
D3D10_BIND_STREAM_OUTPUT = 0x10,
D3D10_BIND_RENDER_TARGET = 0x20,
D3D10_BIND_DEPTH_STENCIL = 0x40
cpp_quote("#if !defined(D3D10_NO_HELPERS) && defined(__cplusplus)")
cpp_quote("struct CD3D10_BUFFER_DESC : public D3D10_BUFFER_DESC {")
cpp_quote(" CD3D10_BUFFER_DESC() {}" )
cpp_quote(" explicit CD3D10_BUFFER_DESC(const D3D10_BUFFER_DESC &o) : D3D10_BUFFER_DESC(o) {}")
cpp_quote(" explicit CD3D10_BUFFER_DESC(UINT byteWidth, UINT bindFlags, D3D10_USAGE usage = D3D10_USAGE_DEFAULT, UINT cpuaccessFlags = 0, UINT miscFlags = 0 ) {")
cpp_quote(" ByteWidth = byteWidth;")
cpp_quote(" Usage = usage;")
cpp_quote(" BindFlags = bindFlags;")
cpp_quote(" CPUAccessFlags = cpuaccessFlags;")
cpp_quote(" MiscFlags = miscFlags;")
cpp_quote(" }")
cpp_quote(" ~CD3D10_BUFFER_DESC() {}")
cpp_quote(" operator const D3D10_BUFFER_DESC&() const {")
cpp_quote(" return *this;")
cpp_quote(" }")
cpp_quote("};")
cpp_quote("#endif")
D3D10_MAP_READ = 1,
} D3D10_MAP;
cpp_quote("#if !defined(D3D10_NO_HELPERS) && defined(__cplusplus)")
cpp_quote("struct CD3D10_TEXTURE1D_DESC : public D3D10_TEXTURE1D_DESC {")
cpp_quote(" CD3D10_TEXTURE1D_DESC() {}")
cpp_quote(" explicit CD3D10_TEXTURE1D_DESC(const D3D10_TEXTURE1D_DESC &o) : D3D10_TEXTURE1D_DESC(o) {}")
cpp_quote(" explicit CD3D10_TEXTURE1D_DESC(DXGI_FORMAT format, UINT width, UINT arraySize = 1, UINT mipLevels = 0,")
cpp_quote(" UINT bindFlags = D3D10_BIND_SHADER_RESOURCE, D3D10_USAGE usage = D3D10_USAGE_DEFAULT, UINT cpuaccessFlags = 0,")
cpp_quote(" UINT miscFlags = 0) {")
cpp_quote(" Width = width;")
cpp_quote(" MipLevels = mipLevels;")
cpp_quote(" ArraySize = arraySize;")
cpp_quote(" Format = format;")
cpp_quote(" Usage = usage;")
cpp_quote(" BindFlags = bindFlags;")
cpp_quote(" CPUAccessFlags = cpuaccessFlags;")
cpp_quote(" MiscFlags = miscFlags;")
cpp_quote(" }")
cpp_quote(" ~CD3D10_TEXTURE1D_DESC() {}")
cpp_quote(" operator const D3D10_TEXTURE1D_DESC&() const {")
cpp_quote(" return *this;")
cpp_quote(" }")
cpp_quote("};")
cpp_quote("#endif")
cpp_quote("#if !defined(D3D10_NO_HELPERS) && defined(__cplusplus)")
cpp_quote("struct CD3D10_TEXTURE2D_DESC : public D3D10_TEXTURE2D_DESC {")
cpp_quote(" CD3D10_TEXTURE2D_DESC() {}" )
cpp_quote(" explicit CD3D10_TEXTURE2D_DESC(const D3D10_TEXTURE2D_DESC &o) : D3D10_TEXTURE2D_DESC(o) {}")
cpp_quote(" explicit CD3D10_TEXTURE2D_DESC(DXGI_FORMAT format, UINT width, UINT height,")
cpp_quote(" UINT arraySize = 1,")
cpp_quote(" UINT mipLevels = 0,")
cpp_quote(" UINT bindFlags = D3D10_BIND_SHADER_RESOURCE,")
cpp_quote(" D3D10_USAGE usage = D3D10_USAGE_DEFAULT,")
cpp_quote(" UINT cpuaccessFlags = 0,")
cpp_quote(" UINT sampleCount = 1,")
cpp_quote(" UINT sampleQuality = 0,")
cpp_quote(" UINT miscFlags = 0) {")
cpp_quote(" Width = width;" )
cpp_quote(" Height = height;" )
cpp_quote(" MipLevels = mipLevels;" )
cpp_quote(" ArraySize = arraySize;" )
cpp_quote(" Format = format;" )
cpp_quote(" SampleDesc.Count = sampleCount;" )
cpp_quote(" SampleDesc.Quality = sampleQuality;" )
cpp_quote(" Usage = usage;" )
cpp_quote(" BindFlags = bindFlags;" )
cpp_quote(" CPUAccessFlags = cpuaccessFlags;" )
cpp_quote(" MiscFlags = miscFlags;" )
cpp_quote(" }")
cpp_quote(" ~CD3D10_TEXTURE2D_DESC() {}")
cpp_quote(" operator const D3D10_TEXTURE2D_DESC&() const {")
cpp_quote(" return *this;")
cpp_quote(" }")
cpp_quote("};")
cpp_quote("#endif")
{
union {
};
typedef enum D3D10_RTV_DIMENSION {
union {
};
union {
};
} D3D10_BOX;
const void *pSysMem;
{
const char *SemanticName;
{
const char *SemanticName;
typedef enum D3D10_QUERY {
} D3D10_QUERY;
void *pData;
void *pData;
typedef enum D3D10_CPU_ACCESS_FLAG {
D3D10_CPU_ACCESS_WRITE = 0x10000,
D3D10_CPU_ACCESS_READ = 0x20000
typedef enum D3D10_RESOURCE_MISC_FLAG {
D3D10_RESOURCE_MISC_GENERATE_MIPS = 0x0001,
D3D10_RESOURCE_MISC_SHARED = 0x0002,
D3D10_RESOURCE_MISC_TEXTURECUBE = 0x0004,
D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x0010,
D3D10_RESOURCE_MISC_GDI_COMPATIBLE = 0x0020
typedef enum D3D10_MAP_FLAG {
D3D10_MAP_FLAG_DO_NOT_WAIT = 0x100000,
typedef enum D3D10_CLEAR_FLAG {
D3D10_CLEAR_DEPTH = 0x1,
D3D10_CLEAR_STENCIL = 0x2
typedef enum D3D10_COLOR_WRITE_ENABLE {
D3D10_COLOR_WRITE_ENABLE_RED = 0x1,
typedef enum D3D10_TEXTURECUBE_FACE {
typedef enum D3D10_ASYNC_GETDATA_FLAG {
typedef enum D3D10_FILTER_TYPE {
typedef enum D3D10_QUERY_MISC_FLAG {
typedef enum D3D10_CREATE_DEVICE_FLAG {
D3D10_CREATE_DEVICE_DEBUG = 0x2,
D3D10_CREATE_DEVICE_BGRA_SUPPORT = 0x20,
/* Core */
interface ID3D10Device;
[
]
interface ID3D10DeviceChild : IUnknown
{
void GetDevice(
}
/* Resource */
[
]
interface ID3D10Resource : ID3D10DeviceChild
{
void GetType(
void SetEvictionPriority(
}
[
]
interface ID3D10Buffer : ID3D10Resource
{
void Unmap();
void GetDesc(
}
[
]
interface ID3D10Texture1D : ID3D10Resource
{
void Unmap(
void GetDesc(
}
[
]
interface ID3D10Texture2D : ID3D10Resource
{
void Unmap(
void GetDesc(
}
[
]
interface ID3D10Texture3D : ID3D10Resource
{
void Unmap(
void GetDesc(
}
[
]
interface ID3D10View : ID3D10DeviceChild
{
void GetResource(
}
[
]
interface ID3D10DepthStencilView : ID3D10View
{
void GetDesc(
}
[
]
interface ID3D10RenderTargetView : ID3D10View
{
void GetDesc(
}
[
]
interface ID3D10ShaderResourceView : ID3D10View
{
void GetDesc(
}
/* Resource End */
[
]
interface ID3D10BlendState : ID3D10DeviceChild
{
void GetDesc(
}
[
]
interface ID3D10DepthStencilState : ID3D10DeviceChild
{
void GetDesc(
}
[
]
interface ID3D10GeometryShader : ID3D10DeviceChild
{
}
[
]
interface ID3D10InputLayout : ID3D10DeviceChild
{
}
[
]
interface ID3D10PixelShader : ID3D10DeviceChild
{
}
[
]
interface ID3D10RasterizerState : ID3D10DeviceChild
{
void GetDesc(
}
[
]
interface ID3D10SamplerState : ID3D10DeviceChild
{
void GetDesc(
}
[
]
interface ID3D10VertexShader : ID3D10DeviceChild
{
}
[
]
interface ID3D10Asynchronous : ID3D10DeviceChild
{
void Begin();
void End();
UINT GetDataSize();
}
[
]
interface ID3D10Counter : ID3D10Asynchronous
{
void GetDesc(
}
[
]
interface ID3D10Query : ID3D10Asynchronous
{
void GetDesc(
}
[
]
interface ID3D10Predicate : ID3D10Query
{
}
[
]
interface ID3D10Device : IUnknown
{
void VSSetConstantBuffers(
void PSSetShaderResources(
void PSSetShader(
void PSSetSamplers(
void VSSetShader(
void DrawIndexed(
void Draw(
void PSSetConstantBuffers(
void IASetInputLayout(
void IASetVertexBuffers(
void IASetIndexBuffer(
void DrawIndexedInstanced(
void DrawInstanced(
void GSSetConstantBuffers(
void GSSetShader(
void IASetPrimitiveTopology(
void VSSetShaderResources(
void VSSetSamplers(
void SetPredication(
void GSSetShaderResources(
void GSSetSamplers(
void OMSetRenderTargets(
void OMSetBlendState(
void OMSetDepthStencilState(
void SOSetTargets(
void DrawAuto();
void RSSetState(
void RSSetViewports(
void RSSetScissorRects(
void CopySubresourceRegion(
void CopyResource(
void UpdateSubresource(
void ClearRenderTargetView(
void ClearDepthStencilView(
void GenerateMips(
void ResolveSubresource(
void VSGetConstantBuffers(
void PSGetShaderResources(
void PSGetShader(
void PSGetSamplers(
void VSGetShader(
void PSGetConstantBuffers(
void IAGetInputLayout(
void IAGetVertexBuffers(
void IAGetIndexBuffer(
void GSGetConstantBuffers(
void GSGetShader(
void IAGetPrimitiveTopology(
void VSGetShaderResources(
void VSGetSamplers(
void GetPredication(
void GSGetShaderResources(
void GSGetSamplers(
void OMGetRenderTargets(
void OMGetBlendState(
void OMGetDepthStencilState(
void SOGetTargets(
void RSGetState(
void RSGetViewports(
void RSGetScissorRects(
void ClearState();
void Flush();
[in] const void *pShaderBytecodeWithInputSignature,
[in] const void *pShaderBytecode,
[in] const void *pShaderBytecode,
[in] const void *pShaderBytecode,
[in] const void *pShaderBytecode,
void CheckCounterInfo(
[out] char *description,
[out] void **ppResource);
void SetTextFilterSize(
void GetTextFilterSize(
}
[
]
interface ID3D10Multithread : IUnknown
{
void Enter();
void Leave();
}
cpp_quote("#ifndef D3D10_IGNORE_SDK_LAYERS")
cpp_quote("/* FIXME: # include <d3d10sdklayers.h> */")
cpp_quote("#endif")
cpp_quote("#include \"d3d10misc.h\"")
cpp_quote("#include \"d3d10shader.h\"")
cpp_quote("#include \"d3d10effect.h\"")