d3d9

package module
Version: v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2016 License: MIT Imports: 5 Imported by: 0

README

d3d9

This library is a Go wrapper for Microsoft's Direct3D9 API.

Build

Besides a working Go installation you need to have a C compiler installed. The library was tested with MinGW (32 bit) on Windows XP and with MinGW (64 bit) on Windows 8.1. No additional Go or C libraries are needed to build, once you have set up your C compiler just use

go get -u github.com/gonutz/d3d9

to build and install.

To run a Direct3D9 application you need to have d3d9.dll installed on your system. Since Windows XP this is pre-installed with all Windows versions, so if you have Go installed you will have d3d9.dll as well. This also means that you will not need to ship any additional DLL when building with this library.

Usage

All Direct3D9 interfaces are translated to Go types and their methods are translated to functions on the types so the usage is very close to the C++ API.

There are some differences in the names in Go, since the package is named d3d9, all names in that package drop the D3D and 9 parts because they would be redundant. The changes are:

  • Interfaces drop the IDirect3D prefix and the 9 suffix, e.g. IDirect3DDevice9 becomes d3d9.Device. The only exception is IDirect3D9 which in Go becomes Direct3D.
  • Constants and enumerations drop the D3D prefix, otherwise they are the same and keep the upper case convention so users of Direct3D can easily find what they are looking for. For example D3DADAPTER_DEFAULT becomes d3d9.ADAPTER_DEFAULT, D3DFMT_R8G8B8 becomes d3d9.FMT_R8G8B8 etc.
  • Structs, like constants, only drop the D3D prefix, they too keep the upper case naming convention, so D3DRANGE becomes d3d9.RANGE. There is one exception to this, D3DRECT is still d3d9.D3DRECT because the API also uses Windows' RECT type so the name d3d9.RECT is used for that.
  • Error constants also drop the D3D prefix so D3DERR_OUTOFVIDEOMEMORY becomes ERR_OUTOFVIDEOMEMORY. However, the interface functions do not return these constants, they return Go errors instead of HRESULTs.
  • Instead of returning HRESULT, Direct3D9 functions return d3d9.Error which implements the standard Go error interface and has an additional function Code() int which returns the error code. This code can be checked against the defined error constants. If a function succeeds it returns nil.

Note that Direct3D9 needs a window handle for setting it up. This means that you need some way to create a native window and get the handle to pass it to d3d9. In the samples you can see how to do it using the SDL2 Go wrapper and Allen Dang's w32. You could also use other Windows wrapper libraries, like the walk library, or just write a little CGo code to set up a window yourself. This library does not provide window creation or event handling functionality, only the Direct3D9 wrapper.

When you write a program using this library, make sure to add this code in your main package:

func init() {
    runtime.LockOSThread()
}

There are some additional convenience functions. IndexBuffer and VertexBuffer have Lock functions which return void* pointers in the C API and would thus return unsafe.Pointers in Go. You can use these pointers to read and write various types from/to that memory. However, using unsafe.Pointer is not idiomatic Go so the Lock functions return a wrapper around the unsafe.Pointer instead. The wrapper provides functions of the form GetFloat32s and SetFloat32s which take a slice of []float32 and handles copying the data for you. See the functions for the documentation.

Similarly, when locking a two-dimensional resource, like a texture, you will get a d3d9.LOCKED_RECT. It too has a wrapper function for setting its 2D data. There is however no function to read the data, yet, and no functions for reading and writing sub-rectangles which could be useful. These functions can be added when needed by a real application to see the use case first and implement the functions according to that instead of guessing what might work. If you need such a function, create a pull request or an issue and it can be incorporated in this library.

Documentation

See the GoDoc for the Go API. The functions are only documented very generally, to get more detailed information about the Direct3D9 API see the MSDN documentation.

Examples

The samples folder contains some example programs that show the basics of setting up and using the library.

One real world usage of this library is my entry to the GopherGala 2016. It was first built using SDL2 and after the competition I ported it to DirectX, see main_windows.go for the implementation.

Status

The code started out as a rough version generated from the MSDN online documentation and was then manually refined to work well with Go and its conventions. It wraps the whole Direct3D9 API right now and adds some additional convenience functions for easy Go usage. However, LOCKED_RECT only has one function for setting the whole data rectangle at once, there is no simple way to set only sub-rectangles right now. Similarly the CubeTexture's LOCKED_BOX has no wrapper functions for getting and setting its data, yet. For now the raw unsafe.Pointer memory pointers can be used along with the pitch values and in the future such functions can be added when needed.

Help improve this library

Only real world use and feedback can improve the usability of this library, so please use it, fork it, send pull requests and create issues to help improve this library.

Documentation

Rendered for windows/amd64

Overview

Package d3d9 provides a wrapper for Microsoft's Direct3D9 API. Note that it can thus only be used on Windows.

To build the package you need a working C compiler. It was tested with MinGW, both the 32 bit and 64 bit versions work. You do not need to install any additional libraries, this wrapper works with the standard MinGW installation.

When running a Direct3D application you need to have d3d9.dll installed on the system, which fortunately has been deployed with all Windows versions since XP. This means if you have Go installed, you also have the DLL installed. This also means that your application can be deployed without the DirectX DLLs and if you have no other dependencies you can just give the executable file to the users.

To get going with this wrapper there are some basic samples that demonstrate how to set up and use the library at: https://github.com/gonutz/d3d9/tree/master/samples

Index

Constants

View Source
const (
	// ADAPTER_DEFAULT is used to specify the primary display adapter.
	ADAPTER_DEFAULT = C.D3DADAPTER_DEFAULT
	// CAPS_READ_SCANLINE means the display hardware is capable of returning
	// the current scan line.
	CAPS_READ_SCANLINE = C.D3DCAPS_READ_SCANLINE
	// CAPS2_CANAUTOGENMIPMAP indicates that the driver is capable of
	// automatically generating mipmaps.
	CAPS2_CANAUTOGENMIPMAP = C.D3DCAPS2_CANAUTOGENMIPMAP
	// CAPS2_CANCALIBRATEGAMMA indicates that the system has a calibrator
	// installed that can automatically adjust the gamma ramp so that the
	// result is identical on all systems that have a calibrator. To invoke the
	// calibrator when setting new gamma levels, use the SGR_CALIBRATE flag
	// when calling SetGammaRamp. Calibrating gamma ramps incurs some
	// processing overhead and should not be used frequently.
	CAPS2_CANCALIBRATEGAMMA = C.D3DCAPS2_CANCALIBRATEGAMMA
	// CAPS2_CANMANAGERESOURCE indicates that the driver is capable of managing
	// resources. On such drivers, POOL_MANAGED resources will be managed by
	// the driver. To have Direct3D override the driver so that Direct3D
	// manages resources, use the CREATE_DISABLE_DRIVER_MANAGEMENT flag when
	// calling CreateDevice.
	CAPS2_CANMANAGERESOURCE = C.D3DCAPS2_CANMANAGERESOURCE
	// CAPS2_DYNAMICTEXTURES indicates that the driver supports dynamic
	// textures.
	CAPS2_DYNAMICTEXTURES = C.D3DCAPS2_DYNAMICTEXTURES
	// CAPS2_FULLSCREENGAMMA indicates that the driver supports dynamic gamma
	// ramp adjustment in full-screen mode.
	CAPS2_FULLSCREENGAMMA = C.D3DCAPS2_FULLSCREENGAMMA
	// CAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD indicates that the device can
	// respect the RS_ALPHABLENDENABLE render state in full-screen mode while
	// using the FLIP or DISCARD swap effect. This only applies when the
	// RS_SRCBLEND or RS_DESTBLEND states are set to one of the following:
	// BLEND_DESTALPHA, BLEND_INVDESTALPHA, BLEND_DESTCOLOR, BLEND_INVDESTCOLOR
	CAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD = C.D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD
	// CAPS3_COPY_TO_VIDMEM indicates that the device can accelerate a memory
	// copy from system memory to local video memory. This cap guarantees that
	// UpdateSurface and UpdateTexture calls will be hardware accelerated. If
	// this cap is absent, these calls will succeed but will be slower.
	CAPS3_COPY_TO_VIDMEM = C.D3DCAPS3_COPY_TO_VIDMEM
	// CAPS3_COPY_TO_SYSTEMMEM indicates that the device can accelerate a
	// memory copy from local video memory to system memory. This cap
	// guarantees that GetRenderTargetData calls will be hardware accelerated.
	// If this cap is absent, this call will succeed but will be slower.
	CAPS3_COPY_TO_SYSTEMMEM = C.D3DCAPS3_COPY_TO_SYSTEMMEM
	// CAPS3_LINEAR_TO_SRGB_PRESENTATION indicates that the device can perform
	// gamma correction from a windowed back buffer (containing linear content)
	// to an sRGB desktop.
	CAPS3_LINEAR_TO_SRGB_PRESENTATION = C.D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION
	// CLEAR_STENCIL clears the stencil buffer.
	CLEAR_STENCIL = C.D3DCLEAR_STENCIL
	// CLEAR_TARGET clears a render target, or all targets in a multiple render
	// target.
	CLEAR_TARGET = C.D3DCLEAR_TARGET
	// CLEAR_ZBUFFER clears the depth buffer.
	CLEAR_ZBUFFER = C.D3DCLEAR_ZBUFFER
	// CREATE_ADAPTERGROUP_DEVICE asks the device to drive all the heads that
	// this master adapter owns. The flag is illegal on nonmaster adapters. If
	// this flag is set, the presentation parameters passed to CreateDevice
	// should point to an array of PRESENT_PARAMETERS. The number of elements
	// in PRESENT_PARAMETERS should equal the number of adapters defined by the
	// NumberOfAdaptersInGroup member of the CAPS9 structure. The DirectX
	// runtime will assign each element to each head in the numerical order
	// specified by the AdapterOrdinalInGroup member of CAPS9.
	CREATE_ADAPTERGROUP_DEVICE = C.D3DCREATE_ADAPTERGROUP_DEVICE
	// CREATE_DISABLE_DRIVER_MANAGEMENT instructs Direct3D to manage resources
	// instead of the driver. Direct3D calls will not fail for resource errors
	// such as insufficient video memory.
	CREATE_DISABLE_DRIVER_MANAGEMENT = C.D3DCREATE_DISABLE_DRIVER_MANAGEMENT
	// CREATE_DISABLE_DRIVER_MANAGEMENT_EX instructs Direct3D to manage
	// resources instead of the driver. Unlike
	// CREATE_DISABLE_DRIVER_MANAGEMENT, CREATE_DISABLE_DRIVER_MANAGEMENT_EX
	// will return errors for conditions such as insufficient video memory.
	CREATE_DISABLE_DRIVER_MANAGEMENT_EX = C.D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX
	// CREATE_DISABLE_PRINTSCREEN causes the runtime not register hotkeys for
	// Printscreen, Ctrl-Printscreen and Alt-Printscreen to capture the desktop
	// or window content.
	// This flag is available in Direct3D 9Ex only.
	CREATE_DISABLE_PRINTSCREEN = C.D3DCREATE_DISABLE_PRINTSCREEN
	// CREATE_DISABLE_PSGP_THREADING restricts computation to the main
	// application thread. If the flag is not set, the runtime may perform
	// software vertex processing and other computations in worker thread to
	// improve performance on multi-processor systems. Differences between
	// Windows XP and Windows Vista: This flag is available on Windows Vista,
	// Windows Server 2008, and Windows 7.
	CREATE_DISABLE_PSGP_THREADING = C.D3DCREATE_DISABLE_PSGP_THREADING
	// CREATE_ENABLE_PRESENTSTATS enables the gathering of present statistics
	// on the device. Calls to GetPresentStatistics will return valid data.
	// This flag is available in Direct3D 9Ex only.
	CREATE_ENABLE_PRESENTSTATS = C.D3DCREATE_ENABLE_PRESENTSTATS
	// CREATE_FPU_PRESERVE sets the precision for Direct3D floating-point
	// calculations to the precision used by the calling thread. If you do not
	// specify this flag, Direct3D defaults to single-precision
	// round-to-nearest mode for two reasons:
	// 1) Double-precision mode will reduce Direct3D performance.
	// 2) Portions of Direct3D assume floating-point unit exceptions are
	// masked; unmasking these exceptions may result in undefined behavior.
	CREATE_FPU_PRESERVE = C.D3DCREATE_FPU_PRESERVE
	// CREATE_HARDWARE_VERTEXPROCESSING specifies hardware vertex processing.
	CREATE_HARDWARE_VERTEXPROCESSING = C.D3DCREATE_HARDWARE_VERTEXPROCESSING
	// CREATE_MIXED_VERTEXPROCESSING specifies mixed (both software and
	// hardware) vertex processing.
	CREATE_MIXED_VERTEXPROCESSING = C.D3DCREATE_MIXED_VERTEXPROCESSING
	// CREATE_MULTITHREADED indicates that the application requests Direct3D to
	// be multithread safe. This makes a Direct3D thread take ownership of its
	// global critical section more frequently, which can degrade performance.
	// If an application processes window messages in one thread while making
	// Direct3D API calls in another, the application must use this flag when
	// creating the device. This window must also be destroyed before unloading
	// d3d9.dll.
	CREATE_MULTITHREADED = C.D3DCREATE_MULTITHREADED
	// CREATE_NOWINDOWCHANGES indicates that Direct3D must not alter the focus
	// window in any way.
	// Note: If this flag is set, the application must fully support all focus
	// management events, such as ALT+TAB and mouse click events.
	CREATE_NOWINDOWCHANGES = C.D3DCREATE_NOWINDOWCHANGES
	// CREATE_PUREDEVICE specifies that Direct3D does not support Get* calls
	// for anything that can be stored in state blocks. It also tells Direct3D
	// not to provide any emulation services for vertex processing. This means
	// that if the device does not support vertex processing, then the
	// application can use only post-transformed vertices.
	CREATE_PUREDEVICE = C.D3DCREATE_PUREDEVICE
	// CREATE_SCREENSAVER allows screensavers during a fullscreen application.
	// Without this flag, Direct3D will disable screensavers for as long as the
	// calling application is fullscreen. If the calling application is already
	// a screensaver, this flag has no effect.
	// This flag is available in Direct3D 9Ex only.
	CREATE_SCREENSAVER = C.D3DCREATE_SCREENSAVER
	// CREATE_SOFTWARE_VERTEXPROCESSING specifies software vertex processing.
	CREATE_SOFTWARE_VERTEXPROCESSING = C.D3DCREATE_SOFTWARE_VERTEXPROCESSING
	// CS_ALL is a combination of all clip flags.
	CS_ALL = C.D3DCS_ALL
	// CS_LEFT means all vertices are clipped by the left plane of the viewing
	// frustum.
	CS_LEFT = C.D3DCS_LEFT
	// CS_RIGHT means all vertices are clipped by the right plane of the
	// viewing frustum.
	CS_RIGHT = C.D3DCS_RIGHT
	// CS_TOP means all vertices are clipped by the top plane of the viewing
	// frustum.
	CS_TOP = C.D3DCS_TOP
	// CS_BOTTOM means all vertices are clipped by the bottom plane of the
	// viewing frustum.
	CS_BOTTOM = C.D3DCS_BOTTOM
	// CS_FRONT means all vertices are clipped by the front plane of the
	// viewing frustum.
	CS_FRONT = C.D3DCS_FRONT
	// CS_BACK means all vertices are clipped by the back plane of the viewing
	// frustum.
	CS_BACK = C.D3DCS_BACK
	// CS_PLANE0 uses application-defined clipping planes.
	CS_PLANE0 = C.D3DCS_PLANE0
	// CS_PLANE1 uses application-defined clipping planes.
	CS_PLANE1 = C.D3DCS_PLANE1
	// CS_PLANE2 uses application-defined clipping planes.
	CS_PLANE2 = C.D3DCS_PLANE2
	// CS_PLANE3 uses application-defined clipping planes.
	CS_PLANE3 = C.D3DCS_PLANE3
	// CS_PLANE4 uses application-defined clipping planes.
	CS_PLANE4 = C.D3DCS_PLANE4
	// CS_PLANE5 uses application-defined clipping planes.
	CS_PLANE5 = C.D3DCS_PLANE5
	// CURSORCAPS_COLOR indicates that the driver supports hardware color
	// cursor in at least high resolution modes (height >= 400).
	CURSORCAPS_COLOR = C.D3DCURSORCAPS_COLOR
	// CURSORCAPS_LOWRES indicates that the driver supports hardware color
	// cursor in low resolution modes (height < 400).
	CURSORCAPS_LOWRES = C.D3DCURSORCAPS_LOWRES
	// DEVCAPS_CANBLTSYSTONONLOCAL means the device supports blits from
	// system-memory textures to nonlocal video-memory textures.
	DEVCAPS_CANBLTSYSTONONLOCAL = C.D3DDEVCAPS_CANBLTSYSTONONLOCAL
	// DEVCAPS_CANRENDERAFTERFLIP means the device can queue rendering commands
	// after a page flip. Applications do not change their behavior if this
	// flag is set; this capability means that the device is relatively fast.
	DEVCAPS_CANRENDERAFTERFLIP = C.D3DDEVCAPS_CANRENDERAFTERFLIP
	// DEVCAPS_DRAWPRIMITIVES2 means the device can support at least a DirectX
	// 5-compliant driver.
	DEVCAPS_DRAWPRIMITIVES2 = C.D3DDEVCAPS_DRAWPRIMITIVES2
	// DEVCAPS_DRAWPRIMITIVES2EX means the device can support at least a
	// DirectX 7-compliant driver.
	DEVCAPS_DRAWPRIMITIVES2EX = C.D3DDEVCAPS_DRAWPRIMITIVES2EX
	// DEVCAPS_DRAWPRIMTLVERTEX means the device exports an
	// IDirect3DDevice9::DrawPrimitive-aware hal.
	DEVCAPS_DRAWPRIMTLVERTEX = C.D3DDEVCAPS_DRAWPRIMTLVERTEX
	// DEVCAPS_EXECUTESYSTEMMEMORY means the device can use execute buffers
	// from system memory.
	DEVCAPS_EXECUTESYSTEMMEMORY = C.D3DDEVCAPS_EXECUTESYSTEMMEMORY
	// DEVCAPS_EXECUTEVIDEOMEMORY means the device can use execute buffers from
	// video memory.
	DEVCAPS_EXECUTEVIDEOMEMORY = C.D3DDEVCAPS_EXECUTEVIDEOMEMORY
	// DEVCAPS_HWRASTERIZATION means the device has hardware acceleration for
	// scene rasterization.
	DEVCAPS_HWRASTERIZATION = C.D3DDEVCAPS_HWRASTERIZATION
	// DEVCAPS_HWTRANSFORMANDLIGHT means the device can support transformation
	// and lighting in hardware.
	DEVCAPS_HWTRANSFORMANDLIGHT = C.D3DDEVCAPS_HWTRANSFORMANDLIGHT
	// DEVCAPS_NPATCHES means the device supports N patches.
	DEVCAPS_NPATCHES = C.D3DDEVCAPS_NPATCHES
	// DEVCAPS_PUREDEVICE means the device can support rasterization,
	// transform, lighting, and shading in hardware.
	DEVCAPS_PUREDEVICE = C.D3DDEVCAPS_PUREDEVICE
	// DEVCAPS_QUINTICRTPATCHES means the device supports quintic Bézier
	// curves and B-splines.
	DEVCAPS_QUINTICRTPATCHES = C.D3DDEVCAPS_QUINTICRTPATCHES
	// DEVCAPS_RTPATCHES means the device supports rectangular and triangular
	// patches.
	DEVCAPS_RTPATCHES = C.D3DDEVCAPS_RTPATCHES
	// DEVCAPS_RTPATCHHANDLEZERO means the hardware architecture does not
	// require caching of any information, and uncached patches (handle zero)
	// will be drawn as efficiently as cached ones. Note that setting
	// DEVCAPS_RTPATCHHANDLEZERO does not mean that a patch with handle zero
	// can be drawn. A handle-zero patch can always be drawn whether this cap
	// is set or not.
	DEVCAPS_RTPATCHHANDLEZERO = C.D3DDEVCAPS_RTPATCHHANDLEZERO
	// DEVCAPS_SEPARATETEXTUREMEMORIES means the device is texturing from
	// separate memory pools.
	DEVCAPS_SEPARATETEXTUREMEMORIES = C.D3DDEVCAPS_SEPARATETEXTUREMEMORIES
	// DEVCAPS_TEXTURENONLOCALVIDMEM means the device can retrieve textures
	// from non-local video memory.
	DEVCAPS_TEXTURENONLOCALVIDMEM = C.D3DDEVCAPS_TEXTURENONLOCALVIDMEM
	// DEVCAPS_TEXTURESYSTEMMEMORY means the device can retrieve textures from
	// system memory.
	DEVCAPS_TEXTURESYSTEMMEMORY = C.D3DDEVCAPS_TEXTURESYSTEMMEMORY
	// DEVCAPS_TEXTUREVIDEOMEMORY means the device can retrieve textures from
	// device memory.
	DEVCAPS_TEXTUREVIDEOMEMORY = C.D3DDEVCAPS_TEXTUREVIDEOMEMORY
	// DEVCAPS_TLVERTEXSYSTEMMEMORY means the device can use buffers from
	// system memory for transformed and lit vertices.
	DEVCAPS_TLVERTEXSYSTEMMEMORY = C.D3DDEVCAPS_TLVERTEXSYSTEMMEMORY
	// DEVCAPS_TLVERTEXVIDEOMEMORY means the device can use buffers from video
	// memory for transformed and lit vertices.
	DEVCAPS_TLVERTEXVIDEOMEMORY = C.D3DDEVCAPS_TLVERTEXVIDEOMEMORY
	// DEVCAPS2_ADAPTIVETESSRTPATCH indicates that the device supports adaptive
	// tessellation of RT-patches
	DEVCAPS2_ADAPTIVETESSRTPATCH = C.D3DDEVCAPS2_ADAPTIVETESSRTPATCH
	// DEVCAPS2_ADAPTIVETESSNPATCH indicates that the device supports adaptive
	// tessellation of N-patches.
	DEVCAPS2_ADAPTIVETESSNPATCH = C.D3DDEVCAPS2_ADAPTIVETESSNPATCH
	// DEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES indicates that the device
	// supports StretchRect using a texture as the source.
	DEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES = C.D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES
	// DEVCAPS2_DMAPNPATCH indicates that the device supports displacement maps
	// for N-patches.
	DEVCAPS2_DMAPNPATCH = C.D3DDEVCAPS2_DMAPNPATCH
	// DEVCAPS2_PRESAMPLEDDMAPNPATCH indicates that the device supports
	// presampled displacement maps for N-patches.
	DEVCAPS2_PRESAMPLEDDMAPNPATCH = C.D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH
	// DEVCAPS2_STREAMOFFSET indicates that the device supports stream offsets.
	DEVCAPS2_STREAMOFFSET = C.D3DDEVCAPS2_STREAMOFFSET
	// DEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET means that multiple vertex
	// elements can share the same offset in a stream if
	// DEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET is set by the device and the
	// vertex declaration does not have an element with DECLUSAGE_POSITIONT0.
	DEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET = C.D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET
	// DTCAPS_UBYTE4 is a 4D unsigned byte.
	DTCAPS_UBYTE4 = C.D3DDTCAPS_UBYTE4
	// DTCAPS_UBYTE4N is a normalized, 4D unsigned byte. Each of the four bytes
	// is normalized by dividing to 255.0.
	DTCAPS_UBYTE4N = C.D3DDTCAPS_UBYTE4N
	// DTCAPS_SHORT2N is a normalized, 2D signed short, expanded to (first
	// byte/32767.0, second byte/32767.0, 0, 1).
	DTCAPS_SHORT2N = C.D3DDTCAPS_SHORT2N
	// DTCAPS_SHORT4N is a normalized, 4D signed short, expanded to (first
	// byte/32767.0, second byte/32767.0, third byte/32767.0, fourth
	// byte/32767.0).
	DTCAPS_SHORT4N = C.D3DDTCAPS_SHORT4N
	// DTCAPS_USHORT2N is a normalized, 2D unsigned short, expanded to (first
	// byte/65535.0, second byte/65535.0, 0, 1).
	DTCAPS_USHORT2N = C.D3DDTCAPS_USHORT2N
	// DTCAPS_USHORT4N is a normalized 4D unsigned short, expanded to (first
	// byte/65535.0, second byte/65535.0, third byte/65535.0, fourth
	// byte/65535.0).
	DTCAPS_USHORT4N = C.D3DDTCAPS_USHORT4N
	// DTCAPS_UDEC3 is a 3D unsigned 10 10 10 format expanded to (value, value,
	// value, 1).
	DTCAPS_UDEC3 = C.D3DDTCAPS_UDEC3
	// DTCAPS_DEC3N is a 3D signed 10 10 10 format normalized and expanded to
	// (v[0]/511.0, v[1]/511.0, v[2]/511.0, 1).
	DTCAPS_DEC3N = C.D3DDTCAPS_DEC3N
	// DTCAPS_FLOAT16_2 is a 2D 16-bit floating point numbers.
	DTCAPS_FLOAT16_2 = C.D3DDTCAPS_FLOAT16_2
	// DTCAPS_FLOAT16_4 is a 4D 16-bit floating point numbers.
	DTCAPS_FLOAT16_4 = C.D3DDTCAPS_FLOAT16_4
	// OK_NOAUTOGEN is a success code. However, the autogeneration of mipmaps
	// is not supported for this format. This means that resource creation will
	// succeed but the mipmap levels will not be automatically generated.
	OK_NOAUTOGEN = C.D3DOK_NOAUTOGEN
	// ERR_CONFLICTINGRENDERSTATE indicates that the currently set render
	// states cannot be used together.
	ERR_CONFLICTINGRENDERSTATE = C.D3DERR_CONFLICTINGRENDERSTATE
	// ERR_CONFLICTINGTEXTUREFILTER indicates that the current texture filters
	// cannot be used together.
	ERR_CONFLICTINGTEXTUREFILTER = C.D3DERR_CONFLICTINGTEXTUREFILTER
	// ERR_CONFLICTINGTEXTUREPALETTE indicates that the current textures cannot
	// be used simultaneously.
	ERR_CONFLICTINGTEXTUREPALETTE = C.D3DERR_CONFLICTINGTEXTUREPALETTE
	// ERR_DEVICEHUNG indicates that the device that returned this code caused
	// the hardware adapter to be reset by the OS. Most applications should
	// destroy the device and quit. Applications that must continue should
	// destroy all video memory objects (surfaces, textures, state blocks etc)
	// and call Reset() to put the device in a default state. If the
	// application then continues rendering in the same way, the device will
	// return to this state.
	// Applies to Direct3D 9Ex only.
	ERR_DEVICEHUNG = C.D3DERR_DEVICEHUNG
	// ERR_DEVICELOST indicates that the device has been lost but cannot be
	// reset at this time. Therefore, rendering is not possible. A Direct3D
	// device object other than the one that returned this code caused the
	// hardware adapter to be reset by the OS. Delete all video memory objects
	// (surfaces, textures, state blocks) and call Reset() to return the device
	// to a default state. If the application continues rendering without a
	// reset, the rendering calls will succeed.
	ERR_DEVICELOST = C.D3DERR_DEVICELOST
	// ERR_DEVICENOTRESET indicates that the device has been lost but can be
	// reset at this time.
	ERR_DEVICENOTRESET = C.D3DERR_DEVICENOTRESET
	// ERR_DEVICEREMOVED indicates that he hardware adapter has been removed.
	// Application must destroy the device, do enumeration of adapters and
	// create another Direct3D device. If application continues rendering
	// without calling Reset, the rendering calls will succeed.
	// Applies to Direct3D 9Ex only.
	ERR_DEVICEREMOVED = C.D3DERR_DEVICEREMOVED
	// ERR_DRIVERINTERNALERROR Internal driver error. Applications should
	// destroy and recreate the device when receiving this error.
	ERR_DRIVERINTERNALERROR = C.D3DERR_DRIVERINTERNALERROR
	// ERR_DRIVERINVALIDCALL is not used.
	ERR_DRIVERINVALIDCALL = C.D3DERR_DRIVERINVALIDCALL
	// ERR_INVALIDCALL indicates that the method call is invalid. For example,
	// a method's parameter may not be an invalid pointer.
	ERR_INVALIDCALL = C.D3DERR_INVALIDCALL
	// ERR_INVALIDDEVICE indicates that the requested device type is not valid.
	ERR_INVALIDDEVICE = C.D3DERR_INVALIDDEVICE
	// ERR_MOREDATA indicates that there is more data available than the
	// specified buffer size can hold.
	ERR_MOREDATA = C.D3DERR_MOREDATA
	// ERR_NOTAVAILABLE indicates that this device does not support the queried
	// technique.
	ERR_NOTAVAILABLE = C.D3DERR_NOTAVAILABLE
	// ERR_NOTFOUND indicates that the requested item was not found.
	ERR_NOTFOUND = C.D3DERR_NOTFOUND
	// _OK indicates that no error occurred.
	OK = C.D3D_OK
	// ERR_OUTOFVIDEOMEMORY indicates that Direct3D does not have enough
	// display memory to perform the operation. The device is using more
	// resources in a single scene than can fit simultaneously into video
	// memory. Present, PresentEx, or CheckDeviceState can return this error.
	// Recovery is similar to ERR_DEVICEHUNG, though the application may want
	// to reduce its per-frame memory usage as well to avoid having the error
	// recur.
	ERR_OUTOFVIDEOMEMORY = C.D3DERR_OUTOFVIDEOMEMORY
	// ERR_TOOMANYOPERATIONS indicates that the application is requesting more
	// texture-filtering operations than the device supports.
	ERR_TOOMANYOPERATIONS = C.D3DERR_TOOMANYOPERATIONS
	// ERR_UNSUPPORTEDALPHAARG indicates that the device does not support a
	// specified texture-blending argument for the alpha channel.
	ERR_UNSUPPORTEDALPHAARG = C.D3DERR_UNSUPPORTEDALPHAARG
	// ERR_UNSUPPORTEDALPHAOPERATION indicates that the device does not support
	// a specified texture-blending operation for the alpha channel.
	ERR_UNSUPPORTEDALPHAOPERATION = C.D3DERR_UNSUPPORTEDALPHAOPERATION
	// ERR_UNSUPPORTEDCOLORARG indicates that the device does not support a
	// specified texture-blending argument for color values.
	ERR_UNSUPPORTEDCOLORARG = C.D3DERR_UNSUPPORTEDCOLORARG
	// ERR_UNSUPPORTEDCOLOROPERATION indicates that the device does not support
	// a specified texture-blending operation for color values.
	ERR_UNSUPPORTEDCOLOROPERATION = C.D3DERR_UNSUPPORTEDCOLOROPERATION
	// ERR_UNSUPPORTEDFACTORVALUE indicates that the device does not support
	// the specified texture factor value. Not used; provided only to support
	// older drivers.
	ERR_UNSUPPORTEDFACTORVALUE = C.D3DERR_UNSUPPORTEDFACTORVALUE
	// ERR_UNSUPPORTEDTEXTUREFILTER indicates that the device does not support
	// the specified texture filter.
	ERR_UNSUPPORTEDTEXTUREFILTER = C.D3DERR_UNSUPPORTEDTEXTUREFILTER
	// ERR_WASSTILLDRAWING indicates that the previous blit operation that is
	// transferring information to or from this surface is incomplete.
	ERR_WASSTILLDRAWING = C.D3DERR_WASSTILLDRAWING
	// ERR_WRONGTEXTUREFORMAT indicates that the pixel format of the texture
	// surface is not valid.
	ERR_WRONGTEXTUREFORMAT = C.D3DERR_WRONGTEXTUREFORMAT
	// E_FAIL indicates that an undetermined error occurred inside the Direct3D
	// subsystem.
	E_FAIL = C.E_FAIL
	// E_INVALIDARG indicates that an invalid parameter was passed to the
	// returning function.
	E_INVALIDARG = C.E_INVALIDARG
	// E_NOINTERFACE indicates that no object interface is available.
	E_NOINTERFACE = C.E_NOINTERFACE
	// E_NOTIMPL indicates that a method is not implemented.
	E_NOTIMPL = C.E_NOTIMPL
	// E_OUTOFMEMORY indicates that Direct3D could not allocate sufficient
	// memory to complete the call.
	E_OUTOFMEMORY = C.E_OUTOFMEMORY
	// S_NOT_RESIDENT indicates that at least one allocation that comprises the
	// resources is on disk. Direct3D 9Ex only.
	S_NOT_RESIDENT = C.S_NOT_RESIDENT
	// S_RESIDENT_IN_SHARED_MEMORY indicates that no allocations that comprise
	// the resources are on disk. However, at least one allocation is not in
	// GPU-accessible memory. Direct3D 9Ex only.
	S_RESIDENT_IN_SHARED_MEMORY = C.S_RESIDENT_IN_SHARED_MEMORY
	// ERR_UNSUPPORTEDOVERLAY indicates that the device does not support
	// overlay for the specified size or display mode.
	// Direct3D 9Ex under Windows 7 only.
	ERR_UNSUPPORTEDOVERLAY = C.D3DERR_UNSUPPORTEDOVERLAY
	// ERR_UNSUPPORTEDOVERLAYFORMAT indicates that the device does not support
	// overlay for the specified surface format.
	// Direct3D 9Ex under Windows 7 only.
	ERR_UNSUPPORTEDOVERLAYFORMAT = C.D3DERR_UNSUPPORTEDOVERLAYFORMAT
	// ERR_CANNOTPROTECTCONTENT indicates that the specified content cannot be
	// protected.
	// Direct3D 9Ex under Windows 7 only.
	ERR_CANNOTPROTECTCONTENT = C.D3DERR_CANNOTPROTECTCONTENT
	// ERR_UNSUPPORTEDCRYPTO indicates that the specified cryptographic
	// algorithm is not supported.
	// Direct3D 9Ex under Windows 7 only.
	ERR_UNSUPPORTEDCRYPTO = C.D3DERR_UNSUPPORTEDCRYPTO
	// ERR_PRESENT_STATISTICS_DISJOINT indicates that the present statistics
	// have no orderly sequence.
	// Direct3D 9Ex under Windows 7 only.
	ERR_PRESENT_STATISTICS_DISJOINT = C.D3DERR_PRESENT_STATISTICS_DISJOINT
	// FVFCAPS_DONOTSTRIPELEMENTS means it is preferable that vertex elements
	// not be stripped. That is, if the vertex format contains elements that
	// are not used with the current render states, there is no need to
	// regenerate the vertices. If this capability flag is not present,
	// stripping extraneous elements from the vertex format provides better
	// performance.
	FVFCAPS_DONOTSTRIPELEMENTS = C.D3DFVFCAPS_DONOTSTRIPELEMENTS
	// FVFCAPS_PSIZE means the point size is determined by either the render
	// state or the vertex data. If an FVF is used, point size can come from
	// point size data in the vertex declaration. Otherwise, point size is
	// determined by the render state RS_POINTSIZE. If the application provides
	// point size in both (the render state and the vertex declaration), the
	// vertex data overrides the render-state data.
	FVFCAPS_PSIZE = C.D3DFVFCAPS_PSIZE
	// FVFCAPS_TEXCOORDCOUNTMASK masks the low WORD of FVFCaps. These bits,
	// cast to the WORD data type, describe the total number of texture
	// coordinate sets that the device can simultaneously use for multiple
	// texture blending. (You can use up to eight texture coordinate sets for
	// any vertex, but the device can blend using only the specified number of
	// texture coordinate sets.)
	FVFCAPS_TEXCOORDCOUNTMASK = C.D3DFVFCAPS_TEXCOORDCOUNTMASK
	// FVF_DIFFUSE means the vertex format includes a diffuse color component.
	// It is a COLOR in ARGB order.
	FVF_DIFFUSE = C.D3DFVF_DIFFUSE
	// FVF_NORMAL means the vertex format includes a vertex normal vector. This
	// flag cannot be used with the FVF_XYZRHW flag. The normal consists of
	// three float32s.
	FVF_NORMAL = C.D3DFVF_NORMAL
	// FVF_PSIZE means vertex format specified in point size. This size is
	// expressed in camera space units for vertices that are not transformed
	// and lit, and in device-space units for transformed and lit vertices.
	FVF_PSIZE = C.D3DFVF_PSIZE
	// FVF_SPECULAR means the vertex format includes a specular color component.
	FVF_SPECULAR = C.D3DFVF_SPECULAR
	// FVF_XYZ means the vertex format includes the position of an
	// untransformed vertex. This flag cannot be used with the FVF_XYZRHW flag.
	FVF_XYZ = C.D3DFVF_XYZ
	// FVF_XYZRHW means the vertex format includes the position of a
	// transformed vertex. This flag cannot be used with the FVF_XYZ or
	// FVF_NORMAL flags.
	FVF_XYZRHW = C.D3DFVF_XYZRHW
	// FVF_XYZB1 means the vertex format contains position data, and 1
	// weighting (beta) value to use for multimatrix vertex blending
	// operations. Currently, Direct3D can blend with up to three weighting
	// values and four blending matrices.
	FVF_XYZB1 = C.D3DFVF_XYZB1
	// FVF_XYZB2 means the vertex format contains position data, and 2
	// weighting (beta) values to use for multimatrix vertex blending
	// operations. Currently, Direct3D can blend with up to three weighting
	// values and four blending matrices.
	FVF_XYZB2 = C.D3DFVF_XYZB2
	// FVF_XYZB3 means the vertex format contains position data, and 3
	// weighting (beta) values to use for multimatrix vertex blending
	// operations. Currently, Direct3D can blend with up to three weighting
	// values and four blending matrices.
	FVF_XYZB3 = C.D3DFVF_XYZB3
	// FVF_XYZB4 means the vertex format contains position data, and 4
	// weighting (beta) values to use for multimatrix vertex blending
	// operations. Currently, Direct3D can blend with up to three weighting
	// values and four blending matrices.
	FVF_XYZB4 = C.D3DFVF_XYZB4
	// FVF_XYZB5 means the vertex format contains position data, and 5
	// weighting (beta) values to use for multimatrix vertex blending
	// operations. Currently, Direct3D can blend with up to three weighting
	// values and four blending matrices.
	FVF_XYZB5 = C.D3DFVF_XYZB5
	// FVF_XYZW means the vertex format contains transformed and clipped (x, y,
	// z, w) data. ProcessVertices does not invoke the clipper, instead
	// outputting data in clip coordinates. This constant is designed for, and
	// can only be used with, the programmable vertex pipeline.
	FVF_XYZW = C.D3DFVF_XYZW
	// FVF_TEX0 is the number of texture coordinate sets for this vertex. The
	// actual values for these flags are not sequential.
	FVF_TEX0 = C.D3DFVF_TEX0
	// FVF_TEX1 is the number of texture coordinate sets for this vertex. The
	// actual values for these flags are not sequential.
	FVF_TEX1 = C.D3DFVF_TEX1
	// FVF_TEX2 is the number of texture coordinate sets for this vertex. The
	// actual values for these flags are not sequential.
	FVF_TEX2 = C.D3DFVF_TEX2
	// FVF_TEX3 is the number of texture coordinate sets for this vertex. The
	// actual values for these flags are not sequential.
	FVF_TEX3 = C.D3DFVF_TEX3
	// FVF_TEX4 is the number of texture coordinate sets for this vertex. The
	// actual values for these flags are not sequential.
	FVF_TEX4 = C.D3DFVF_TEX4
	// FVF_TEX5 is the number of texture coordinate sets for this vertex. The
	// actual values for these flags are not sequential.
	FVF_TEX5 = C.D3DFVF_TEX5
	// FVF_TEX6 is the number of texture coordinate sets for this vertex. The
	// actual values for these flags are not sequential.
	FVF_TEX6 = C.D3DFVF_TEX6
	// FVF_TEX7 is the number of texture coordinate sets for this vertex. The
	// actual values for these flags are not sequential.
	FVF_TEX7 = C.D3DFVF_TEX7
	// FVF_TEX8 is the number of texture coordinate sets for this vertex. The
	// actual values for these flags are not sequential.
	FVF_TEX8 = C.D3DFVF_TEX8
	// FVF_TEXTUREFORMAT1 means 1 floating point value.
	FVF_TEXTUREFORMAT1 = C.D3DFVF_TEXTUREFORMAT1
	// FVF_TEXTUREFORMAT2 means 2 floating point value.
	FVF_TEXTUREFORMAT2 = C.D3DFVF_TEXTUREFORMAT2
	// FVF_TEXTUREFORMAT3 means 3 floating point value.
	FVF_TEXTUREFORMAT3 = C.D3DFVF_TEXTUREFORMAT3
	// FVF_TEXTUREFORMAT4 means 4 floating point value.
	FVF_TEXTUREFORMAT4 = C.D3DFVF_TEXTUREFORMAT4
	// FVF_POSITION_MASK means the format has a mask for position bits.
	FVF_POSITION_MASK = C.D3DFVF_POSITION_MASK
	// FVF_TEXCOUNT_MASK means the format has a mask value for texture flag
	// bits.
	FVF_TEXCOUNT_MASK = C.D3DFVF_TEXCOUNT_MASK
	// FVF_LASTBETA_D3DCOLOR means the last beta field in the vertex position
	// data will be of type COLOR. The data in the beta fields are used with
	// matrix palette skinning to specify matrix indices.
	FVF_LASTBETA_D3DCOLOR = C.D3DFVF_LASTBETA_D3DCOLOR
	// FVF_LASTBETA_UBYTE4 means the last beta field in the vertex position
	// data will be of type UBYTE4. The data in the beta fields are used with
	// matrix palette skinning to specify matrix indices.
	FVF_LASTBETA_UBYTE4 = C.D3DFVF_LASTBETA_UBYTE4
	// FVF_TEXCOUNT_SHIFT is the number of bits by which to shift an integer
	// value that identifies the number of texture coordinates for a vertex.
	FVF_TEXCOUNT_SHIFT = C.D3DFVF_TEXCOUNT_SHIFT
	// LINECAPS_ALPHACMP means it supports alpha-test comparisons.
	LINECAPS_ALPHACMP = C.D3DLINECAPS_ALPHACMP
	// LINECAPS_ANTIALIAS means antialiased lines are supported.
	LINECAPS_ANTIALIAS = C.D3DLINECAPS_ANTIALIAS
	// LINECAPS_BLEND means it supports source-blending.
	LINECAPS_BLEND = C.D3DLINECAPS_BLEND
	// LINECAPS_FOG means it supports fog.
	LINECAPS_FOG = C.D3DLINECAPS_FOG
	// LINECAPS_TEXTURE means it supports texture-mapping.
	LINECAPS_TEXTURE = C.D3DLINECAPS_TEXTURE
	// LINECAPS_ZTEST means it supports z-buffer comparisons.
	LINECAPS_ZTEST = C.D3DLINECAPS_ZTEST
	// LOCK_DISCARD instructs the application to discard all memory within the
	// locked region. For vertex and index buffers, the entire buffer will be
	// discarded. This option is only valid when the resource is created with
	// dynamic usage.
	LOCK_DISCARD = C.D3DLOCK_DISCARD
	// LOCK_DONOTWAIT allows an application to gain back CPU cycles if the
	// driver cannot lock the surface immediately. If this flag is set and the
	// driver cannot lock the surface immediately, the lock call will return
	// ERR_WASSTILLDRAWING. This flag can only be used when locking a surface
	// created using CreateOffscreenPlainSurface, CreateRenderTarget, or
	// CreateDepthStencilSurface. This flag can also be used with a back buffer.
	LOCK_DONOTWAIT = C.D3DLOCK_DONOTWAIT
	// LOCK_NO_DIRTY_UPDATE by default, a lock on a resource adds a dirty
	// region to that resource. This option prevents any changes to the dirty
	// state of the resource. Applications should use this option when they
	// have additional information about the set of regions changed during the
	// lock operation.
	LOCK_NO_DIRTY_UPDATE = C.D3DLOCK_NO_DIRTY_UPDATE
	// LOCK_NOOVERWRITE indicates that memory that was referred to in a drawing
	// call since the last lock without this flag will not be modified during
	// the lock. This can enable optimizations when the application is
	// appending data to a resource. Specifying this flag enables the driver to
	// return immediately if the resource is in use, otherwise, the driver must
	// finish using the resource before returning from locking.
	LOCK_NOOVERWRITE = C.D3DLOCK_NOOVERWRITE
	// LOCK_NOSYSLOCK the default behavior of a video memory lock is to reserve
	// a system-wide critical section, guaranteeing that no display mode
	// changes will occur for the duration of the lock. This option causes the
	// system-wide critical section not to be held for the duration of the lock.
	// The lock operation is time consuming, but can enable the system to
	// perform other duties, such as moving the mouse cursor. This option is
	// useful for long-duration locks, such as the lock of the back buffer for
	// software rendering that would otherwise adversely affect system
	// responsiveness.
	LOCK_NOSYSLOCK = C.D3DLOCK_NOSYSLOCK
	// LOCK_READONLY means the application will not write to the buffer. This
	// enables resources stored in non-native formats to save the recompression
	// step when unlocking.
	LOCK_READONLY = C.D3DLOCK_READONLY
	// PBLENDCAPS_BLENDFACTOR means the driver supports both BLEND_BLENDFACTOR
	// and BLEND_INVBLENDFACTOR.
	PBLENDCAPS_BLENDFACTOR = C.D3DPBLENDCAPS_BLENDFACTOR
	// PBLENDCAPS_BOTHINVSRCALPHA means the source blend factor is (1 - As, 1 -
	// As, 1 - As, 1 - As) and destination blend factor is (As, As, As, As);
	// the destination blend selection is overridden.
	PBLENDCAPS_BOTHINVSRCALPHA = C.D3DPBLENDCAPS_BOTHINVSRCALPHA
	// PBLENDCAPS_BOTHSRCALPHA means the driver supports the BLEND_BOTHSRCALPHA
	// blend mode. (This blend mode is obsolete.)
	PBLENDCAPS_BOTHSRCALPHA = C.D3DPBLENDCAPS_BOTHSRCALPHA
	// PBLENDCAPS_DESTALPHA means the blend factor is (Ad, Ad, Ad, Ad).
	PBLENDCAPS_DESTALPHA = C.D3DPBLENDCAPS_DESTALPHA
	// PBLENDCAPS_DESTCOLOR means the blend factor is (Rd, Gd, Bd, Ad).
	PBLENDCAPS_DESTCOLOR = C.D3DPBLENDCAPS_DESTCOLOR
	// PBLENDCAPS_INVDESTALPHA means the blend factor is (1 - Ad, 1 - Ad, 1 -
	// Ad, 1 - Ad).
	PBLENDCAPS_INVDESTALPHA = C.D3DPBLENDCAPS_INVDESTALPHA
	// PBLENDCAPS_INVDESTCOLOR means the blend factor is (1 - Rd, 1 - Gd, 1 -
	// Bd, 1 - Ad).
	PBLENDCAPS_INVDESTCOLOR = C.D3DPBLENDCAPS_INVDESTCOLOR
	// PBLENDCAPS_INVSRCALPHA means the blend factor is (1 - As, 1 - As, 1 -
	// As, 1 - As).
	PBLENDCAPS_INVSRCALPHA = C.D3DPBLENDCAPS_INVSRCALPHA
	// PBLENDCAPS_INVSRCCOLOR means the blend factor is (1 - Rs, 1 - Gs, 1 -
	// Bs, 1 - As).
	PBLENDCAPS_INVSRCCOLOR = C.D3DPBLENDCAPS_INVSRCCOLOR
	// PBLENDCAPS_ONE means the blend factor is (1, 1, 1, 1).
	PBLENDCAPS_ONE = C.D3DPBLENDCAPS_ONE
	// PBLENDCAPS_SRCALPHA means the blend factor is (As, As, As, As).
	PBLENDCAPS_SRCALPHA = C.D3DPBLENDCAPS_SRCALPHA
	// PBLENDCAPS_SRCALPHASAT means the blend factor is (f, f, f, 1); f =
	// min(As, 1 - Ad).
	PBLENDCAPS_SRCALPHASAT = C.D3DPBLENDCAPS_SRCALPHASAT
	// PBLENDCAPS_SRCCOLOR means the blend factor is (Rs, Gs, Bs, As).
	PBLENDCAPS_SRCCOLOR = C.D3DPBLENDCAPS_SRCCOLOR
	// PBLENDCAPS_ZERO means the blend factor is (0, 0, 0, 0).
	PBLENDCAPS_ZERO = C.D3DPBLENDCAPS_ZERO
	// PCMPCAPS_ALWAYS always passes the z-test.
	PCMPCAPS_ALWAYS = C.D3DPCMPCAPS_ALWAYS
	// PCMPCAPS_EQUAL passes the z-test if the new z equals the current z.
	PCMPCAPS_EQUAL = C.D3DPCMPCAPS_EQUAL
	// PCMPCAPS_GREATER passes the z-test if the new z is greater than the
	// current z.
	PCMPCAPS_GREATER = C.D3DPCMPCAPS_GREATER
	// PCMPCAPS_GREATEREQUAL passes the z-test if the new z is greater than or
	// equal to the current z.
	PCMPCAPS_GREATEREQUAL = C.D3DPCMPCAPS_GREATEREQUAL
	// PCMPCAPS_LESS passes the z-test if the new z is less than the current z.
	PCMPCAPS_LESS = C.D3DPCMPCAPS_LESS
	// PCMPCAPS_LESSEQUAL passes the z-test if the new z is less than or equal
	// to the current z.
	PCMPCAPS_LESSEQUAL = C.D3DPCMPCAPS_LESSEQUAL
	// PCMPCAPS_NEVER always fails the z-test.
	PCMPCAPS_NEVER = C.D3DPCMPCAPS_NEVER
	// PCMPCAPS_NOTEQUAL passes the z-test if the new z does not equal the
	// current z.
	PCMPCAPS_NOTEQUAL = C.D3DPCMPCAPS_NOTEQUAL
	// PMISCCAPS_MASKZ means the device can enable and disable modification of
	// the depth buffer on pixel operations.
	PMISCCAPS_MASKZ = C.D3DPMISCCAPS_MASKZ
	// PMISCCAPS_CULLNONE means the driver does not perform triangle culling.
	// This corresponds to the CULL_NONE member of the CULL enumerated type.
	PMISCCAPS_CULLNONE = C.D3DPMISCCAPS_CULLNONE
	// PMISCCAPS_CULLCW means the driver supports clockwise triangle culling
	// through the RS_CULLMODE state. (This applies only to triangle
	// primitives.) This flag corresponds to the CULL_CW member of the CULL
	// enumerated type.
	PMISCCAPS_CULLCW = C.D3DPMISCCAPS_CULLCW
	// PMISCCAPS_CULLCCW means the driver supports counterclockwise culling
	// through the RS_CULLMODE state. (This applies only to triangle
	// primitives.) This flag corresponds to the CULL_CCW member of the CULL
	// enumerated type.
	PMISCCAPS_CULLCCW = C.D3DPMISCCAPS_CULLCCW
	// PMISCCAPS_COLORWRITEENABLE means the device supports per-channel writes
	// for the render-target color buffer through the RS_COLORWRITEENABLE state.
	PMISCCAPS_COLORWRITEENABLE = C.D3DPMISCCAPS_COLORWRITEENABLE
	// PMISCCAPS_CLIPPLANESCALEDPOINTS means the device correctly clips scaled
	// points of size greater than 1.0 to user-defined clipping planes.
	PMISCCAPS_CLIPPLANESCALEDPOINTS = C.D3DPMISCCAPS_CLIPPLANESCALEDPOINTS
	// PMISCCAPS_CLIPTLVERTS means the device clips post-transformed vertex
	// primitives.
	// Specify USAGE_DONOTCLIP when the pipeline should not do any clipping.
	// For this case, additional software clipping may need to be performed at
	// draw time, requiring the vertex buffer to be in system memory.
	PMISCCAPS_CLIPTLVERTS = C.D3DPMISCCAPS_CLIPTLVERTS
	// PMISCCAPS_TSSARGTEMP means the device supports TA for temporary register.
	PMISCCAPS_TSSARGTEMP = C.D3DPMISCCAPS_TSSARGTEMP
	// PMISCCAPS_BLENDOP means the device supports alpha-blending operations
	// other than BLENDOP_ADD.
	PMISCCAPS_BLENDOP = C.D3DPMISCCAPS_BLENDOP
	// PMISCCAPS_NULLREFERENCE is a reference device that does not render.
	PMISCCAPS_NULLREFERENCE = C.D3DPMISCCAPS_NULLREFERENCE
	// PMISCCAPS_INDEPENDENTWRITEMASKS means the device supports independent
	// write masks for multiple element textures or multiple render targets.
	PMISCCAPS_INDEPENDENTWRITEMASKS = C.D3DPMISCCAPS_INDEPENDENTWRITEMASKS
	// PMISCCAPS_PERSTAGECONSTANT means the device supports per-stage
	// constants. See TSS_CONSTANT in TEXTURESTAGESTATETYPE.
	PMISCCAPS_PERSTAGECONSTANT = C.D3DPMISCCAPS_PERSTAGECONSTANT
	// PMISCCAPS_FOGANDSPECULARALPHA means the device supports separate fog and
	// specular alpha. Many devices use the specular alpha channel to store the
	// fog factor.
	PMISCCAPS_FOGANDSPECULARALPHA = C.D3DPMISCCAPS_FOGANDSPECULARALPHA
	// PMISCCAPS_SEPARATEALPHABLEND means the device supports separate blend
	// settings for the alpha channel.
	PMISCCAPS_SEPARATEALPHABLEND = C.D3DPMISCCAPS_SEPARATEALPHABLEND
	// PMISCCAPS_MRTINDEPENDENTBITDEPTHS means the device supports different
	// bit depths for multiple render targets.
	PMISCCAPS_MRTINDEPENDENTBITDEPTHS = C.D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS
	// PMISCCAPS_MRTPOSTPIXELSHADERBLENDING means the device supports
	// post-pixel shader operations for multiple render targets.
	PMISCCAPS_MRTPOSTPIXELSHADERBLENDING = C.D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING
	// PMISCCAPS_FOGVERTEXCLAMPED means the device clamps fog blend factor per
	// vertex.
	PMISCCAPS_FOGVERTEXCLAMPED = C.D3DPMISCCAPS_FOGVERTEXCLAMPED
	// PRASTERCAPS_ANISOTROPY means the device supports anisotropic filtering.
	PRASTERCAPS_ANISOTROPY = C.D3DPRASTERCAPS_ANISOTROPY
	// PRASTERCAPS_COLORPERSPECTIVE means the device iterates colors
	// perspective correctly.
	PRASTERCAPS_COLORPERSPECTIVE = C.D3DPRASTERCAPS_COLORPERSPECTIVE
	// PRASTERCAPS_DITHER means the device can dither to improve color
	// resolution.
	PRASTERCAPS_DITHER = C.D3DPRASTERCAPS_DITHER
	// PRASTERCAPS_DEPTHBIAS means the device supports legacy depth bias. For
	// true depth bias, see PRASTERCAPS_SLOPESCALEDEPTHBIAS.
	PRASTERCAPS_DEPTHBIAS = C.D3DPRASTERCAPS_DEPTHBIAS
	// PRASTERCAPS_FOGRANGE means the device supports range-based fog. In
	// range-based fog, the distance of an object from the viewer is used to
	// compute fog effects, not the depth of the object (that is, the
	// z-coordinate) in the scene.
	PRASTERCAPS_FOGRANGE = C.D3DPRASTERCAPS_FOGRANGE
	// PRASTERCAPS_FOGTABLE means the device calculates the fog value by
	// referring to a lookup table containing fog values that are indexed to
	// the depth of a given pixel.
	PRASTERCAPS_FOGTABLE = C.D3DPRASTERCAPS_FOGTABLE
	// PRASTERCAPS_FOGVERTEX means the device calculates the fog value during
	// the lighting operation and interpolates the fog value during
	// rasterization.
	PRASTERCAPS_FOGVERTEX = C.D3DPRASTERCAPS_FOGVERTEX
	// PRASTERCAPS_MIPMAPLODBIAS means the device supports level-of-detail bias
	// adjustments. These bias adjustments enable an application to make a
	// mipmap appear crisper or less sharp than it normally would. For more
	// information about level-of-detail bias in mipmaps, see
	// SAMP_MIPMAPLODBIAS.
	PRASTERCAPS_MIPMAPLODBIAS = C.D3DPRASTERCAPS_MIPMAPLODBIAS
	// PRASTERCAPS_MULTISAMPLE_TOGGLE means the device supports toggling
	// multisampling on and off between Device.BeginScene and Device.EndScene
	// (using RS_MULTISAMPLEANTIALIAS).
	PRASTERCAPS_MULTISAMPLE_TOGGLE = C.D3DPRASTERCAPS_MULTISAMPLE_TOGGLE
	// PRASTERCAPS_SCISSORTEST means the device supports scissor test.
	PRASTERCAPS_SCISSORTEST = C.D3DPRASTERCAPS_SCISSORTEST
	// PRASTERCAPS_SLOPESCALEDEPTHBIAS means the device performs true
	// slope-scale based depth bias. This is in contrast to the legacy style
	// depth bias.
	PRASTERCAPS_SLOPESCALEDEPTHBIAS = C.D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS
	// PRASTERCAPS_WBUFFER means the device supports depth buffering using w.
	PRASTERCAPS_WBUFFER = C.D3DPRASTERCAPS_WBUFFER
	// PRASTERCAPS_WFOG means the device supports w-based fog. W-based fog is
	// used when a perspective projection matrix is specified, but affine
	// projections still use z-based fog. The system considers a projection
	// matrix that contains a nonzero value in the [3][4] element to be a
	// perspective projection matrix.
	PRASTERCAPS_WFOG = C.D3DPRASTERCAPS_WFOG
	// PRASTERCAPS_ZBUFFERLESSHSR means the device can perform hidden-surface
	// removal (HSR) without requiring the application to sort polygons and
	// without requiring the allocation of a depth-buffer. This leaves more
	// video memory for textures. The method used to perform HSR is
	// hardware-dependent and is transparent to the application.
	// Z-bufferless HSR is performed if no depth-buffer surface is associated
	// with the rendering-target surface and the depth-buffer comparison test
	// is enabled (that is, when the state value associated with the RS_ZENABLE
	// enumeration constant is set to TRUE).
	PRASTERCAPS_ZBUFFERLESSHSR = C.D3DPRASTERCAPS_ZBUFFERLESSHSR
	// PRASTERCAPS_ZFOG means the device supports z-based fog.
	PRASTERCAPS_ZFOG = C.D3DPRASTERCAPS_ZFOG
	// PRASTERCAPS_ZTEST means the device can perform z-test operations. This
	// effectively renders a primitive and indicates whether any z pixels have
	// been rendered.
	PRASTERCAPS_ZTEST = C.D3DPRASTERCAPS_ZTEST
	// PRESENT_INTERVAL_DEFAULT is nearly equivalent to PRESENT_INTERVAL_ONE.
	PRESENT_INTERVAL_DEFAULT = C.D3DPRESENT_INTERVAL_DEFAULT
	// PRESENT_INTERVAL_ONE means the driver will wait for the vertical retrace
	// period (the runtime will "beam follow" to prevent tearing). Present
	// operations will not be affected more frequently than the screen refresh;
	// the runtime will complete at most one Present operation per adapter
	// refresh period. This is equivalent to using SWAPEFFECT_COPYVSYNC in
	// DirectX 8.1. This option is always available for both windowed and
	// full-screen swap chains.
	PRESENT_INTERVAL_ONE = C.D3DPRESENT_INTERVAL_ONE
	// PRESENT_INTERVAL_TWO means the driver will wait for the vertical retrace
	// period. Present operations will not be affected more frequently than
	// every second screen refresh. Check the PresentationIntervals cap (see
	// CAPS) to see if PRESENT_INTERVAL_TWO is supported by the driver.
	PRESENT_INTERVAL_TWO = C.D3DPRESENT_INTERVAL_TWO
	// PRESENT_INTERVAL_THREE means the driver will wait for the vertical
	// retrace period. Present operations will not be affected more frequently
	// than every third screen refresh. Check the PresentationIntervals cap
	// (see CAPS) to see if PRESENT_INTERVAL_THREE is supported by the driver.
	PRESENT_INTERVAL_THREE = C.D3DPRESENT_INTERVAL_THREE
	// PRESENT_INTERVAL_FOUR means the driver will wait for the vertical
	// retrace period. Present operations will not be affected more frequently
	// than every fourth screen refresh. Check the PresentationIntervals member
	// (see CAPS) to see if PRESENT_INTERVAL_FOUR is supported by the driver.
	PRESENT_INTERVAL_FOUR = C.D3DPRESENT_INTERVAL_FOUR
	// PRESENT_INTERVAL_IMMEDIATE means the runtime updates the window client
	// area immediately and might do so more than once during the adapter
	// refresh period. This is equivalent to using SWAPEFFECT_COPY in DirectX
	// 8. Present operations might be affected immediately. This option is
	// always available for both windowed and full-screen swap chains.
	PRESENT_INTERVAL_IMMEDIATE = C.D3DPRESENT_INTERVAL_IMMEDIATE
	// PRESENT_BACK_BUFFERS_MAX is the maximum number of back buffers supported
	// in Direct3D 9.
	PRESENT_BACK_BUFFERS_MAX = C.D3DPRESENT_BACK_BUFFERS_MAX
	// PRESENTFLAG_DEVICECLIP clips a windowed Present blit into the window
	// client area, within the monitor screen area of the video adapter that
	// created the Direct3D device. PRESENTFLAG_DEVICECLIP is not valid with
	// SWAPEFFECT_FLIPEX.
	PRESENTFLAG_DEVICECLIP = C.D3DPRESENTFLAG_DEVICECLIP
	// PRESENTFLAG_DISCARD_DEPTHSTENCIL set this flag when the device or swap
	// chain is created to enable z-buffer discarding. If this flag is set, the
	// contents of the depth stencil buffer will be invalid after calling
	// either Present, or SetDepthStencilSurface with a different depth surface.
	// Discarding z-buffer data can increase performance and is driver
	// dependent. The debug runtime will enforce discarding by clearing the
	// z-buffer to some constant value after calling either Present, or
	// SetDepthStencilSurface with a different depth surface.
	// Discarding z-buffer data is illegal for all lockable formats,
	// FMT_D16_LOCKABLE and FMT_D32F_LOCKABLE. Any use of CreateDevice
	// specifying a lockable format and z-buffer discarding will fail.
	PRESENTFLAG_DISCARD_DEPTHSTENCIL = C.D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
	// PRESENTFLAG_LOCKABLE_BACKBUFFER set this flag if the application
	// requires the ability to lock the back buffer directly. Note that back
	// buffers are not lockable unless the application specifies
	// PRESENTFLAG_LOCKABLE_BACKBUFFER when calling CreateDevice or Reset.
	// Lockable back buffers incur a performance cost on some graphics hardware
	// configurations.
	// Performing a lock operation (or using UpdateSurface to write) on the
	// lockable back buffer decreases performance on many cards. In this case,
	// consider using textured triangles to move data to the back buffer.
	PRESENTFLAG_LOCKABLE_BACKBUFFER = C.D3DPRESENTFLAG_LOCKABLE_BACKBUFFER
	// PRESENTFLAG_VIDEO is a hint to the driver that the back buffers will
	// contain video data.
	PRESENTFLAG_VIDEO = C.D3DPRESENTFLAG_VIDEO
	// PSHADECAPS_ALPHAGOURAUDBLEND means the device can support an alpha
	// component for Gouraud-blended transparency (the SHADE_GOURAUD state for
	// the SHADEMODE enumerated type). In this mode, the alpha color component
	// of a primitive is provided at vertices and interpolated across a face
	// along with the other color components.
	PSHADECAPS_ALPHAGOURAUDBLEND = C.D3DPSHADECAPS_ALPHAGOURAUDBLEND
	// PSHADECAPS_COLORGOURAUDRGB means the device can support colored Gouraud
	// shading. In this mode, the per-vertex color components (red, green, and
	// blue) are interpolated across a triangle face.
	PSHADECAPS_COLORGOURAUDRGB = C.D3DPSHADECAPS_COLORGOURAUDRGB
	// PSHADECAPS_FOGGOURAUD means the device can support fog in the Gouraud
	// shading mode.
	PSHADECAPS_FOGGOURAUD = C.D3DPSHADECAPS_FOGGOURAUD
	// PSHADECAPS_SPECULARGOURAUDRGB means the device supports Gouraud shading
	// of specular highlights.
	PSHADECAPS_SPECULARGOURAUDRGB = C.D3DPSHADECAPS_SPECULARGOURAUDRGB
	// PS20_MAX_DYNAMICFLOWCONTROLDEPTH is the maximum level of nesting of
	// dynamic flow control instructions (break, breakc, ifc).
	PS20_MAX_DYNAMICFLOWCONTROLDEPTH = C.D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH
	// PS20_MIN_DYNAMICFLOWCONTROLDEPTH is the minimum level of nesting of
	// dynamic flow control instructions (break, breakc, ifc).
	PS20_MIN_DYNAMICFLOWCONTROLDEPTH = C.D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH
	// PS20_MAX_NUMTEMPS is the maximum number of supported temporary registers.
	PS20_MAX_NUMTEMPS = C.D3DPS20_MAX_NUMTEMPS
	// PS20_MIN_NUMTEMPS is the minimum number of supported temporary registers.
	PS20_MIN_NUMTEMPS = C.D3DPS20_MIN_NUMTEMPS
	// PS20_MAX_STATICFLOWCONTROLDEPTH is the maximum depth of nesting of the
	// loop - vs/rep - vs and call - vs/callnz bool - vs instructions.
	PS20_MAX_STATICFLOWCONTROLDEPTH = C.D3DPS20_MAX_STATICFLOWCONTROLDEPTH
	// PS20_MIN_STATICFLOWCONTROLDEPTH is the minimum depth of nesting of the
	// loop - vs/rep - vs and call - vs/callnz bool - vs instructions.
	PS20_MIN_STATICFLOWCONTROLDEPTH = C.D3DPS20_MIN_STATICFLOWCONTROLDEPTH
	// PS20_MAX_NUMINSTRUCTIONSLOTS is the maximum number of supported
	// instructions.
	PS20_MAX_NUMINSTRUCTIONSLOTS = C.D3DPS20_MAX_NUMINSTRUCTIONSLOTS
	// PS20_MIN_NUMINSTRUCTIONSLOTS is the minimum number of supported
	// instructions.
	PS20_MIN_NUMINSTRUCTIONSLOTS = C.D3DPS20_MIN_NUMINSTRUCTIONSLOTS
	// PTADDRESSCAPS_BORDER means the device supports setting coordinates
	// outside the range [0.0, 1.0] to the border color, as specified by the
	// SAMP_BORDERCOLOR texture-stage state.
	PTADDRESSCAPS_BORDER = C.D3DPTADDRESSCAPS_BORDER
	// PTADDRESSCAPS_CLAMP means the device can clamp textures to addresses.
	PTADDRESSCAPS_CLAMP = C.D3DPTADDRESSCAPS_CLAMP
	// PTADDRESSCAPS_INDEPENDENTUV means the device can separate the
	// texture-addressing modes of the u and v coordinates of the texture. This
	// ability corresponds to the SAMP_ADDRESSU and SAMP_ADDRESSV render-state
	// values.
	PTADDRESSCAPS_INDEPENDENTUV = C.D3DPTADDRESSCAPS_INDEPENDENTUV
	// PTADDRESSCAPS_MIRROR means the device can mirror textures to addresses.
	PTADDRESSCAPS_MIRROR = C.D3DPTADDRESSCAPS_MIRROR
	// PTADDRESSCAPS_MIRRORONCE means the device can take the absolute value of
	// the texture coordinate (thus, mirroring around 0) and then clamp to the
	// maximum value.
	PTADDRESSCAPS_MIRRORONCE = C.D3DPTADDRESSCAPS_MIRRORONCE
	// PTADDRESSCAPS_WRAP means the device can wrap textures to addresses.
	PTADDRESSCAPS_WRAP = C.D3DPTADDRESSCAPS_WRAP
	// PTEXTURECAPS_ALPHA means alpha in texture pixels is supported.
	PTEXTURECAPS_ALPHA = C.D3DPTEXTURECAPS_ALPHA
	// PTEXTURECAPS_ALPHAPALETTE means the device can draw alpha from texture
	// palettes.
	PTEXTURECAPS_ALPHAPALETTE = C.D3DPTEXTURECAPS_ALPHAPALETTE
	// PTEXTURECAPS_CUBEMAP means the device upports cube textures.
	PTEXTURECAPS_CUBEMAP = C.D3DPTEXTURECAPS_CUBEMAP
	// PTEXTURECAPS_CUBEMAP_POW2 means the device requires that cube texture
	// maps have dimensions specified as powers of two.
	PTEXTURECAPS_CUBEMAP_POW2 = C.D3DPTEXTURECAPS_CUBEMAP_POW2
	// PTEXTURECAPS_MIPCUBEMAP means the device supports mipmapped cube
	// textures.
	PTEXTURECAPS_MIPCUBEMAP = C.D3DPTEXTURECAPS_MIPCUBEMAP
	// PTEXTURECAPS_MIPMAP means the device supports mipmapped textures.
	PTEXTURECAPS_MIPMAP = C.D3DPTEXTURECAPS_MIPMAP
	// PTEXTURECAPS_MIPVOLUMEMAP means the device supports mipmapped volume
	// textures.
	PTEXTURECAPS_MIPVOLUMEMAP = C.D3DPTEXTURECAPS_MIPVOLUMEMAP
	// PTEXTURECAPS_NONPOW2CONDITIONAL means PTEXTURECAPS_POW2 is also set,
	// conditionally supports the use of 2D textures with dimensions that are
	// not powers of two. A device that exposes this capability can use such a
	// texture if all of the following requirements are met.
	// - The texture addressing mode for the texture stage is set to
	// TADDRESS_CLAMP.
	// - Texture wrapping for the texture stage is disabled (RS_WRAP n set to
	// 0).
	// - Mipmapping is not in use (use magnification filter only).
	// - Texture formats must not be FMT_DXT1 through FMT_DXT5.
	// If this flag is not set, and PTEXTURECAPS_POW2 is also not set, then
	// unconditional support is provided for 2D textures with dimensions that
	// are not powers of two.
	// A texture that is not a power of two cannot be set at a stage that will
	// be read based on a shader computation (such as the bem - ps and texm3x3
	// - ps instructions in pixel shaders versions 1_0 to 1_3). For example,
	// these textures can be used to store bumps that will be fed into texture
	// reads, but not the environment maps that are used in texbem - ps,
	// texbeml - ps, and texm3x3spec - ps. This means that a texture with
	// dimensions that are not powers of two cannot be addressed or sampled
	// using texture coordinates computed within the shader. This type of
	// operation is known as a dependent read and cannot be performed on these
	// types of textures.
	PTEXTURECAPS_NONPOW2CONDITIONAL = C.D3DPTEXTURECAPS_NONPOW2CONDITIONAL
	// PTEXTURECAPS_NOPROJECTEDBUMPENV means the device does not support a
	// projected bump-environment loopkup operation in programmable and fixed
	// function shaders.
	PTEXTURECAPS_NOPROJECTEDBUMPENV = C.D3DPTEXTURECAPS_NOPROJECTEDBUMPENV
	// PTEXTURECAPS_PERSPECTIVE means perspective correction texturing is
	// supported.
	PTEXTURECAPS_PERSPECTIVE = C.D3DPTEXTURECAPS_PERSPECTIVE
	// PTEXTURECAPS_POW2 means that if PTEXTURECAPS_NONPOW2CONDITIONAL is not
	// set, all textures must have widths and heights specified as powers of
	// two. This requirement does not apply to either cube textures or volume
	// textures.
	// If PTEXTURECAPS_NONPOW2CONDITIONAL is also set, conditionally supports
	// the use of 2D textures with dimensions that are not powers of two. See
	// PTEXTURECAPS_NONPOW2CONDITIONAL description.
	// If this flag is not set, and PTEXTURECAPS_NONPOW2CONDITIONAL is also not
	// set, then unconditional support is provided for 2D textures with
	// dimensions that are not powers of two.
	PTEXTURECAPS_POW2 = C.D3DPTEXTURECAPS_POW2
	// PTEXTURECAPS_PROJECTED means the device supports the TTFF_PROJECTED
	// texture transformation flag. When applied, the device divides
	// transformed texture coordinates by the last texture coordinate. If this
	// capability is present, then the projective divide occurs per pixel. If
	// this capability is not present, but the projective divide needs to occur
	// anyway, then it is performed on a per-vertex basis by the Direct3D
	// runtime.
	PTEXTURECAPS_PROJECTED = C.D3DPTEXTURECAPS_PROJECTED
	// PTEXTURECAPS_SQUAREONLY means all textures must be square.
	PTEXTURECAPS_SQUAREONLY = C.D3DPTEXTURECAPS_SQUAREONLY
	// PTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE means texture indices are not
	// scaled by the texture size prior to interpolation.
	PTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE = C.D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE
	// PTEXTURECAPS_VOLUMEMAP means the device supports volume textures.
	PTEXTURECAPS_VOLUMEMAP = C.D3DPTEXTURECAPS_VOLUMEMAP
	// PTEXTURECAPS_VOLUMEMAP_POW2 means the device requires that volume
	// texture maps have dimensions specified as powers of two.
	PTEXTURECAPS_VOLUMEMAP_POW2 = C.D3DPTEXTURECAPS_VOLUMEMAP_POW2
	// PTFILTERCAPS_MAGFPOINT means the device supports per-stage point-sample
	// filtering for magnifying textures. The point-sample magnification filter
	// is represented by the TEXF_POINT member of the TEXTUREFILTERTYPE
	// enumerated type.
	PTFILTERCAPS_MAGFPOINT = C.D3DPTFILTERCAPS_MAGFPOINT
	// PTFILTERCAPS_MAGFLINEAR means the device supports per-stage bilinear
	// interpolation filtering for magnifying mipmaps. The bilinear
	// interpolation mipmapping filter is represented by the TEXF_LINEAR member
	// of the TEXTUREFILTERTYPE enumerated type.
	PTFILTERCAPS_MAGFLINEAR = C.D3DPTFILTERCAPS_MAGFLINEAR
	// PTFILTERCAPS_MAGFANISOTROPIC means the device supports per-stage
	// anisotropic filtering for magnifying textures. The anisotropic
	// magnification filter is represented by the TEXF_ANISOTROPIC member of
	// the TEXTUREFILTERTYPE enumerated type.
	PTFILTERCAPS_MAGFANISOTROPIC = C.D3DPTFILTERCAPS_MAGFANISOTROPIC
	// PTFILTERCAPS_MAGFPYRAMIDALQUAD means the device supports per-stage
	// pyramidal sample filtering for magnifying textures. The pyramidal
	// magnifying filter is represented by the TEXF_PYRAMIDALQUAD member of the
	// TEXTUREFILTERTYPE enumerated type.
	PTFILTERCAPS_MAGFPYRAMIDALQUAD = C.D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD
	// PTFILTERCAPS_MAGFGAUSSIANQUAD means the device supports per-stage
	// Gaussian quad filtering for magnifying textures.
	PTFILTERCAPS_MAGFGAUSSIANQUAD = C.D3DPTFILTERCAPS_MAGFGAUSSIANQUAD
	// PTFILTERCAPS_MINFPOINT means the device supports per-stage point-sample
	// filtering for minifying textures. The point-sample minification filter
	// is represented by the TEXF_POINT member of the TEXTUREFILTERTYPE
	// enumerated type.
	PTFILTERCAPS_MINFPOINT = C.D3DPTFILTERCAPS_MINFPOINT
	// PTFILTERCAPS_MINFLINEAR means the device supports per-stage linear
	// filtering for minifying textures. The linear minification filter is
	// represented by the TEXF_LINEAR member of the TEXTUREFILTERTYPE
	// enumerated type.
	PTFILTERCAPS_MINFLINEAR = C.D3DPTFILTERCAPS_MINFLINEAR
	// PTFILTERCAPS_MINFANISOTROPIC means the device supports per-stage
	// anisotropic filtering for minifying textures. The anisotropic
	// minification filter is represented by the TEXF_ANISOTROPIC member of the
	// TEXTUREFILTERTYPE enumerated type.
	PTFILTERCAPS_MINFANISOTROPIC = C.D3DPTFILTERCAPS_MINFANISOTROPIC
	// PTFILTERCAPS_MINFPYRAMIDALQUAD means the device supports per-stage
	// pyramidal sample filtering for minifying textures.
	PTFILTERCAPS_MINFPYRAMIDALQUAD = C.D3DPTFILTERCAPS_MINFPYRAMIDALQUAD
	// PTFILTERCAPS_MINFGAUSSIANQUAD means the device supports per-stage
	// Gaussian quad filtering for minifying textures.
	PTFILTERCAPS_MINFGAUSSIANQUAD = C.D3DPTFILTERCAPS_MINFGAUSSIANQUAD
	// PTFILTERCAPS_MIPFPOINT means the device supports per-stage point-sample
	// filtering for mipmaps. The point-sample mipmapping filter is represented
	// by the TEXF_POINT member of the TEXTUREFILTERTYPE enumerated type.
	PTFILTERCAPS_MIPFPOINT = C.D3DPTFILTERCAPS_MIPFPOINT
	// PTFILTERCAPS_MIPFLINEAR means the device supports per-stage bilinear
	// interpolation filtering for mipmaps. The bilinear interpolation
	// mipmapping filter is represented by the TEXF_LINEAR member of the
	// TEXTUREFILTERTYPE enumerated type.
	PTFILTERCAPS_MIPFLINEAR = C.D3DPTFILTERCAPS_MIPFLINEAR
	// SPD_IUNKNOWN is used in Resource.SetPrivateData. The data at is a
	// pointer to an IUnknown interface. The size parameter must be set to the
	// size of a pointer to IUnknown. Direct3D automatically calls IUnknown
	// through the data pointer when the private data is destroyed. Private
	// data will be destroyed by a subsequent call to Resource.SetPrivateData
	// with the same GUID, a subsequent call to Resource.FreePrivateData, or
	// when the Direct3D object is released.
	SPD_IUNKNOWN = C.D3DSPD_IUNKNOWN
	// STENCILCAPS_KEEP does not update the entry in the stencil buffer. This
	// is the default value.
	STENCILCAPS_KEEP = C.D3DSTENCILCAPS_KEEP
	// STENCILCAPS_ZERO sets the stencil-buffer entry to 0.
	STENCILCAPS_ZERO = C.D3DSTENCILCAPS_ZERO
	// STENCILCAPS_REPLACE replaces the stencil-buffer entry with reference
	// value.
	STENCILCAPS_REPLACE = C.D3DSTENCILCAPS_REPLACE
	// STENCILCAPS_INCRSAT increments the stencil-buffer entry, clamping to the
	// maximum value.
	STENCILCAPS_INCRSAT = C.D3DSTENCILCAPS_INCRSAT
	// STENCILCAPS_DECRSAT decrements the stencil-buffer entry, clamping to
	// zero.
	STENCILCAPS_DECRSAT = C.D3DSTENCILCAPS_DECRSAT
	// STENCILCAPS_INVERT inverts the bits in the stencil-buffer entry.
	STENCILCAPS_INVERT = C.D3DSTENCILCAPS_INVERT
	// STENCILCAPS_INCR increments the stencil-buffer entry, wrapping to zero
	// if the new value exceeds the maximum value.
	STENCILCAPS_INCR = C.D3DSTENCILCAPS_INCR
	// STENCILCAPS_DECR decrements the stencil-buffer entry, wrapping to the
	// maximum value if the new value is less than zero.
	STENCILCAPS_DECR = C.D3DSTENCILCAPS_DECR
	// STENCILCAPS_TWOSIDED means the device supports two-sided stencil.
	STENCILCAPS_TWOSIDED = C.D3DSTENCILCAPS_TWOSIDED
	// TA_CONSTANT selects a constant from a texture stage. The default value
	// is 0xFFFFFFFF.
	TA_CONSTANT = C.D3DTA_CONSTANT
	// TA_CURRENT means the texture argument is the result of the previous
	// blending stage. In the first texture stage (stage 0), this argument is
	// equivalent to TA_DIFFUSE. If the previous blending stage uses a bump-map
	// texture (the TOP_BUMPENVMAP operation), the system chooses the texture
	// from the stage before the bump-map texture. If s represents the current
	// texture stage and s - 1 contains a bump-map texture, this argument
	// becomes the result output by texture stage s - 2. Permissions are
	// read/write.
	TA_CURRENT = C.D3DTA_CURRENT
	// TA_DIFFUSE means the texture argument is the diffuse color interpolated
	// from vertex components during Gouraud shading. If the vertex does not
	// contain a diffuse color, the default color is 0xFFFFFFFF. Permissions
	// are read-only.
	TA_DIFFUSE = C.D3DTA_DIFFUSE
	// TA_SELECTMASK is a mask value for all arguments; not used when setting
	// texture arguments.
	TA_SELECTMASK = C.D3DTA_SELECTMASK
	// TA_SPECULAR means the texture argument is the specular color
	// interpolated from vertex components during Gouraud shading. If the
	// vertex does not contain a specular color, the default color is
	// 0xFFFFFFFF. Permissions are read-only.
	TA_SPECULAR = C.D3DTA_SPECULAR
	// TA_TEMP means the texture argument is a temporary register color for
	// read or write. TA_TEMP is supported if the PMISCCAPS_TSSARGTEMP device
	// capability is present. The default value for the register is (0.0, 0.0,
	// 0.0, 0.0). Permissions are read/write.
	TA_TEMP = C.D3DTA_TEMP
	// TA_TEXTURE means the texture argument is the texture color for this
	// texture stage. Permissions are read-only.
	TA_TEXTURE = C.D3DTA_TEXTURE
	// TA_TFACTOR means the texture argument is the texture factor set in a
	// previous call to the SetRenderState with the RS_TEXTUREFACTOR
	// render-state value. Permissions are read-only.
	TA_TFACTOR = C.D3DTA_TFACTOR
	// TA_ALPHAREPLICATE replicates the alpha information to all color channels
	// before the operation completes. This is a read modifier.
	TA_ALPHAREPLICATE = C.D3DTA_ALPHAREPLICATE
	// TA_COMPLEMENT takes the complement of the argument x, (1.0 - x). This is
	// a read modifier.
	TA_COMPLEMENT = C.D3DTA_COMPLEMENT
	// TEXOPCAPS_ADD means the TOP_ADD texture-blending operation is supported.
	TEXOPCAPS_ADD = C.D3DTEXOPCAPS_ADD
	// TEXOPCAPS_ADDSIGNED means the TOP_ADDSIGNED texture-blending operation
	// is supported.
	TEXOPCAPS_ADDSIGNED = C.D3DTEXOPCAPS_ADDSIGNED
	// TEXOPCAPS_ADDSIGNED2X means the TOP_ADDSIGNED2X texture-blending
	// operation is supported.
	TEXOPCAPS_ADDSIGNED2X = C.D3DTEXOPCAPS_ADDSIGNED2X
	// TEXOPCAPS_ADDSMOOTH means the TOP_ADDSMOOTH texture-blending operation
	// is supported.
	TEXOPCAPS_ADDSMOOTH = C.D3DTEXOPCAPS_ADDSMOOTH
	// TEXOPCAPS_BLENDCURRENTALPHA means the TOP_BLENDCURRENTALPHA
	// texture-blending operation is supported.
	TEXOPCAPS_BLENDCURRENTALPHA = C.D3DTEXOPCAPS_BLENDCURRENTALPHA
	// TEXOPCAPS_BLENDDIFFUSEALPHA means the TOP_BLENDDIFFUSEALPHA
	// texture-blending operation is supported.
	TEXOPCAPS_BLENDDIFFUSEALPHA = C.D3DTEXOPCAPS_BLENDDIFFUSEALPHA
	// TEXOPCAPS_BLENDFACTORALPHA means the TOP_BLENDFACTORALPHA
	// texture-blending operation is supported.
	TEXOPCAPS_BLENDFACTORALPHA = C.D3DTEXOPCAPS_BLENDFACTORALPHA
	// TEXOPCAPS_BLENDTEXTUREALPHA means the TOP_BLENDTEXTUREALPHA
	// texture-blending operation is supported.
	TEXOPCAPS_BLENDTEXTUREALPHA = C.D3DTEXOPCAPS_BLENDTEXTUREALPHA
	// TEXOPCAPS_BLENDTEXTUREALPHAPM means the TOP_BLENDTEXTUREALPHAPM
	// texture-blending operation is supported.
	TEXOPCAPS_BLENDTEXTUREALPHAPM = C.D3DTEXOPCAPS_BLENDTEXTUREALPHAPM
	// TEXOPCAPS_BUMPENVMAP means the TOP_BUMPENVMAP texture-blending operation
	// is supported.
	TEXOPCAPS_BUMPENVMAP = C.D3DTEXOPCAPS_BUMPENVMAP
	// TEXOPCAPS_BUMPENVMAPLUMINANCE means the TOP_BUMPENVMAPLUMINANCE
	// texture-blending operation is supported.
	TEXOPCAPS_BUMPENVMAPLUMINANCE = C.D3DTEXOPCAPS_BUMPENVMAPLUMINANCE
	// TEXOPCAPS_DISABLE means the TOP_DISABLE texture-blending operation is
	// supported.
	TEXOPCAPS_DISABLE = C.D3DTEXOPCAPS_DISABLE
	// TEXOPCAPS_DOTPRODUCT3 means the TOP_DOTPRODUCT3 texture-blending
	// operation is supported.
	TEXOPCAPS_DOTPRODUCT3 = C.D3DTEXOPCAPS_DOTPRODUCT3
	// TEXOPCAPS_LERP means the TOP_LERP texture-blending operation is
	// supported.
	TEXOPCAPS_LERP = C.D3DTEXOPCAPS_LERP
	// TEXOPCAPS_MODULATE means the TOP_MODULATE texture-blending operation is
	// supported.
	TEXOPCAPS_MODULATE = C.D3DTEXOPCAPS_MODULATE
	// TEXOPCAPS_MODULATE2X means the TOP_MODULATE2X texture-blending operation
	// is supported.
	TEXOPCAPS_MODULATE2X = C.D3DTEXOPCAPS_MODULATE2X
	// TEXOPCAPS_MODULATE4X means the TOP_MODULATE4X texture-blending operation
	// is supported.
	TEXOPCAPS_MODULATE4X = C.D3DTEXOPCAPS_MODULATE4X
	// TEXOPCAPS_MODULATEALPHA_ADDCOLOR means the TOP_MODULATEALPHA_ADDCOLOR
	// texture-blending operation is supported.
	TEXOPCAPS_MODULATEALPHA_ADDCOLOR = C.D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR
	// TEXOPCAPS_MODULATECOLOR_ADDALPHA means the TOP_MODULATECOLOR_ADDALPHA
	// texture-blending operation is supported.
	TEXOPCAPS_MODULATECOLOR_ADDALPHA = C.D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA
	// TEXOPCAPS_MODULATEINVALPHA_ADDCOLOR means the
	// TOP_MODULATEINVALPHA_ADDCOLOR texture-blending operation is supported.
	TEXOPCAPS_MODULATEINVALPHA_ADDCOLOR = C.D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR
	// TEXOPCAPS_MODULATEINVCOLOR_ADDALPHA means the
	// TOP_MODULATEINVCOLOR_ADDALPHA texture-blending operation is supported.
	TEXOPCAPS_MODULATEINVCOLOR_ADDALPHA = C.D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA
	// TEXOPCAPS_MULTIPLYADD means the TOP_MULTIPLYADD texture-blending
	// operation is supported.
	TEXOPCAPS_MULTIPLYADD = C.D3DTEXOPCAPS_MULTIPLYADD
	// TEXOPCAPS_PREMODULATE means the TOP_PREMODULATE texture-blending
	// operation is supported.
	TEXOPCAPS_PREMODULATE = C.D3DTEXOPCAPS_PREMODULATE
	// TEXOPCAPS_SELECTARG1 means the TOP_SELECTARG1 texture-blending operation
	// is supported.
	TEXOPCAPS_SELECTARG1 = C.D3DTEXOPCAPS_SELECTARG1
	// TEXOPCAPS_SELECTARG2 means the TOP_SELECTARG2 texture-blending operation
	// is supported.
	TEXOPCAPS_SELECTARG2 = C.D3DTEXOPCAPS_SELECTARG2
	// TEXOPCAPS_SUBTRACT means the TOP_SUBTRACT texture-blending operation is
	// supported.
	TEXOPCAPS_SUBTRACT = C.D3DTEXOPCAPS_SUBTRACT
	// TSS_TCI_PASSTHRU uses the specified texture coordinates contained within
	// the vertex format. This value resolves to zero.
	TSS_TCI_PASSTHRU = C.D3DTSS_TCI_PASSTHRU
	// TSS_TCI_CAMERASPACENORMAL uses the vertex normal, transformed to camera
	// space, as the input texture coordinates for this stage's texture
	// transformation.
	TSS_TCI_CAMERASPACENORMAL = C.D3DTSS_TCI_CAMERASPACENORMAL
	// TSS_TCI_CAMERASPACEPOSITION uses the vertex position, transformed to
	// camera space, as the input texture coordinates for this stage's texture
	// transformation.
	TSS_TCI_CAMERASPACEPOSITION = C.D3DTSS_TCI_CAMERASPACEPOSITION
	// TSS_TCI_CAMERASPACEREFLECTIONVECTOR uses the reflection vector,
	// transformed to camera space, as the input texture coordinate for this
	// stage's texture transformation. The reflection vector is computed from
	// the input vertex position and normal vector.
	TSS_TCI_CAMERASPACEREFLECTIONVECTOR = C.D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR
	// TSS_TCI_SPHEREMAP uses the specified texture coordinates for sphere
	// mapping.
	TSS_TCI_SPHEREMAP = C.D3DTSS_TCI_SPHEREMAP
	// USAGE_AUTOGENMIPMAP means the resource will automatically generate
	// mipmaps. See Automatic Generation of Mipmaps (Direct3D 9). Automatic
	// generation of mipmaps is not supported for volume textures and depth
	// stencil surfaces/textures. This usage is not valid for a resource in
	// system memory (POOL_SYSTEMMEM).
	USAGE_AUTOGENMIPMAP = C.D3DUSAGE_AUTOGENMIPMAP
	// USAGE_DEPTHSTENCIL means the resource will be a depth stencil buffer.
	// USAGE_DEPTHSTENCIL can only be used with POOL_DEFAULT.
	USAGE_DEPTHSTENCIL = C.D3DUSAGE_DEPTHSTENCIL
	// USAGE_DMAP means the resource will be a displacement map.
	USAGE_DMAP = C.D3DUSAGE_DMAP
	// USAGE_DONOTCLIP indicates that the vertex buffer content will never
	// require clipping. When rendering with buffers that have this flag set,
	// the RS_CLIPPING render state must be set to false.
	USAGE_DONOTCLIP = C.D3DUSAGE_DONOTCLIP
	// USAGE_DYNAMIC indicates that the vertex buffer requires dynamic memory
	// use. This is useful for drivers because it enables them to decide where
	// to place the buffer. In general, static vertex buffers are placed in
	// video memory and dynamic vertex buffers are placed in AGP memory. Note
	// that there is no separate static use. If you do not specify
	// USAGE_DYNAMIC, the vertex buffer is made static. USAGE_DYNAMIC is
	// strictly enforced through the LOCK_DISCARD and LOCK_NOOVERWRITE locking
	// flags. As a result, LOCK_DISCARD and LOCK_NOOVERWRITE are valid only on
	// vertex buffers created with USAGE_DYNAMIC. They are not valid flags on
	// static vertex buffers.
	// USAGE_DYNAMIC and POOL_MANAGED are incompatible and should not be used
	// together.
	// Textures can specify USAGE_DYNAMIC. However, managed textures cannot use
	// USAGE_DYNAMIC.
	USAGE_DYNAMIC = C.D3DUSAGE_DYNAMIC
	// USAGE_NPATCHES indicates that the vertex buffer is to be used for
	// drawing N-patches.
	USAGE_NPATCHES = C.D3DUSAGE_NPATCHES
	// USAGE_POINTS indicates that the vertex or index buffer will be used for
	// drawing point sprites. The buffer will be loaded in system memory if
	// software vertex processing is needed to emulate point sprites.
	USAGE_POINTS = C.D3DUSAGE_POINTS
	// USAGE_RENDERTARGET means the resource will be a render target.
	// USAGE_RENDERTARGET can only be used with POOL_DEFAULT.
	USAGE_RENDERTARGET = C.D3DUSAGE_RENDERTARGET
	// USAGE_RTPATCHES indicates that the vertex buffer is to be used for
	// drawing high-order primitives.
	USAGE_RTPATCHES = C.D3DUSAGE_RTPATCHES
	// USAGE_SOFTWAREPROCESSING if this flag is used, vertex processing is done
	// in software. If this flag is not used, vertex processing is done in
	// hardware.
	// The USAGE_SOFTWAREPROCESSING flag can be set when mixed-mode or software
	// vertex processing (CREATE_MIXED_VERTEXPROCESSING /
	// CREATE_SOFTWARE_VERTEXPROCESSING) is enabled for that device.
	// USAGE_SOFTWAREPROCESSING must be set for buffers to be used with
	// software vertex processing in mixed mode, but it should not be set for
	// the best possible performance when using hardware index processing in
	// mixed mode (CREATE_HARDWARE_VERTEXPROCESSING). However, setting
	// USAGE_SOFTWAREPROCESSING is the only option when a single buffer is used
	// with both hardware and software vertex processing.
	// USAGE_SOFTWAREPROCESSING is allowed for mixed and software devices.
	// USAGE_SOFTWAREPROCESSING is used with CheckDeviceFormat to find out if a
	// particular texture format can be used as a vertex texture during
	// software vertex processing. If it can, the texture must be created in
	// POOL_SCRATCH.
	USAGE_SOFTWAREPROCESSING = C.D3DUSAGE_SOFTWAREPROCESSING
	// USAGE_WRITEONLY informs the system that the application writes only to
	// the vertex buffer. Using this flag enables the driver to choose the best
	// memory location for efficient write operations and rendering. Attempts
	// to read from a vertex buffer that is created with this capability will
	// fail. Buffers created with POOL_DEFAULT that do not specify
	// USAGE_WRITEONLY may suffer a severe performance penalty. USAGE_WRITEONLY
	// only affects the performance of POOL_DEFAULT buffers.
	USAGE_WRITEONLY = C.D3DUSAGE_WRITEONLY
	// USAGE_QUERY_FILTER queries the resource format to see if it supports
	// texture filter types other than TEXF_POINT (which is always supported).
	USAGE_QUERY_FILTER = C.D3DUSAGE_QUERY_FILTER
	// USAGE_QUERY_LEGACYBUMPMAP queries the resource about a legacy bump map.
	USAGE_QUERY_LEGACYBUMPMAP = C.D3DUSAGE_QUERY_LEGACYBUMPMAP
	// USAGE_QUERY_POSTPIXELSHADER_BLENDING queries the resource to verify
	// support for post pixel shader blending support. If CheckDeviceFormat
	// fails with USAGE_QUERY_POSTPIXELSHADER_BLENDING, post pixel blending
	// operations are not supported. These include alpha test, pixel fog,
	// render-target blending, color write enable, and dithering.
	USAGE_QUERY_POSTPIXELSHADER_BLENDING = C.D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
	// USAGE_QUERY_SRGBREAD queries the resource to verify if a texture
	// supports gamma correction during a read operation.
	USAGE_QUERY_SRGBREAD = C.D3DUSAGE_QUERY_SRGBREAD
	// USAGE_QUERY_SRGBWRITE queries the resource to verify if a texture
	// supports gamma correction during a write operation.
	USAGE_QUERY_SRGBWRITE = C.D3DUSAGE_QUERY_SRGBWRITE
	// USAGE_QUERY_VERTEXTEXTURE queries the resource to verify support for
	// vertex shader texture sampling.
	USAGE_QUERY_VERTEXTEXTURE = C.D3DUSAGE_QUERY_VERTEXTEXTURE
	// USAGE_QUERY_WRAPANDMIP queries the resource to verify support for
	// texture wrapping and mip-mapping.
	USAGE_QUERY_WRAPANDMIP = C.D3DUSAGE_QUERY_WRAPANDMIP
	// VERTEXTEXTURESAMPLER0 identifies the texture sampler used by vertex
	// shaders.
	VERTEXTEXTURESAMPLER0 = C.D3DVERTEXTEXTURESAMPLER0
	// VERTEXTEXTURESAMPLER1 identifies the texture sampler used by vertex
	// shaders.
	VERTEXTEXTURESAMPLER1 = C.D3DVERTEXTEXTURESAMPLER1
	// VERTEXTEXTURESAMPLER2 identifies the texture sampler used by vertex
	// shaders.
	VERTEXTEXTURESAMPLER2 = C.D3DVERTEXTEXTURESAMPLER2
	// VERTEXTEXTURESAMPLER3 identifies the texture sampler used by vertex
	// shaders.
	VERTEXTEXTURESAMPLER3 = C.D3DVERTEXTEXTURESAMPLER3
	// VS20CAPS_PREDICATION indicates that instruction predication is
	// supported. See setp_comp - vs.
	VS20CAPS_PREDICATION = C.D3DVS20CAPS_PREDICATION
	// VS20_MAX_DYNAMICFLOWCONTROLDEPTH is the maximum level of nesting of
	// dynamic flow control instructions (break - vs, break_comp - vs, breakp -
	// vs, if_comp - vs, if_comp - vs, if pred - vs).
	VS20_MAX_DYNAMICFLOWCONTROLDEPTH = C.D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH
	// VS20_MIN_DYNAMICFLOWCONTROLDEPTH is the minimum level of nesting of
	// dynamic flow control instructions (break - vs, break_comp - vs, breakp -
	// vs, if_comp - vs, if_comp - vs, if pred - vs).
	VS20_MIN_DYNAMICFLOWCONTROLDEPTH = C.D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH
	// VS20_MAX_NUMTEMPS is the maximum number of temporary registers supported.
	VS20_MAX_NUMTEMPS = C.D3DVS20_MAX_NUMTEMPS
	// VS20_MIN_NUMTEMPS is the minimum number of temporary registers supported.
	VS20_MIN_NUMTEMPS = C.D3DVS20_MIN_NUMTEMPS
	// VS20_MAX_STATICFLOWCONTROLDEPTH is the maximum depth of nesting of the
	// loop - vs/rep - vs and call - vs/callnz bool - vs instructions.
	VS20_MAX_STATICFLOWCONTROLDEPTH = C.D3DVS20_MAX_STATICFLOWCONTROLDEPTH
	// VS20_MIN_STATICFLOWCONTROLDEPTH is the minimum depth of nesting of the
	// loop - vs/rep - vs and call - vs/callnz bool - vs instructions.
	VS20_MIN_STATICFLOWCONTROLDEPTH = C.D3DVS20_MIN_STATICFLOWCONTROLDEPTH
	// VTXPCAPS_DIRECTIONALLIGHTS means the device can do directional lights.
	VTXPCAPS_DIRECTIONALLIGHTS = C.D3DVTXPCAPS_DIRECTIONALLIGHTS
	// VTXPCAPS_LOCALVIEWER means the device can do local viewer.
	VTXPCAPS_LOCALVIEWER = C.D3DVTXPCAPS_LOCALVIEWER
	// VTXPCAPS_MATERIALSOURCE7 means the device supports the color material
	// states: RS_AMBIENTMATERIALSOURCE, RS_DIFFUSEMATERIALSOURCE,
	// RS_EMISSIVEMATERIALSOURCE, and RS_SPECULARMATERIALSOURCE.
	VTXPCAPS_MATERIALSOURCE7 = C.D3DVTXPCAPS_MATERIALSOURCE7
	// VTXPCAPS_NO_TEXGEN_NONLOCALVIEWER means the device does not support
	// texture generation in non-local viewer mode.
	VTXPCAPS_NO_TEXGEN_NONLOCALVIEWER = C.D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER
	// VTXPCAPS_POSITIONALLIGHTS means the device can do positional lights
	// (includes point and spot).
	VTXPCAPS_POSITIONALLIGHTS = C.D3DVTXPCAPS_POSITIONALLIGHTS
	// VTXPCAPS_TEXGEN means the device can do texgen.
	VTXPCAPS_TEXGEN = C.D3DVTXPCAPS_TEXGEN
	// VTXPCAPS_TEXGEN_SPHEREMAP means the device supports TSS_TCI_SPHEREMAP.
	VTXPCAPS_TEXGEN_SPHEREMAP = C.D3DVTXPCAPS_TEXGEN_SPHEREMAP
	// VTXPCAPS_TWEENING means the device can do vertex tweening.
	VTXPCAPS_TWEENING = C.D3DVTXPCAPS_TWEENING
	// S_OK indicates that no error occurred.
	S_OK = C.S_OK
	// S_PRESENT_OCCLUDED indicates that the presentation area is occluded.
	// Occlusion means that the presentation window is minimized or another
	// device entered the fullscreen mode on the same monitor as the
	// presentation window and the presentation window is completely on that
	// monitor. Occlusion will not occur if the client area is covered by
	// another Window.
	// Occluded applications can continue rendering and all calls will succeed,
	// but the occluded presentation window will not be updated. Preferably the
	// application should stop rendering to the presentation window using the
	// device and keep calling CheckDeviceState until S_OK or
	// S_PRESENT_MODE_CHANGED returns.
	// Direct3D 9Ex only.
	S_PRESENT_OCCLUDED = C.S_PRESENT_OCCLUDED
	// S_PRESENT_MODE_CHANGED indicates that the desktop display mode has been
	// changed. The application can continue rendering, but there might be
	// color conversion/stretching. Pick a back buffer format similar to the
	// current display mode, and call Reset to recreate the swap chains. The
	// device will leave this state after a Reset is called. Direct3D 9Ex only.
	S_PRESENT_MODE_CHANGED = C.S_PRESENT_MODE_CHANGED
	// _SDK_VERSION is must be used as the argument to Create.
	SDK_VERSION = C.D3D_SDK_VERSION
	// _MAX_SIMULTANEOUS_RENDERTARGETS is the maximum number of rendertargets.
	MAX_SIMULTANEOUS_RENDERTARGETS = C.D3D_MAX_SIMULTANEOUS_RENDERTARGETS
	// DMAPSAMPLER is 256, which is the maximum number of texture samplers.
	DMAPSAMPLER = C.D3DDMAPSAMPLER
	// DP_MAXTEXCOORD is the maximum number of texture coordinates.
	DP_MAXTEXCOORD = C.D3DDP_MAXTEXCOORD
	// MAXD3DDECLLENGTH is the maximum number of elements in a vertex
	// declaration (does not include "end" marker vertex element).
	MAXD3DDECLLENGTH = C.MAXD3DDECLLENGTH
	// MAXD3DDECLUSAGEINDEX is the maximum index (0-15) that can be used in a
	// vertex declaration.
	MAXD3DDECLUSAGEINDEX = C.MAXD3DDECLUSAGEINDEX
	// CLIPPLANE0 can be used to enable user-defined clipping plane 0. It is
	// defined as a convenience when setting values for the RS_CLIPPLANEENABLE
	// render state.
	CLIPPLANE0 = C.D3DCLIPPLANE0
	// CLIPPLANE1 can be used to enable user-defined clipping plane 1. It is
	// defined as a convenience when setting values for the RS_CLIPPLANEENABLE
	// render state.
	CLIPPLANE1 = C.D3DCLIPPLANE1
	// CLIPPLANE2 can be used to enable user-defined clipping plane 2. It is
	// defined as a convenience when setting values for the RS_CLIPPLANEENABLE
	// render state.
	CLIPPLANE2 = C.D3DCLIPPLANE2
	// CLIPPLANE3 can be used to enable user-defined clipping plane 3. It is
	// defined as a convenience when setting values for the RS_CLIPPLANEENABLE
	// render state.
	CLIPPLANE3 = C.D3DCLIPPLANE3
	// CLIPPLANE4 can be used to enable user-defined clipping plane 4. It is
	// defined as a convenience when setting values for the RS_CLIPPLANEENABLE
	// render state.
	CLIPPLANE4 = C.D3DCLIPPLANE4
	// CLIPPLANE5 can be used to enable user-defined clipping plane 5. It is
	// defined as a convenience when setting values for the RS_CLIPPLANEENABLE
	// render state.
	CLIPPLANE5 = C.D3DCLIPPLANE5
	// ISSUE_BEGIN is a value used by Issue to issue a query begin.
	ISSUE_BEGIN = C.D3DISSUE_BEGIN
	// ISSUE_END is a value used by Issue to issue a query end.
	ISSUE_END = C.D3DISSUE_END
	// GETDATA_FLUSH is the value passed to GetData to flush query data.
	GETDATA_FLUSH = C.D3DGETDATA_FLUSH
)
View Source
const (
	// BACKBUFFER_TYPE_MONO specifies a nonstereo swap chain.
	BACKBUFFER_TYPE_MONO = C.D3DBACKBUFFER_TYPE_MONO
	// BACKBUFFER_TYPE_LEFT specifies the left side of a stereo pair in a swap
	// chain.
	BACKBUFFER_TYPE_LEFT = C.D3DBACKBUFFER_TYPE_LEFT
	// BACKBUFFER_TYPE_RIGHT specifies the right side of a stereo pair in a
	// swap chain.
	BACKBUFFER_TYPE_RIGHT = C.D3DBACKBUFFER_TYPE_RIGHT
)
View Source
const (
	// BASIS_BEZIER means input vertices are treated as a series of Bézier
	// patches. The number of vertices specified must be divisible by 4.
	// Portions of the mesh beyond this criterion will not be rendered. Full
	// continuity is assumed between sub-patches in the interior of the surface
	// rendered by each call. Only the vertices at the corners of each
	// sub-patch are guaranteed to lie on the resulting surface.
	BASIS_BEZIER = C.D3DBASIS_BEZIER
	// BASIS_BSPLINE means input vertices are treated as control points of a
	// B-spline surface. The number of apertures rendered is two fewer than the
	// number of apertures in that direction. In general, the generated surface
	// does not contain the control vertices specified.
	BASIS_BSPLINE = C.D3DBASIS_BSPLINE
	// BASIS_CATMULL_ROM means an interpolating basis defines the surface so
	// that the surface goes through all the input vertices specified. In
	// DirectX 8, this was BASIS_INTERPOLATE.
	BASIS_CATMULL_ROM = C.D3DBASIS_CATMULL_ROM
)
View Source
const (
	// BLEND_ZERO Blend factor is (0, 0, 0, 0).
	BLEND_ZERO = C.D3DBLEND_ZERO
	// BLEND_ONE Blend factor is (1, 1, 1, 1).
	BLEND_ONE = C.D3DBLEND_ONE
	// BLEND_SRCCOLOR Blend factor is (Rs, Gs, Bs, As).
	BLEND_SRCCOLOR = C.D3DBLEND_SRCCOLOR
	// BLEND_INVSRCCOLOR Blend factor is (1 - Rs, 1 - Gs, 1 - Bs, 1 - As).
	BLEND_INVSRCCOLOR = C.D3DBLEND_INVSRCCOLOR
	// BLEND_SRCALPHA Blend factor is (As, As, As, As).
	BLEND_SRCALPHA = C.D3DBLEND_SRCALPHA
	// BLEND_INVSRCALPHA Blend factor is ( 1 - As, 1 - As, 1 - As, 1 - As).
	BLEND_INVSRCALPHA = C.D3DBLEND_INVSRCALPHA
	// BLEND_DESTALPHA Blend factor is (Ad, Ad, Ad, Ad).
	BLEND_DESTALPHA = C.D3DBLEND_DESTALPHA
	// BLEND_INVDESTALPHA Blend factor is (1 - Ad, 1 - Ad, 1 - Ad, 1 - Ad).
	BLEND_INVDESTALPHA = C.D3DBLEND_INVDESTALPHA
	// BLEND_DESTCOLOR Blend factor is (Rd, Gd, Bd, Ad).
	BLEND_DESTCOLOR = C.D3DBLEND_DESTCOLOR
	// BLEND_INVDESTCOLOR Blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad).
	BLEND_INVDESTCOLOR = C.D3DBLEND_INVDESTCOLOR
	// BLEND_SRCALPHASAT Blend factor is (f, f, f, 1); where f = min(As, 1 -
	// Ad).
	BLEND_SRCALPHASAT = C.D3DBLEND_SRCALPHASAT
	// BLEND_BOTHSRCALPHA is obsolete. Starting with DirectX 6, you can achieve
	// the same effect by setting the source and destination blend factors to
	// BLEND_SRCALPHA and BLEND_INVSRCALPHA in separate calls.
	BLEND_BOTHSRCALPHA = C.D3DBLEND_BOTHSRCALPHA
	// BLEND_BOTHINVSRCALPHA is obsolete. Source blend factor is (1 - As, 1 -
	// As, 1 - As, 1 - As), and destination blend factor is (As, As, As, As);
	// the destination blend selection is overridden. This blend mode is
	// supported only for the RS_SRCBLEND render state.
	BLEND_BOTHINVSRCALPHA = C.D3DBLEND_BOTHINVSRCALPHA
	// BLEND_BLENDFACTOR is a constant color blending factor used by the
	// frame-buffer blender. This blend mode is supported only if
	// PBLENDCAPS_BLENDFACTOR is set in the SrcBlendCaps or DestBlendCaps
	// members of CAPS.
	BLEND_BLENDFACTOR = C.D3DBLEND_BLENDFACTOR
	// BLEND_INVBLENDFACTOR is an inverted constant color-blending factor used
	// by the frame-buffer blender. This blend mode is supported only if the
	// PBLENDCAPS_BLENDFACTOR bit is set in the SrcBlendCaps or DestBlendCaps
	// members of CAPS.
	BLEND_INVBLENDFACTOR = C.D3DBLEND_INVBLENDFACTOR
)
View Source
const (
	// BLENDOP_ADD means the result is the destination added to the source.
	// Result = Source + Destination
	BLENDOP_ADD = C.D3DBLENDOP_ADD
	// BLENDOP_SUBTRACT means the result is the destination subtracted from to
	// the source. Result = Source - Destination
	BLENDOP_SUBTRACT = C.D3DBLENDOP_SUBTRACT
	// BLENDOP_REVSUBTRACT means the result is the source subtracted from the
	// destination. Result = Destination - Source
	BLENDOP_REVSUBTRACT = C.D3DBLENDOP_REVSUBTRACT
	// BLENDOP_MIN means the result is the minimum of the source and
	// destination. Result = MIN(Source, Destination)
	BLENDOP_MIN = C.D3DBLENDOP_MIN
	// BLENDOP_MAX means the result is the maximum of the source and
	// destination. Result = MAX(Source, Destination)
	BLENDOP_MAX = C.D3DBLENDOP_MAX
)
View Source
const (
	// CMP_NEVER always fails the test.
	CMP_NEVER = C.D3DCMP_NEVER
	// CMP_LESS accepts the new pixel if its value is less than the value of
	// the current pixel.
	CMP_LESS = C.D3DCMP_LESS
	// CMP_EQUAL accepts the new pixel if its value equals the value of the
	// current pixel.
	CMP_EQUAL = C.D3DCMP_EQUAL
	// CMP_LESSEQUAL accepts the new pixel if its value is less than or equal
	// to the value of the current pixel.
	CMP_LESSEQUAL = C.D3DCMP_LESSEQUAL
	// CMP_GREATER accepts the new pixel if its value is greater than the value
	// of the current pixel.
	CMP_GREATER = C.D3DCMP_GREATER
	// CMP_NOTEQUAL accepts the new pixel if its value does not equal the value
	// of the current pixel.
	CMP_NOTEQUAL = C.D3DCMP_NOTEQUAL
	// CMP_GREATEREQUAL accepts the new pixel if its value is greater than or
	// equal to the value of the current pixel.
	CMP_GREATEREQUAL = C.D3DCMP_GREATEREQUAL
	// CMP_ALWAYS always passes the test.
	CMP_ALWAYS = C.D3DCMP_ALWAYS
)
View Source
const (
	// CUBEMAP_FACE_POSITIVE_X is the positive x-face of the cubemap.
	CUBEMAP_FACE_POSITIVE_X = C.D3DCUBEMAP_FACE_POSITIVE_X
	// CUBEMAP_FACE_NEGATIVE_X is the negative x-face of the cubemap.
	CUBEMAP_FACE_NEGATIVE_X = C.D3DCUBEMAP_FACE_NEGATIVE_X
	// CUBEMAP_FACE_POSITIVE_Y is the positive y-face of the cubemap.
	CUBEMAP_FACE_POSITIVE_Y = C.D3DCUBEMAP_FACE_POSITIVE_Y
	// CUBEMAP_FACE_NEGATIVE_Y is the negative y-face of the cubemap.
	CUBEMAP_FACE_NEGATIVE_Y = C.D3DCUBEMAP_FACE_NEGATIVE_Y
	// CUBEMAP_FACE_POSITIVE_Z is the positive z-face of the cubemap.
	CUBEMAP_FACE_POSITIVE_Z = C.D3DCUBEMAP_FACE_POSITIVE_Z
	// CUBEMAP_FACE_NEGATIVE_Z is the negative z-face of the cubemap.
	CUBEMAP_FACE_NEGATIVE_Z = C.D3DCUBEMAP_FACE_NEGATIVE_Z
)
View Source
const (
	// CULL_NONE does not cull back faces.
	CULL_NONE = C.D3DCULL_NONE
	// CULL_CW culls back faces with clockwise vertices.
	CULL_CW = C.D3DCULL_CW
	// CULL_CCW culls back faces with counterclockwise vertices.
	CULL_CCW = C.D3DCULL_CCW
)
View Source
const (
	// DMT_ENABLE enables the debug monitor.
	DMT_ENABLE = C.D3DDMT_ENABLE
	// DMT_DISABLE disables the debug monitor.
	DMT_DISABLE = C.D3DDMT_DISABLE
)
View Source
const (
	// DECLMETHOD_DEFAULT is the default value. The tessellator copies the
	// vertex data (spline data for patches) as is, with no additional
	// calculations. When the tessellator is used, this element is
	// interpolated. Otherwise vertex data is copied into the input register.
	// The input and output type can be any value, but are always the same type.
	DECLMETHOD_DEFAULT = C.D3DDECLMETHOD_DEFAULT
	// DECLMETHOD_PARTIALU computes the tangent at a point on the rectangle or
	// triangle patch in the U direction. The input type can be one of the
	// following: DECLTYPE_D3DCOLOR, DECLTYPE_FLOAT3, DECLTYPE_FLOAT4,
	// DECLTYPE_SHORT4, DECLTYPE_UBYTE4.
	// The output type is always DECLTYPE_FLOAT3.
	DECLMETHOD_PARTIALU = C.D3DDECLMETHOD_PARTIALU
	// DECLMETHOD_PARTIALV Computes the tangent at a point on the rectangle or
	// triangle patch in the V direction. The input type can be one of the
	// following: DECLTYPE_D3DCOLOR, DECLTYPE_FLOAT3, DECLTYPE_FLOAT4,
	// DECLTYPE_SHORT4, DECLTYPE_UBYTE4.
	// The output type is always DECLTYPE_FLOAT3.
	DECLMETHOD_PARTIALV = C.D3DDECLMETHOD_PARTIALV
	// DECLMETHOD_CROSSUV computes the normal at a point on the rectangle or
	// triangle patch by taking the cross product of two tangents. The input
	// type can be one of the following: DECLTYPE_D3DCOLOR, DECLTYPE_FLOAT3,
	// DECLTYPE_FLOAT4, DECLTYPE_SHORT4, DECLTYPE_UBYTE4.
	// The output type is always DECLTYPE_FLOAT3.
	DECLMETHOD_CROSSUV = C.D3DDECLMETHOD_CROSSUV
	// DECLMETHOD_UV copies out the U, V values at a point on the rectangle or
	// triangle patch. This results in a 2D float. The input type must be set
	// to DECLTYPE_UNUSED. The output data type is always DECLTYPE_FLOAT2. The
	// input stream and offset are also unused (but must be set to 0).
	DECLMETHOD_UV = C.D3DDECLMETHOD_UV
	// DECLMETHOD_LOOKUP looks up a displacement map. The input type can be one
	// of the following: DECLTYPE_FLOAT2, DECLTYPE_FLOAT3, DECLTYPE_FLOAT4.
	// Only the X and Y components are used for the texture map lookup. The
	// output type is always DECLTYPE_FLOAT1. The device must support
	// displacement mapping. This constant is supported only by the
	// programmable pipeline on N-patch data, if N-patches are enabled.
	DECLMETHOD_LOOKUP = C.D3DDECLMETHOD_LOOKUP
	// DECLMETHOD_LOOKUPPRESAMPLED looks up a presampled displacement map. The
	// input type must be set to DECLTYPE_UNUSED; the stream index and the
	// stream offset must be set to 0. The output type for this operation is
	// always DECLTYPE_FLOAT1. The device must support displacement mapping.
	// This constant is supported only by the programmable pipeline on N-patch
	// data, if N-patches are enabled. This method can be used only with
	// DECLUSAGE_SAMPLE.
	DECLMETHOD_LOOKUPPRESAMPLED = C.D3DDECLMETHOD_LOOKUPPRESAMPLED
)
View Source
const (
	// DECLTYPE_FLOAT1 is a one-component float expanded to (float, 0, 0, 1).
	DECLTYPE_FLOAT1 = C.D3DDECLTYPE_FLOAT1
	// DECLTYPE_FLOAT2 is a two-component float expanded to (float, float, 0,
	// 1).
	DECLTYPE_FLOAT2 = C.D3DDECLTYPE_FLOAT2
	// DECLTYPE_FLOAT3 is a three-component float expanded to (float, float,
	// float, 1).
	DECLTYPE_FLOAT3 = C.D3DDECLTYPE_FLOAT3
	// DECLTYPE_FLOAT4 is a four-component float expanded to (float, float,
	// float, float).
	DECLTYPE_FLOAT4 = C.D3DDECLTYPE_FLOAT4
	// DECLTYPE_D3DCOLOR is a four-component, packed, unsigned bytes mapped to
	// 0 to 1 range. Input is a COLOR and is expanded to RGBA order.
	DECLTYPE_D3DCOLOR = C.D3DDECLTYPE_D3DCOLOR
	// DECLTYPE_UBYTE4 is a four-component, unsigned byte.
	DECLTYPE_UBYTE4 = C.D3DDECLTYPE_UBYTE4
	// DECLTYPE_SHORT2 is a two-component, signed short expanded to (value,
	// value, 0, 1).
	DECLTYPE_SHORT2 = C.D3DDECLTYPE_SHORT2
	// DECLTYPE_SHORT4 is a four-component, signed short expanded to (value,
	// value, value, value).
	DECLTYPE_SHORT4 = C.D3DDECLTYPE_SHORT4
	// DECLTYPE_UBYTE4N is a four-component byte with each byte normalized by
	// dividing with 255.0f.
	DECLTYPE_UBYTE4N = C.D3DDECLTYPE_UBYTE4N
	// DECLTYPE_SHORT2N is a normalized, two-component, signed short, expanded
	// to (first short/32767.0, second short/32767.0, 0, 1).
	DECLTYPE_SHORT2N = C.D3DDECLTYPE_SHORT2N
	// DECLTYPE_SHORT4N is a normalized, four-component, signed short, expanded
	// to (first short/32767.0, second short/32767.0, third short/32767.0,
	// fourth short/32767.0).
	DECLTYPE_SHORT4N = C.D3DDECLTYPE_SHORT4N
	// DECLTYPE_USHORT2N is a normalized, two-component, unsigned short,
	// expanded to (first short/65535.0, short short/65535.0, 0, 1).
	DECLTYPE_USHORT2N = C.D3DDECLTYPE_USHORT2N
	// DECLTYPE_USHORT4N is a normalized, four-component, unsigned short,
	// expanded to (first short/65535.0, second short/65535.0, third
	// short/65535.0, fourth short/65535.0).
	DECLTYPE_USHORT4N = C.D3DDECLTYPE_USHORT4N
	// DECLTYPE_UDEC3 is a three-component, unsigned, 10 10 10 format expanded
	// to (value, value, value, 1).
	DECLTYPE_UDEC3 = C.D3DDECLTYPE_UDEC3
	// DECLTYPE_DEC3N is a three-component, signed, 10 10 10 format normalized
	// and expanded to (v[0]/511.0, v[1]/511.0, v[2]/511.0, 1).
	DECLTYPE_DEC3N = C.D3DDECLTYPE_DEC3N
	// DECLTYPE_FLOAT16_2 is a two-component, 16-bit, floating point expanded
	// to (value, value, 0, 1).
	DECLTYPE_FLOAT16_2 = C.D3DDECLTYPE_FLOAT16_2
	// DECLTYPE_FLOAT16_4 is a four-component, 16-bit, floating point expanded
	// to (value, value, value, value).
	DECLTYPE_FLOAT16_4 = C.D3DDECLTYPE_FLOAT16_4
	// DECLTYPE_UNUSED means the type field in the declaration is unused. This
	// is designed for use with DECLMETHOD_UV and DECLMETHOD_LOOKUPPRESAMPLED.
	DECLTYPE_UNUSED = C.D3DDECLTYPE_UNUSED
)
View Source
const (
	// DECLUSAGE_POSITION means position data ranging from (-1,-1) to (1,1).
	// Use DECLUSAGE_POSITION with a usage index of 0 to specify untransformed
	// position for fixed function vertex processing and the n-patch
	// tessellator. Use DECLUSAGE_POSITION with a usage index of 1 to specify
	// untransformed position in the fixed function vertex shader for vertex
	// tweening.
	DECLUSAGE_POSITION = C.D3DDECLUSAGE_POSITION
	// DECLUSAGE_BLENDWEIGHT means blending weight data. Use
	// DECLUSAGE_BLENDWEIGHT with a usage index of 0 to specify the blend
	// weights used in indexed and nonindexed vertex blending.
	DECLUSAGE_BLENDWEIGHT = C.D3DDECLUSAGE_BLENDWEIGHT
	// DECLUSAGE_BLENDINDICES means blending indices data. Use
	// DECLUSAGE_BLENDINDICES with a usage index of 0 to specify matrix indices
	// for indexed paletted skinning.
	DECLUSAGE_BLENDINDICES = C.D3DDECLUSAGE_BLENDINDICES
	// DECLUSAGE_NORMAL means vertex normal data. Use DECLUSAGE_NORMAL with a
	// usage index of 0 to specify vertex normals for fixed function vertex
	// processing and the n-patch tessellator. Use DECLUSAGE_NORMAL with a
	// usage index of 1 to specify vertex normals for fixed function vertex
	// processing for vertex tweening.
	DECLUSAGE_NORMAL = C.D3DDECLUSAGE_NORMAL
	// DECLUSAGE_PSIZE means point size data. Use DECLUSAGE_PSIZE with a usage
	// index of 0 to specify the point-size attribute used by the setup engine
	// of the rasterizer to expand a point into a quad for the point-sprite
	// functionality.
	DECLUSAGE_PSIZE = C.D3DDECLUSAGE_PSIZE
	// DECLUSAGE_TEXCOORD means texture coordinate data. Use
	// DECLUSAGE_TEXCOORD, n to specify texture coordinates in fixed function
	// vertex processing and in pixel shaders prior to ps_3_0. These can be
	// used to pass user defined data.
	DECLUSAGE_TEXCOORD = C.D3DDECLUSAGE_TEXCOORD
	// DECLUSAGE_TANGENT means vertex tangent data.
	DECLUSAGE_TANGENT = C.D3DDECLUSAGE_TANGENT
	// DECLUSAGE_BINORMAL means vertex binormal data.
	DECLUSAGE_BINORMAL = C.D3DDECLUSAGE_BINORMAL
	// DECLUSAGE_TESSFACTOR means a single positive floating point value. Use
	// DECLUSAGE_TESSFACTOR with a usage index of 0 to specify a tessellation
	// factor used in the tessellation unit to control the rate of tessellation.
	DECLUSAGE_TESSFACTOR = C.D3DDECLUSAGE_TESSFACTOR
	// DECLUSAGE_POSITIONT means the vertex data contains transformed position
	// data ranging from (0,0) to (viewport width, viewport height). Use
	// DECLUSAGE_POSITIONT with a usage index of 0 to specify transformed
	// position. When a declaration containing this is set, the pipeline does
	// not perform vertex processing.
	DECLUSAGE_POSITIONT = C.D3DDECLUSAGE_POSITIONT
	// DECLUSAGE_COLOR means the vertex data contains diffuse or specular
	// color. Use DECLUSAGE_COLOR with a usage index of 0 to specify the
	// diffuse color in the fixed function vertex shader and pixel shaders
	// prior to ps_3_0. Use D3DDECLUSAGE_COLOR with a usage index of 1 to
	// specify the specular color in the fixed function vertex shader and pixel
	// shaders prior to ps_3_0.
	DECLUSAGE_COLOR = C.D3DDECLUSAGE_COLOR
	// DECLUSAGE_FOG means the vertex data contains fog data. Use DECLUSAGE_FOG
	// with a usage index of 0 to specify a fog blend value used after pixel
	// shading finishes. This applies to pixel shaders prior to version ps_3_0.
	DECLUSAGE_FOG = C.D3DDECLUSAGE_FOG
	// DECLUSAGE_DEPTH means the vertex data contains depth data.
	DECLUSAGE_DEPTH = C.D3DDECLUSAGE_DEPTH
	// DECLUSAGE_SAMPLE means the vertex data contains sampler data. Use
	// DECLUSAGE_SAMPLE with a usage index of 0 to specify the displacement
	// value to look up. It can be used only with
	// DECLUSAGE_LOOKUPPRESAMPLED or DECLUSAGE_LOOKUP.
	DECLUSAGE_SAMPLE = C.D3DDECLUSAGE_SAMPLE
)
View Source
const (
	// DEGREE_LINEAR means the curve is described by variables of first order.
	DEGREE_LINEAR = C.D3DDEGREE_LINEAR
	// DEGREE_QUADRATIC means the curve is described by variables of second
	// order.
	DEGREE_QUADRATIC = C.D3DDEGREE_QUADRATIC
	// DEGREE_CUBIC means the curve is described by variables of third order.
	DEGREE_CUBIC = C.D3DDEGREE_CUBIC
	// DEGREE_QUINTIC means the curve is described by variables of fourth order.
	DEGREE_QUINTIC = C.D3DDEGREE_QUINTIC
)
View Source
const (
	// DEVTYPE_HAL indicates hardware rasterization. Shading is done with
	// software, hardware, or mixed transform and lighting.
	DEVTYPE_HAL = C.D3DDEVTYPE_HAL
	// DEVTYPE_REF means Direct3D features are implemented in software;
	// however, the reference rasterizer does make use of special CPU
	// instructions whenever it can.
	// The reference device is installed by the Windows SDK 8.0 or later and is
	// intended as an aid in debugging for development only.
	DEVTYPE_REF = C.D3DDEVTYPE_REF
	// DEVTYPE_SW is a pluggable software device that has been registered with
	// Direct3D.RegisterSoftwareDevice.
	DEVTYPE_SW = C.D3DDEVTYPE_SW
	// DEVTYPE_NULLREF initializes Direct3D on a computer that has neither
	// hardware nor reference rasterization available, and enable resources for
	// 3D content creation.
	DEVTYPE_NULLREF = C.D3DDEVTYPE_NULLREF
)
View Source
const (
	// FILL_POINT fills points.
	FILL_POINT = C.D3DFILL_POINT
	// FILL_WIREFRAME fills wireframes.
	FILL_WIREFRAME = C.D3DFILL_WIREFRAME
	// FILL_SOLID fills solids.
	FILL_SOLID = C.D3DFILL_SOLID
)
View Source
const (
	// FOG_NONE means no fog effect.
	FOG_NONE = C.D3DFOG_NONE
	// FOG_EXP means the fog effect intensifies exponentially, according to the
	// following formula:
	// f = 1/(e^(d*density))
	FOG_EXP = C.D3DFOG_EXP
	// FOG_EXP2 means the fog effect intensifies exponentially with the square
	// of the distance, according to the following formula:
	// f = 1/(e^[(d*density)^2])
	FOG_EXP2 = C.D3DFOG_EXP2
	// FOG_LINEAR means the fog effect intensifies linearly between the start
	// and end points, according to the following formula:
	// f = (end - d)/(end - start)
	// This is the only fog mode currently supported.
	FOG_LINEAR = C.D3DFOG_LINEAR
)
View Source
const (
	// FMT_UNKNOWN means the surface format is unknown.
	FMT_UNKNOWN = C.D3DFMT_UNKNOWN
	// FMT_R8G8B8 means 24-bit RGB pixel format with 8 bits per channel.
	FMT_R8G8B8 = C.D3DFMT_R8G8B8
	// FMT_A8R8G8B8 means 32-bit ARGB pixel format with alpha, using 8 bits per
	// channel.
	FMT_A8R8G8B8 = C.D3DFMT_A8R8G8B8
	// FMT_X8R8G8B8 means 32-bit RGB pixel format, where 8 bits are reserved
	// for each color.
	FMT_X8R8G8B8 = C.D3DFMT_X8R8G8B8
	// FMT_R5G6B5 means 16-bit RGB pixel format with 5 bits for red, 6 bits for
	// green, and 5 bits for blue.
	FMT_R5G6B5 = C.D3DFMT_R5G6B5
	// FMT_X1R5G5B5 means 16-bit pixel format where 5 bits are reserved for
	// each color.
	FMT_X1R5G5B5 = C.D3DFMT_X1R5G5B5
	// FMT_A1R5G5B5 means 16-bit pixel format where 5 bits are reserved for
	// each color and 1 bit is reserved for alpha.
	FMT_A1R5G5B5 = C.D3DFMT_A1R5G5B5
	// FMT_A4R4G4B4 means 16-bit ARGB pixel format with 4 bits for each channel.
	FMT_A4R4G4B4 = C.D3DFMT_A4R4G4B4
	// FMT_R3G3B2 means 8-bit RGB texture format using 3 bits for red, 3 bits
	// for green, and 2 bits for blue.
	FMT_R3G3B2 = C.D3DFMT_R3G3B2
	// FMT_A8 means 8-bit alpha only.
	FMT_A8 = C.D3DFMT_A8
	// FMT_A8R3G3B2 means 16-bit ARGB texture format using 8 bits for alpha, 3
	// bits each for red and green, and 2 bits for blue.
	FMT_A8R3G3B2 = C.D3DFMT_A8R3G3B2
	// FMT_X4R4G4B4 means 16-bit RGB pixel format using 4 bits for each color.
	FMT_X4R4G4B4 = C.D3DFMT_X4R4G4B4
	// FMT_A2B10G10R10 means 32-bit pixel format using 10 bits for each color
	// and 2 bits for alpha.
	FMT_A2B10G10R10 = C.D3DFMT_A2B10G10R10
	// FMT_A8B8G8R8 means 32-bit ARGB pixel format with alpha, using 8 bits per
	// channel.
	FMT_A8B8G8R8 = C.D3DFMT_A8B8G8R8
	// FMT_X8B8G8R8 means 32-bit RGB pixel format, where 8 bits are reserved
	// for each color.
	FMT_X8B8G8R8 = C.D3DFMT_X8B8G8R8
	// FMT_G16R16 means 32-bit pixel format using 16 bits each for green and
	// red.
	FMT_G16R16 = C.D3DFMT_G16R16
	// FMT_A2R10G10B10 means 32-bit pixel format using 10 bits each for red,
	// green, and blue, and 2 bits for alpha.
	FMT_A2R10G10B10 = C.D3DFMT_A2R10G10B10
	// FMT_A16B16G16R16 means 64-bit pixel format using 16 bits for each
	// component.
	FMT_A16B16G16R16 = C.D3DFMT_A16B16G16R16
	// FMT_A8P8 means 8-bit color indexed with 8 bits of alpha.
	FMT_A8P8 = C.D3DFMT_A8P8
	// FMT_P8 means 8-bit color indexed.
	FMT_P8 = C.D3DFMT_P8
	// FMT_L8 means 8-bit luminance only.
	FMT_L8 = C.D3DFMT_L8
	// FMT_A8L8 means 16-bit using 8 bits each for alpha and luminance.
	FMT_A8L8 = C.D3DFMT_A8L8
	// FMT_A4L4 means 8-bit using 4 bits each for alpha and luminance.
	FMT_A4L4 = C.D3DFMT_A4L4
	// FMT_V8U8 means 16-bit bump-map format using 8 bits each for u and v data.
	FMT_V8U8 = C.D3DFMT_V8U8
	// FMT_L6V5U5 means 16-bit bump-map format with luminance using 6 bits for
	// luminance, and 5 bits each for v and u.
	FMT_L6V5U5 = C.D3DFMT_L6V5U5
	// FMT_X8L8V8U8 means 32-bit bump-map format with luminance using 8 bits
	// for each channel.
	FMT_X8L8V8U8 = C.D3DFMT_X8L8V8U8
	// FMT_Q8W8V8U8 means 32-bit bump-map format using 8 bits for each channel.
	FMT_Q8W8V8U8 = C.D3DFMT_Q8W8V8U8
	// FMT_V16U16 means 32-bit bump-map format using 16 bits for each channel.
	FMT_V16U16 = C.D3DFMT_V16U16
	// FMT_A2W10V10U10 means 32-bit bump-map format using 2 bits for alpha and
	// 10 bits each for w, v, and u.
	FMT_A2W10V10U10 = C.D3DFMT_A2W10V10U10
	// FMT_UYVY means UYVY format (PC98 compliance).
	FMT_UYVY = C.D3DFMT_UYVY
	// FMT_R8G8_B8G8 is a 16-bit packed RGB format analogous to UYVY (U0Y0,
	// V0Y1, U2Y2, and so on). It requires a pixel pair in order to properly
	// represent the color value. The first pixel in the pair contains 8 bits
	// of green (in the low 8 bits) and 8 bits of red (in the high 8 bits). The
	// second pixel contains 8 bits of green (in the low 8 bits) and 8 bits of
	// blue (in the high 8 bits). Together, the two pixels share the red and
	// blue components, while each has a unique green component (R0G0, B0G1,
	// R2G2, and so on). The texture sampler does not normalize the colors when
	// looking up into a pixel shader; they remain in the range of 0.0f to
	// 255.0f. This is true for all programmable pixel shader models. For the
	// fixed function pixel shader, the hardware should normalize to the 0.f to
	// 1.f range and essentially treat it as the YUY2 texture. Hardware that
	// exposes this format must have PixelShader1xMaxValue member of CAPS set
	// to a value capable of handling that range.
	FMT_R8G8_B8G8 = C.D3DFMT_R8G8_B8G8
	// FMT_YUY2 means YUY2 format (PC98 compliance).
	FMT_YUY2 = C.D3DFMT_YUY2
	// FMT_G8R8_G8B8 is a 16-bit packed RGB format analogous to YUY2 (Y0U0,
	// Y1V0, Y2U2, and so on). It requires a pixel pair in order to properly
	// represent the color value. The first pixel in the pair contains 8 bits
	// of green (in the high 8 bits) and 8 bits of red (in the low 8 bits). The
	// second pixel contains 8 bits of green (in the high 8 bits) and 8 bits of
	// blue (in the low 8 bits). Together, the two pixels share the red and
	// blue components, while each has a unique green component (G0R0, G1B0,
	// G2R2, and so on). The texture sampler does not normalize the colors when
	// looking up into a pixel shader; they remain in the range of 0.0f to
	// 255.0f. This is true for all programmable pixel shader models. For the
	// fixed function pixel shader, the hardware should normalize to the 0.f to
	// 1.f range and essentially treat it as the YUY2 texture. Hardware that
	// exposes this format must have the PixelShader1xMaxValue member of CAPS
	// set to a value capable of handling that range.
	FMT_G8R8_G8B8 = C.D3DFMT_G8R8_G8B8
	// FMT_DXT1 means DXT1 compression texture format.
	FMT_DXT1 = C.D3DFMT_DXT1
	// FMT_DXT2 means DXT2 compression texture format.
	FMT_DXT2 = C.D3DFMT_DXT2
	// FMT_DXT3 means DXT3 compression texture format.
	FMT_DXT3 = C.D3DFMT_DXT3
	// FMT_DXT4 means DXT4 compression texture format.
	FMT_DXT4 = C.D3DFMT_DXT4
	// FMT_DXT5 means DXT5 compression texture format.
	FMT_DXT5 = C.D3DFMT_DXT5
	// FMT_D16_LOCKABLE means 16-bit z-buffer bit depth.
	FMT_D16_LOCKABLE = C.D3DFMT_D16_LOCKABLE
	// FMT_D32 means 32-bit z-buffer bit depth.
	FMT_D32 = C.D3DFMT_D32
	// FMT_D15S1 means 16-bit z-buffer bit depth where 15 bits are reserved for
	// the depth channel and 1 bit is reserved for the stencil channel.
	FMT_D15S1 = C.D3DFMT_D15S1
	// FMT_D24S8 means 32-bit z-buffer bit depth using 24 bits for the depth
	// channel and 8 bits for the stencil channel.
	FMT_D24S8 = C.D3DFMT_D24S8
	// FMT_D24X8 means 32-bit z-buffer bit depth using 24 bits for the depth
	// channel.
	FMT_D24X8 = C.D3DFMT_D24X8
	// FMT_D24X4S4 means 32-bit z-buffer bit depth using 24 bits for the depth
	// channel and 4 bits for the stencil channel.
	FMT_D24X4S4 = C.D3DFMT_D24X4S4
	// FMT_D16 means 16-bit z-buffer bit depth.
	FMT_D16 = C.D3DFMT_D16
	// FMT_L16 means 16-bit luminance only.
	FMT_L16 = C.D3DFMT_L16
	// FMT_D32F_LOCKABLE is a lockable format where the depth value is
	// represented as a standard IEEE floating-point number.
	FMT_D32F_LOCKABLE = C.D3DFMT_D32F_LOCKABLE
	// FMT_D24FS8 is a non-lockable format that contains 24 bits of depth (in a
	// 24-bit floating point format - 20e4) and 8 bits of stencil.
	FMT_D24FS8 = C.D3DFMT_D24FS8
	// FMT_VERTEXDATA describes a vertex buffer surface.
	FMT_VERTEXDATA = C.D3DFMT_VERTEXDATA
	// FMT_INDEX16 means 16-bit index buffer bit depth.
	FMT_INDEX16 = C.D3DFMT_INDEX16
	// FMT_INDEX32 means 32-bit index buffer bit depth.
	FMT_INDEX32 = C.D3DFMT_INDEX32
	// FMT_Q16W16V16U16 means 64-bit bump-map format using 16 bits for each
	// component.
	FMT_Q16W16V16U16 = C.D3DFMT_Q16W16V16U16
	// FMT_MULTI2_ARGB8 means a multiElement texture (not compressed).
	FMT_MULTI2_ARGB8 = C.D3DFMT_MULTI2_ARGB8
	// FMT_R16F means 16-bit float format using 16 bits for the red channel.
	FMT_R16F = C.D3DFMT_R16F
	// FMT_G16R16F means 32-bit float format using 16 bits for the red channel
	// and 16 bits for the green channel.
	FMT_G16R16F = C.D3DFMT_G16R16F
	// FMT_A16B16G16R16F means 64-bit float format using 16 bits for the each
	// channel (alpha, blue, green, red).
	FMT_A16B16G16R16F = C.D3DFMT_A16B16G16R16F
	// FMT_R32F means 32-bit float format using 32 bits for the red channel.
	FMT_R32F = C.D3DFMT_R32F
	// FMT_G32R32F means 64-bit float format using 32 bits for the red channel
	// and 32 bits for the green channel.
	FMT_G32R32F = C.D3DFMT_G32R32F
	// FMT_A32B32G32R32F means 128-bit float format using 32 bits for the each
	// channel (alpha, blue, green, red).
	FMT_A32B32G32R32F = C.D3DFMT_A32B32G32R32F
	// FMT_CxV8U8 means 16-bit normal compression format. The texture sampler
	// computes the C channel from: C = sqrt(1 - U² - V²).
	FMT_CxV8U8 = C.D3DFMT_CxV8U8
)
View Source
const (
	// LIGHT_POINT means the light is a point source. The light has a position
	// in space and radiates light in all directions.
	LIGHT_POINT = C.D3DLIGHT_POINT
	// LIGHT_SPOT means the light is a spotlight source. This light is like a
	// point light, except that the illumination is limited to a cone. This
	// light type has a direction and several other parameters that determine
	// the shape of the cone it produces.
	LIGHT_SPOT = C.D3DLIGHT_SPOT
	// LIGHT_DIRECTIONAL means the light is a directional light source. This is
	// equivalent to using a point light source at an infinite distance.
	LIGHT_DIRECTIONAL = C.D3DLIGHT_DIRECTIONAL
)
View Source
const (
	// MCS_MATERIAL uses the color from the current material.
	MCS_MATERIAL = C.D3DMCS_MATERIAL
	// MCS_COLOR1 uses the diffuse vertex color.
	MCS_COLOR1 = C.D3DMCS_COLOR1
	// MCS_COLOR2 uses the specular vertex color.
	MCS_COLOR2 = C.D3DMCS_COLOR2
)
View Source
const (
	// MULTISAMPLE_NONE means no level of full-scene multisampling is available.
	MULTISAMPLE_NONE = C.D3DMULTISAMPLE_NONE
	// MULTISAMPLE_NONMASKABLE enables the multisample quality value.
	MULTISAMPLE_NONMASKABLE = C.D3DMULTISAMPLE_NONMASKABLE
	// MULTISAMPLE_2_SAMPLES means 2 levels of full-scene multisampling
	// available.
	MULTISAMPLE_2_SAMPLES = C.D3DMULTISAMPLE_2_SAMPLES
	// MULTISAMPLE_3_SAMPLES means 3 levels of full-scene multisampling
	// available.
	MULTISAMPLE_3_SAMPLES = C.D3DMULTISAMPLE_3_SAMPLES
	// MULTISAMPLE_4_SAMPLES means 4 levels of full-scene multisampling
	// available.
	MULTISAMPLE_4_SAMPLES = C.D3DMULTISAMPLE_4_SAMPLES
	// MULTISAMPLE_5_SAMPLES means 5 levels of full-scene multisampling
	// available.
	MULTISAMPLE_5_SAMPLES = C.D3DMULTISAMPLE_5_SAMPLES
	// MULTISAMPLE_6_SAMPLES means 6 levels of full-scene multisampling
	// available.
	MULTISAMPLE_6_SAMPLES = C.D3DMULTISAMPLE_6_SAMPLES
	// MULTISAMPLE_7_SAMPLES means 7 levels of full-scene multisampling
	// available.
	MULTISAMPLE_7_SAMPLES = C.D3DMULTISAMPLE_7_SAMPLES
	// MULTISAMPLE_8_SAMPLES means 8 levels of full-scene multisampling
	// available.
	MULTISAMPLE_8_SAMPLES = C.D3DMULTISAMPLE_8_SAMPLES
	// MULTISAMPLE_9_SAMPLES means 9 levels of full-scene multisampling
	// available.
	MULTISAMPLE_9_SAMPLES = C.D3DMULTISAMPLE_9_SAMPLES
	// MULTISAMPLE_10_SAMPLES means 10 levels of full-scene multisampling
	// available.
	MULTISAMPLE_10_SAMPLES = C.D3DMULTISAMPLE_10_SAMPLES
	// MULTISAMPLE_11_SAMPLES means 11 levels of full-scene multisampling
	// available.
	MULTISAMPLE_11_SAMPLES = C.D3DMULTISAMPLE_11_SAMPLES
	// MULTISAMPLE_12_SAMPLES means 12 levels of full-scene multisampling
	// available.
	MULTISAMPLE_12_SAMPLES = C.D3DMULTISAMPLE_12_SAMPLES
	// MULTISAMPLE_13_SAMPLES means 13 levels of full-scene multisampling
	// available.
	MULTISAMPLE_13_SAMPLES = C.D3DMULTISAMPLE_13_SAMPLES
	// MULTISAMPLE_14_SAMPLES means 14 levels of full-scene multisampling
	// available.
	MULTISAMPLE_14_SAMPLES = C.D3DMULTISAMPLE_14_SAMPLES
	// MULTISAMPLE_15_SAMPLES means 15 levels of full-scene multisampling
	// available.
	MULTISAMPLE_15_SAMPLES = C.D3DMULTISAMPLE_15_SAMPLES
	// MULTISAMPLE_16_SAMPLES means 16 levels of full-scene multisampling
	// available.
	MULTISAMPLE_16_SAMPLES = C.D3DMULTISAMPLE_16_SAMPLES
)
View Source
const (
	// PATCHEDGE_DISCRETE means discrete edge style. In discrete mode, you can
	// specify float tessellation but it will be truncated to integers.
	PATCHEDGE_DISCRETE = C.D3DPATCHEDGE_DISCRETE
	// PATCHEDGE_CONTINUOUS means continuous edge style. In continuous mode,
	// tessellation is specified as float values that can be smoothly varied to
	// reduce "popping" artifacts.
	PATCHEDGE_CONTINUOUS = C.D3DPATCHEDGE_CONTINUOUS
)
View Source
const (
	// POOL_DEFAULT means resources are placed in the memory pool most
	// appropriate for the set of usages requested for the given resource. This
	// is usually video memory, including both local video memory and AGP
	// memory. The POOL_DEFAULT pool is separate from POOL_MANAGED and
	// POOL_SYSTEMMEM, and it specifies that the resource is placed in the
	// preferred memory for device access. Note that POOL_DEFAULT never
	// indicates that either POOL_MANAGED or POOL_SYSTEMMEM should be chosen as
	// the memory pool type for this resource. Textures placed in the
	// POOL_DEFAULT pool cannot be locked unless they are dynamic textures or
	// they are private, FOURCC, driver formats. To access unlockable textures,
	// you must use functions such as Device.UpdateSurface,
	// Device.UpdateTexture, Device.GetFrontBufferData, and
	// Device.GetRenderTargetData. POOL_MANAGED is probably a better choice
	// than POOL_DEFAULT for most applications. Note that some textures created
	// in driver-proprietary pixel formats, unknown to the Direct3D runtime,
	// can be locked. Also note that - unlike textures - swap chain back
	// buffers, render targets, vertex buffers, and index buffers can be
	// locked. When a device is lost, resources created using POOL_DEFAULT must
	// be released before calling Device.Reset.
	// When creating resources with POOL_DEFAULT, if video card memory is
	// already committed, managed resources will be evicted to free enough
	// memory to satisfy the request.
	POOL_DEFAULT = C.D3DPOOL_DEFAULT
	// POOL_MANAGED means resources are copied automatically to
	// device-accessible memory as needed. Managed resources are backed by
	// system memory and do not need to be recreated when a device is lost.
	// Managed resources can be locked. Only the system-memory copy is directly
	// modified. Direct3D copies your changes to driver-accessible memory as
	// needed.
	// Differences between Direct3D 9 and Direct3D 9Ex: POOL_MANAGED is valid
	// with Device; however, it is not valid with DeviceEx.
	POOL_MANAGED = C.D3DPOOL_MANAGED
	// POOL_SYSTEMMEM means resources are placed in memory that is not
	// typically accessible by the Direct3D device. This memory allocation
	// consumes system RAM but does not reduce pageable RAM. These resources do
	// not need to be recreated when a device is lost. Resources in this pool
	// can be locked and can be used as the source for a Device.UpdateSurface
	// or Device.UpdateTexture operation to a memory resource created with
	// POOL_DEFAULT.
	POOL_SYSTEMMEM = C.D3DPOOL_SYSTEMMEM
	// POOL_SCRATCH means resources are placed in system RAM and do not need to
	// be recreated when a device is lost. These resources are not bound by
	// device size or format restrictions. Because of this, these resources
	// cannot be accessed by the Direct3D device nor set as textures or render
	// targets. However, these resources can always be created, locked, and
	// copied.
	POOL_SCRATCH = C.D3DPOOL_SCRATCH
)
View Source
const (
	// PT_POINTLIST renders the vertices as a collection of isolated points.
	// This value is unsupported for indexed primitives.
	PT_POINTLIST = C.D3DPT_POINTLIST
	// PT_LINELIST renders the vertices as a list of isolated straight line
	// segments.
	PT_LINELIST = C.D3DPT_LINELIST
	// PT_LINESTRIP renders the vertices as a single polyline.
	PT_LINESTRIP = C.D3DPT_LINESTRIP
	// PT_TRIANGLELIST renders the specified vertices as a sequence of isolated
	// triangles. Each group of three vertices defines a separate triangle.
	// Back-face culling is affected by the current winding-order render state.
	PT_TRIANGLELIST = C.D3DPT_TRIANGLELIST
	// PT_TRIANGLESTRIP renders the vertices as a triangle strip. The
	// backface-culling flag is automatically flipped on even-numbered
	// triangles.
	PT_TRIANGLESTRIP = C.D3DPT_TRIANGLESTRIP
	// PT_TRIANGLEFAN renders the vertices as a triangle fan.
	PT_TRIANGLEFAN = C.D3DPT_TRIANGLEFAN
)
View Source
const (
	// QUERYTYPE_VCACHE queries for driver hints about data layout for vertex
	// caching.
	QUERYTYPE_VCACHE = C.D3DQUERYTYPE_VCACHE
	// QUERYTYPE_RESOURCEMANAGER queryies the resource manager. For this query,
	// the device behavior flags must include CREATE_DISABLE_DRIVER_MANAGEMENT.
	QUERYTYPE_RESOURCEMANAGER = C.D3DQUERYTYPE_RESOURCEMANAGER
	// QUERYTYPE_VERTEXSTATS queries vertex statistics.
	QUERYTYPE_VERTEXSTATS = C.D3DQUERYTYPE_VERTEXSTATS
	// QUERYTYPE_EVENT queries for any and all asynchronous events that have
	// been issued from API calls.
	QUERYTYPE_EVENT = C.D3DQUERYTYPE_EVENT
	// QUERYTYPE_OCCLUSION returns the number of pixels that pass z-testing.
	// These pixels are for primitives drawn between the issue of ISSUE_BEGIN
	// and ISSUE_END. This enables an application to check the occlusion result
	// against 0. Zero is fully occluded, which means the pixels are not
	// visible from the current camera position.
	QUERYTYPE_OCCLUSION = C.D3DQUERYTYPE_OCCLUSION
	// QUERYTYPE_TIMESTAMP returns a 64-bit timestamp.
	QUERYTYPE_TIMESTAMP = C.D3DQUERYTYPE_TIMESTAMP
	// QUERYTYPE_TIMESTAMPDISJOINT notifies an application if the counter
	// frequency has changed from the QUERYTYPE_TIMESTAMP.
	QUERYTYPE_TIMESTAMPDISJOINT = C.D3DQUERYTYPE_TIMESTAMPDISJOINT
	// QUERYTYPE_TIMESTAMPFREQ results in true if the values from
	// QUERYTYPE_TIMESTAMP queries cannot be guaranteed to be continuous
	// throughout the duration of the QUERYTYPE_TIMESTAMPDISJOINT query.
	// Otherwise, the query result is false.
	QUERYTYPE_TIMESTAMPFREQ = C.D3DQUERYTYPE_TIMESTAMPFREQ
	// QUERYTYPE_PIPELINETIMINGS returns percent of time processing pipeline
	// data.
	QUERYTYPE_PIPELINETIMINGS = C.D3DQUERYTYPE_PIPELINETIMINGS
	// QUERYTYPE_INTERFACETIMINGS returns percent of time processing data in
	// the driver.
	QUERYTYPE_INTERFACETIMINGS = C.D3DQUERYTYPE_INTERFACETIMINGS
	// QUERYTYPE_VERTEXTIMINGS returns percent of time processing vertex shader
	// data.
	QUERYTYPE_VERTEXTIMINGS = C.D3DQUERYTYPE_VERTEXTIMINGS
	// QUERYTYPE_PIXELTIMINGS returns percent of time processing pixel shader
	// data.
	QUERYTYPE_PIXELTIMINGS = C.D3DQUERYTYPE_PIXELTIMINGS
	// QUERYTYPE_BANDWIDTHTIMINGS is for throughput measurement comparisons for
	// help in understanding the performance of an application.
	QUERYTYPE_BANDWIDTHTIMINGS = C.D3DQUERYTYPE_BANDWIDTHTIMINGS
	// QUERYTYPE_CACHEUTILIZATION measures the cache hit-rate performance for
	// textures and indexed vertices.
	QUERYTYPE_CACHEUTILIZATION = C.D3DQUERYTYPE_CACHEUTILIZATION
)
View Source
const (
	// RS_ZENABLE is the depth-buffering state as one member of the ZBUFFERTYPE
	// enumerated type. Set this state to ZB_TRUE to enable z-buffering,
	// ZB_USEW to enable w-buffering, or ZB_FALSE to disable depth buffering.
	// The default value for this render state is ZB_TRUE if a depth stencil
	// was created along with the swap chain by setting the
	// EnableAutoDepthStencil member of the PRESENT_PARAMETERS structure to
	// true, and ZB_FALSE otherwise.
	RS_ZENABLE = C.D3DRS_ZENABLE
	// RS_FILLMODE expects one or more members of the D3DFILLMODE enumerated
	// type. The default value is D3DFILL_SOLID.
	RS_FILLMODE = C.D3DRS_FILLMODE
	// RS_SHADEMODE expects one or more members of the D3DSHADEMODE enumerated
	// type. The default value is D3DSHADE_GOURAUD.
	RS_SHADEMODE = C.D3DRS_SHADEMODE
	// RS_ZWRITEENABLE can be set to true to enable the application to write to
	// the depth buffer. The default value is true. This member enables an
	// application to prevent the system from updating the depth buffer with
	// new depth values. If false, depth comparisons are still made according
	// to the render state RS_ZFUNC, assuming that depth buffering is taking
	// place, but depth values are not written to the buffer.
	RS_ZWRITEENABLE = C.D3DRS_ZWRITEENABLE
	// RS_ALPHATESTENABLE can be set to true to enable per pixel alpha testing.
	// If the test passes, the pixel is processed by the frame buffer.
	// Otherwise, all frame-buffer processing is skipped for the pixel.
	// The test is done by comparing the incoming alpha value with the
	// reference alpha value, using the comparison function provided by the
	// RS_ALPHAFUNC render state. The reference alpha value is determined by
	// the value set for RS_ALPHAREF.
	// The default value of this parameter is false.
	RS_ALPHATESTENABLE = C.D3DRS_ALPHATESTENABLE
	// RS_LASTPIXEL is true by default, which enables drawing of the last pixel
	// in a line. To prevent drawing of the last pixel, set this value to false.
	RS_LASTPIXEL = C.D3DRS_LASTPIXEL
	// RS_SRCBLEND expectes one member of the BLEND enumerated type. The
	// default value is BLEND_ONE.
	RS_SRCBLEND = C.D3DRS_SRCBLEND
	// RS_DESTBLEND expectes one member of the BLEND enumerated type. The
	// default value is BLEND_ZERO.
	RS_DESTBLEND = C.D3DRS_DESTBLEND
	// RS_CULLMODE specifies how back-facing triangles are culled, if at all.
	// This can be set to one member of the CULL enumerated type. The default
	// value is CULL_CCW.
	RS_CULLMODE = C.D3DRS_CULLMODE
	// RS_ZFUNC expectes one member of the CMPFUNC enumerated type. The default
	// value is CMP_LESSEQUAL. This member enables an application to accept or
	// reject a pixel, based on its distance from the camera.
	// The depth value of the pixel is compared with the depth-buffer value. If
	// the depth value of the pixel passes the comparison function, the pixel
	// is written.
	// The depth value is written to the depth buffer only if the render state
	// is true.
	// Software rasterizers and many hardware accelerators work faster if the
	// depth test fails, because there is no need to filter and modulate the
	// texture if the pixel is not going to be rendered.
	RS_ZFUNC = C.D3DRS_ZFUNC
	// RS_ALPHAREF expectes a value that specifies a reference alpha value
	// against which pixels are tested when alpha testing is enabled. This is
	// an 8-bit value placed in the low 8 bits of the render-state value.
	// Values can range from 0x00000000 through 0x000000FF. The default value
	// is 0.
	RS_ALPHAREF = C.D3DRS_ALPHAREF
	// RS_ALPHAFUNC expectes one member of the CMPFUNC enumerated type. The
	// default value is CMP_ALWAYS. This member enables an application to
	// accept or reject a pixel, based on its alpha value.
	RS_ALPHAFUNC = C.D3DRS_ALPHAFUNC
	// RS_DITHERENABLE can be set to true to enable dithering. The default
	// value is false.
	RS_DITHERENABLE = C.D3DRS_DITHERENABLE
	// RS_ALPHABLENDENABLE can be set to true to enable alpha-blended
	// transparency. The default value is false.
	// The type of alpha blending is determined by the RS_SRCBLEND and
	// RS_DESTBLEND render states.
	RS_ALPHABLENDENABLE = C.D3DRS_ALPHABLENDENABLE
	// RS_FOGENABLE can be set to true to enable fog blending. The default
	// value is false.
	RS_FOGENABLE = C.D3DRS_FOGENABLE
	// RS_SPECULARENABLE can be set to true to enable specular highlights. The
	// default value is false.
	// Specular highlights are calculated as though every vertex in the object
	// being lit is at the object's origin. This gives the expected results as
	// long as the object is modeled around the origin and the distance from
	// the light to the object is relatively large. In other cases, the results
	// as undefined.
	// When this member is set to true, the specular color is added to the base
	// color after the texture cascade but before alpha blending.
	RS_SPECULARENABLE = C.D3DRS_SPECULARENABLE
	// RS_FOGCOLOR expectes a value whose type is COLOR. The default value is 0.
	RS_FOGCOLOR = C.D3DRS_FOGCOLOR
	// RS_FOGTABLEMODE is the fog formula to be used for pixel fog. Set to one
	// of the members of the FOGMODE enumerated type. The default value is
	// FOG_NONE.
	RS_FOGTABLEMODE = C.D3DRS_FOGTABLEMODE
	// RS_FOGSTART is the depth at which pixel or vertex fog effects begin for
	// linear fog mode. The default value is 0.0f. Depth is specified in world
	// space for vertex fog and either device space [0.0, 1.0] or world space
	// for pixel fog. For pixel fog, these values are in device space when the
	// system uses z for fog calculations and world-world space when the system
	// is using eye-relative fog (w-fog).
	// Use Device.SetRenderStateFloat to set this value.
	RS_FOGSTART = C.D3DRS_FOGSTART
	// RS_FOGEND is the depth at which pixel or vertex fog effects end for
	// linear fog mode. The default value is 1.0f. Depth is specified in world
	// space for vertex fog and either device space [0.0, 1.0] or world space
	// for pixel fog. For pixel fog, these values are in device space when the
	// system uses z for fog calculations and in world space when the system is
	// using eye-relative fog (w-fog).
	// Use Device.SetRenderStateFloat to set this value.
	RS_FOGEND = C.D3DRS_FOGEND
	// RS_FOGDENSITY is the fog density for pixel or vertex fog used in the
	// exponential fog modes FOG_EXP and FOG_EXP2). Valid density values range
	// from 0.0 through 1.0. The default value is 1.0.
	// Use Device.SetRenderStateFloat to set this value.
	RS_FOGDENSITY = C.D3DRS_FOGDENSITY
	// RS_RANGEFOGENABLE can be set to true to enable range-based vertex fog.
	// The default value is false, in which case the system uses depth-based
	// fog. In range-based fog, the distance of an object from the viewer is
	// used to compute fog effects, not the depth of the object (that is, the
	// z-coordinate) in the scene. In range-based fog, all fog methods work as
	// usual, except that they use range instead of depth in the computations.
	// Range is the correct factor to use for fog computations, but depth is
	// commonly used instead because range is time-consuming to compute and
	// depth is generally already available. Using depth to calculate fog has
	// the undesirable effect of having the fogginess of peripheral objects
	// change as the viewer's eye moves - in this case, the depth changes and
	// the range remains constant.
	// Because no hardware currently supports per-pixel range-based fog, range
	// correction is offered only for vertex fog.
	// Use Device.SetRenderStateBool to set this value.
	RS_RANGEFOGENABLE = C.D3DRS_RANGEFOGENABLE
	// RS_STENCILENABLE can be set to true to enable stenciling, or false to
	// disable stenciling. The default value is false.
	// Use Device.SetRenderStateBool to set this value.
	RS_STENCILENABLE = C.D3DRS_STENCILENABLE
	// RS_STENCILFAIL is the stencil operation to perform if the stencil test
	// fails. Values are from the STENCILOP enumerated type. The default value
	// is STENCILOP_KEEP.
	RS_STENCILFAIL = C.D3DRS_STENCILFAIL
	// RS_STENCILZFAIL is the stencil operation to perform if the stencil test
	// passes and the depth test (z-test) fails. Values are from the STENCILOP
	// enumerated type. The default value is STENCILOP_KEEP.
	RS_STENCILZFAIL = C.D3DRS_STENCILZFAIL
	// RS_STENCILPASS is the stencil operation to perform if both the stencil
	// and the depth (z) tests pass. Values are from the STENCILOP enumerated
	// type. The default value is STENCILOP_KEEP.
	RS_STENCILPASS = C.D3DRS_STENCILPASS
	// RS_STENCILFUNC is the comparison function for the stencil test. Values
	// are from the CMPFUNC enumerated type. The default value is CMP_ALWAYS.
	// The comparison function is used to compare the reference value to a
	// stencil buffer entry. This comparison applies only to the bits in the
	// reference value and stencil buffer entry that are set in the stencil
	// mask (set by the RS_STENCILMASK render state). If true, the stencil test
	// passes.
	RS_STENCILFUNC = C.D3DRS_STENCILFUNC
	// RS_STENCILREF is an int reference value for the stencil test. The
	// default value is 0.
	RS_STENCILREF = C.D3DRS_STENCILREF
	// RS_STENCILMASK is the mask applied to the reference value and each
	// stencil buffer entry to determine the significant bits for the stencil
	// test. The default mask is 0xFFFFFFFF.
	RS_STENCILMASK = C.D3DRS_STENCILMASK
	// RS_STENCILWRITEMASK is the write mask applied to values written into the
	// stencil buffer. The default mask is 0xFFFFFFFF.
	RS_STENCILWRITEMASK = C.D3DRS_STENCILWRITEMASK
	// RS_TEXTUREFACTOR is the color used for multiple-texture blending with
	// the TA_TFACTOR texture-blending argument or the TOP_BLENDFACTORALPHA
	// texture-blending operation. The associated value is a COLOR variable.
	// The default value is opaque white (0xFFFFFFFF).
	RS_TEXTUREFACTOR = C.D3DRS_TEXTUREFACTOR
	// RS_WRAP0 is the texture-wrapping behavior for multiple sets of texture
	// coordinates. Valid values for this render state can be any combination
	// of the WRAPCOORD_0 (or WRAP_U), WRAPCOORD_1 (or WRAP_V), WRAPCOORD_2 (or
	// WRAP_W), and WRAPCOORD_3 flags. These cause the system to wrap in the
	// direction of the first, second, third, and fourth dimensions, sometimes
	// referred to as the s, t, r, and q directions, for a given texture. The
	// default value for this render state is 0 (wrapping disabled in all
	// directions).
	RS_WRAP0 = C.D3DRS_WRAP0
	// RS_WRAP1 see RS_WRAP0.
	RS_WRAP1 = C.D3DRS_WRAP1
	// RS_WRAP2 see RS_WRAP0.
	RS_WRAP2 = C.D3DRS_WRAP2
	// RS_WRAP3 see RS_WRAP0.
	RS_WRAP3 = C.D3DRS_WRAP3
	// RS_WRAP4 see RS_WRAP0.
	RS_WRAP4 = C.D3DRS_WRAP4
	// RS_WRAP5 see RS_WRAP0.
	RS_WRAP5 = C.D3DRS_WRAP5
	// RS_WRAP6 see RS_WRAP0.
	RS_WRAP6 = C.D3DRS_WRAP6
	// RS_WRAP7 see RS_WRAP0.
	RS_WRAP7 = C.D3DRS_WRAP7
	// RS_CLIPPING can be set to true to enable primitive clipping by Direct3D,
	// or false to disable it. The default value is true.
	// Use Device.SetRenderStateBool to set this value.
	RS_CLIPPING = C.D3DRS_CLIPPING
	// RS_LIGHTING can be set to true to enable Direct3D lighting, or false to
	// disable it. The default value is true. Only vertices that include a
	// vertex normal are properly lit; vertices that do not contain a normal
	// employ a dot product of 0 in all lighting calculations.
	// Use Device.SetRenderStateBool to set this value.
	RS_LIGHTING = C.D3DRS_LIGHTING
	// RS_AMBIENT is the ambient light color. This value is of type COLOR. The
	// default value is 0.
	RS_AMBIENT = C.D3DRS_AMBIENT
	// RS_FOGVERTEXMODE is the fog formula to be used for vertex fog. Set to
	// one member of the FOGMODE enumerated type. The default value is FOG_NONE.
	RS_FOGVERTEXMODE = C.D3DRS_FOGVERTEXMODE
	// RS_COLORVERTEX can be set to true to enable per-vertex color or false to
	// disable it. The default value is true. Enabling per-vertex color allows
	// the system to include the color defined for individual vertices in its
	// lighting calculations.
	// For more information, see the following render states:
	// RS_DIFFUSEMATERIALSOURCE, RS_SPECULARMATERIALSOURCE,
	// RS_AMBIENTMATERIALSOURCE, RS_EMISSIVEMATERIALSOURCE.
	// Use Device.SetRenderStateBool to set this value.
	RS_COLORVERTEX = C.D3DRS_COLORVERTEX
	// RS_LOCALVIEWER can be set to true to enable camera-relative specular
	// highlights, or false to use orthogonal specular highlights. The default
	// value is true. Applications that use orthogonal projection should
	// specify false.
	// Use Device.SetRenderStateBool to set this value.
	RS_LOCALVIEWER = C.D3DRS_LOCALVIEWER
	// RS_NORMALIZENORMALS can be set to true to enable automatic normalization
	// of vertex normals, or false to disable it. The default value is false.
	// Enabling this feature causes the system to normalize the vertex normals
	// for vertices after transforming them to camera space, which can be
	// computationally time-consuming.
	// Use Device.SetRenderStateBool to set this value.
	RS_NORMALIZENORMALS = C.D3DRS_NORMALIZENORMALS
	// RS_DIFFUSEMATERIALSOURCE is the diffuse color source for lighting
	// calculations. Valid values are members of the MATERIALCOLORSOURCE
	// enumerated type. The default value is MCS_COLOR1. The value for this
	// render state is used only if the RS_COLORVERTEX render state is set to
	// true.
	RS_DIFFUSEMATERIALSOURCE = C.D3DRS_DIFFUSEMATERIALSOURCE
	// RS_SPECULARMATERIALSOURCE is the specular color source for lighting
	// calculations. Valid values are members of the MATERIALCOLORSOURCE
	// enumerated type. The default value is MCS_COLOR2.
	RS_SPECULARMATERIALSOURCE = C.D3DRS_SPECULARMATERIALSOURCE
	// RS_AMBIENTMATERIALSOURCE is the ambient color source for lighting
	// calculations. Valid values are members of the MATERIALCOLORSOURCE
	// enumerated type. The default value is MCS_MATERIAL.
	RS_AMBIENTMATERIALSOURCE = C.D3DRS_AMBIENTMATERIALSOURCE
	// RS_EMISSIVEMATERIALSOURCE is the emissive color source for lighting
	// calculations. Valid values are members of the MATERIALCOLORSOURCE
	// enumerated type. The default value is MCS_MATERIAL.
	RS_EMISSIVEMATERIALSOURCE = C.D3DRS_EMISSIVEMATERIALSOURCE
	// RS_VERTEXBLEND is the number of matrices to use to perform geometry
	// blending, if any. Valid values are members of the VERTEXBLENDFLAGS
	// enumerated type. The default value is VBF_DISABLE.
	RS_VERTEXBLEND = C.D3DRS_VERTEXBLEND
	// RS_CLIPPLANEENABLE enables or disables user-defined clipping planes.
	// Valid values are any uint32 in which the status of each bit (set or not
	// set) toggles the activation state of a corresponding user-defined
	// clipping plane. The least significant bit (bit 0) controls the first
	// clipping plane at index 0, and subsequent bits control the activation of
	// clipping planes at higher indexes. If a bit is set, the system applies
	// the appropriate clipping plane during scene rendering. The default value
	// is 0.
	// The CLIPPLANEn macros are defined to provide a convenient way to enable
	// clipping planes.
	RS_CLIPPLANEENABLE = C.D3DRS_CLIPPLANEENABLE
	// RS_POINTSIZE is a float value that specifies the size to use for point
	// size computation in cases where point size is not specified for each
	// vertex. This value is not used when the vertex contains point size. This
	// value is in screen space units if RS_POINTSCALEENABLE is false;
	// otherwise this value is in world space units. The default value is the
	// value a driver returns. If a driver returns 0 or 1, the default value is
	// 64, which allows software point size emulation.
	// Use Device.SetRenderStateFloat to set this value.
	RS_POINTSIZE = C.D3DRS_POINTSIZE
	// RS_POINTSIZE_MIN is a float value that specifies the minimum size of
	// point primitives. Point primitives are clamped to this size during
	// rendering. Setting this to values smaller than 1.0 results in points
	// dropping out when the point does not cover a pixel center and
	// antialiasing is disabled or being rendered with reduced intensity when
	// antialiasing is enabled. The default value is 1.0f. The range for this
	// value is greater than or equal to 0.0f.
	// Use Device.SetRenderStateFloat to set this value.
	RS_POINTSIZE_MIN = C.D3DRS_POINTSIZE_MIN
	// RS_POINTSPRITEENABLE is a bool value. When true, texture coordinates of
	// point primitives are set so that full textures are mapped on each point.
	// When false, the vertex texture coordinates are used for the entire
	// point. The default value is false. You can achieve DirectX 7 style
	// single-pixel points by setting RS_POINTSCALEENABLE to false and
	// RS_POINTSIZE to 1.0, which are the default values.
	// Use Device.SetRenderStateBool to set this value.
	RS_POINTSPRITEENABLE = C.D3DRS_POINTSPRITEENABLE
	// RS_POINTSCALEENABLE is a bool value that controls computation of size
	// for point primitives. When true, the point size is interpreted as a
	// camera space value and is scaled by the distance function and the
	// frustum to viewport y-axis scaling to compute the final screen-space
	// point size. When false, the point size is interpreted as screen space
	// and used directly. The default value is false.
	// Use Device.SetRenderStateBool to set this value.
	RS_POINTSCALEENABLE = C.D3DRS_POINTSCALEENABLE
	// RS_POINTSCALE_A is a float value that controls for distance-based size
	// attenuation for point primitives. Active only when RS_POINTSCALEENABLE
	// is true. The default value is 1.0f. The range for this value is greater
	// than or equal to 0.0f.
	// Use Device.SetRenderStateFloat to set this value.
	RS_POINTSCALE_A = C.D3DRS_POINTSCALE_A
	// RS_POINTSCALE_B is a float value that controls for distance-based size
	// attenuation for point primitives. Active only when RS_POINTSCALEENABLE
	// is true. The default value is 0.0f. The range for this value is greater
	// than or equal to 0.0f.
	// Use Device.SetRenderStateFloat to set this value.
	RS_POINTSCALE_B = C.D3DRS_POINTSCALE_B
	// RS_POINTSCALE_C is a float value that controls for distance-based size
	// attenuation for point primitives. Active only when RS_POINTSCALEENABLE
	// is true. The default value is 0.0f. The range for this value is greater
	// than or equal to 0.0f.
	// Use Device.SetRenderStateFloat to set this value.
	RS_POINTSCALE_C = C.D3DRS_POINTSCALE_C
	// RS_MULTISAMPLEANTIALIAS is a bool value that determines how individual
	// samples are computed when using a multisample render-target buffer. When
	// set to true, the multiple samples are computed so that full-scene
	// antialiasing is performed by sampling at different sample positions for
	// each multiple sample. When set to false, the multiple samples are all
	// written with the same sample value, sampled at the pixel center, which
	// allows non-antialiased rendering to a multisample buffer. This render
	// state has no effect when rendering to a single sample buffer. The
	// default value is true.
	// Use Device.SetRenderStateBool to set this value.
	RS_MULTISAMPLEANTIALIAS = C.D3DRS_MULTISAMPLEANTIALIAS
	// RS_MULTISAMPLEMASK is a uint32 mask. Each bit in this mask, starting at
	// the least significant bit (LSB), controls modification of one of the
	// samples in a multisample render target. Thus, for an 8-sample render
	// target, the low byte contains the eight write enables for each of the
	// eight samples. This render state has no effect when rendering to a
	// single sample buffer. The default value is 0xFFFFFFFF.
	// This render state enables use of a multisample buffer as an accumulation
	// buffer, doing multipass rendering of geometry where each pass updates a
	// subset of samples.
	// If there are n multisamples and k enabled samples, the resulting
	// intensity of the rendered image should be k/n. Each component RGB of
	// every pixel is factored by k/n.
	RS_MULTISAMPLEMASK = C.D3DRS_MULTISAMPLEMASK
	// RS_PATCHEDGESTYLE sets whether patch edges will use float style
	// tessellation. Possible values are defined by the PATCHEDGESTYLE
	// enumerated type. The default value is PATCHEDGE_DISCRETE.
	RS_PATCHEDGESTYLE = C.D3DRS_PATCHEDGESTYLE
	// RS_DEBUGMONITORTOKEN is set only for debugging the monitor. Possible
	// values are defined by the DEBUGMONITORTOKENS enumerated type. Note that
	// if RS_DEBUGMONITORTOKEN is set, the call is treated as passing a token
	// to the debug monitor. For example, if - after passing DMT_ENABLE or
	// DMT_DISABLE to RS_DEBUGMONITORTOKEN - other token values are passed in,
	// the state (enabled or disabled) of the debug monitor will still persist.
	// This state is only useful for debug builds. The debug monitor defaults
	// to DMT_ENABLE.
	RS_DEBUGMONITORTOKEN = C.D3DRS_DEBUGMONITORTOKEN
	// RS_POINTSIZE_MAX is a float value that specifies the maximum size to
	// which point sprites will be clamped. The value must be less than or
	// equal to the MaxPointSize member of CAPS and greater than or equal to
	// RS_POINTSIZE_MIN. The default value is 64.0.
	// Use Device.SetRenderStateFloat to set this value.
	RS_POINTSIZE_MAX = C.D3DRS_POINTSIZE_MAX
	// RS_INDEXEDVERTEXBLENDENABLE is a bool value that enables or disables
	// indexed vertex blending. The default value is false. When set to true,
	// indexed vertex blending is enabled. When set to false, indexed vertex
	// blending is disabled. If this render state is enabled, the user must
	// pass matrix indices as a packed DWORDwith every vertex. When the render
	// state is disabled and vertex blending is enabled through the
	// RS_VERTEXBLEND state, it is equivalent to having matrix indices 0, 1, 2,
	// 3 in every vertex.
	// Use Device.SetRenderStateBool to set this value.
	RS_INDEXEDVERTEXBLENDENABLE = C.D3DRS_INDEXEDVERTEXBLENDENABLE
	// RS_COLORWRITEENABLE is a uint32 value that enables a per-channel write
	// for the render-target color buffer. A set bit results in the color
	// channel being updated during 3D rendering. A clear bit results in the
	// color channel being unaffected. This functionality is available if the
	// PMISCCAPS_COLORWRITEENABLE capabilities bit is set in the
	// PrimitiveMiscCaps member of the CAPS structure for the device. This
	// render state does not affect the clear operation. The default value is
	// 0x0000000F.
	// Valid values for this render state can be any combination of the
	// COLORWRITEENABLE_ALPHA, COLORWRITEENABLE_BLUE, COLORWRITEENABLE_GREEN,
	// or COLORWRITEENABLE_RED flags.
	RS_COLORWRITEENABLE = C.D3DRS_COLORWRITEENABLE
	// RS_TWEENFACTOR is a float value that controls the tween factor. The
	// default value is 0.0f.
	// Use Device.SetRenderStateFloat to set this value.
	RS_TWEENFACTOR = C.D3DRS_TWEENFACTOR
	// RS_BLENDOP is used to select the arithmetic operation applied when the
	// alpha blending render state, RS_ALPHABLENDENABLE, is set to true. Valid
	// values are defined by the BLENDOP enumerated type. The default value is
	// BLENDOP_ADD.
	// If the PMISCCAPS_BLENDOP device capability is not supported, then
	// BLENDOP_ADD is performed.
	RS_BLENDOP = C.D3DRS_BLENDOP
	// RS_POSITIONDEGREE is the N-patch position interpolation degree. The
	// values can be DEGREE_CUBIC (default) or DEGREE_LINEAR. For more
	// information, see DEGREETYPE.
	RS_POSITIONDEGREE = C.D3DRS_POSITIONDEGREE
	// RS_NORMALDEGREE is the N-patch normal interpolation degree. The values
	// can be DEGREE_LINEAR (default) or DEGREE_QUADRATIC. For more
	// information, see DEGREETYPE.
	RS_NORMALDEGREE = C.D3DRS_NORMALDEGREE
	// RS_SCISSORTESTENABLE can be set to true to enable scissor testing and
	// false to disable it. The default value is false.
	RS_SCISSORTESTENABLE = C.D3DRS_SCISSORTESTENABLE
	// RS_SLOPESCALEDEPTHBIAS is used to determine how much bias can be applied
	// to co-planar primitives to reduce z-fighting. The default value is 0.
	// bias = (max * RS_SLOPESCALEDEPTHBIAS) + RS_DEPTHBIAS.
	// where max is the maximum depth slope of the triangle being rendered.
	RS_SLOPESCALEDEPTHBIAS = C.D3DRS_SLOPESCALEDEPTHBIAS
	// RS_ANTIALIASEDLINEENABLE can be set to true to enable line antialiasing,
	// false to disable line antialiasing. The default value is false.
	// When rendering to a multisample render target, RS_ANTIALIASEDLINEENABLE
	// is ignored and all lines are rendered aliased.
	RS_ANTIALIASEDLINEENABLE = C.D3DRS_ANTIALIASEDLINEENABLE
	// RS_MINTESSELLATIONLEVEL is the minimum tessellation level. The default
	// value is 1.0f.
	RS_MINTESSELLATIONLEVEL = C.D3DRS_MINTESSELLATIONLEVEL
	// RS_MAXTESSELLATIONLEVEL is the maximum tessellation level. The default
	// value is 1.0f.
	RS_MAXTESSELLATIONLEVEL = C.D3DRS_MAXTESSELLATIONLEVEL
	// RS_ADAPTIVETESS_X is the amount to adaptively tessellate, in the x
	// direction. Default value is 0.0f.
	RS_ADAPTIVETESS_X = C.D3DRS_ADAPTIVETESS_X
	// RS_ADAPTIVETESS_Y is the amount to adaptively tessellate, in the y
	// direction. Default value is 0.0f.
	RS_ADAPTIVETESS_Y = C.D3DRS_ADAPTIVETESS_Y
	// RS_ADAPTIVETESS_Z is the amount to adaptively tessellate, in the z
	// direction. Default value is 1.0f.
	RS_ADAPTIVETESS_Z = C.D3DRS_ADAPTIVETESS_Z
	// RS_ADAPTIVETESS_W is the amount to adaptively tessellate, in the w
	// direction. Default value is 0.0f.
	RS_ADAPTIVETESS_W = C.D3DRS_ADAPTIVETESS_W
	// RS_ENABLEADAPTIVETESSELLATION can be set to true to enable adaptive
	// tessellation, false to disable it. The default value is false.
	RS_ENABLEADAPTIVETESSELLATION = C.D3DRS_ENABLEADAPTIVETESSELLATION
	// RS_TWOSIDEDSTENCILMODE can be set to true to enable two-sided
	// stenciling, false disables it. The default value is false. The
	// application should set RS_CULLMODE to CULL_NONE to enable two-sided
	// stencil mode. If the triangle winding order is clockwise, the
	// RS_STENCIL* operations will be used. If the winding order is
	// counterclockwise, the RS_CCW_STENCIL* operations will be used.
	// To see if two-sided stencil is supported, check the StencilCaps member
	// of CAPS for STENCILCAPS_TWOSIDED. See also STENCILCAPS.
	RS_TWOSIDEDSTENCILMODE = C.D3DRS_TWOSIDEDSTENCILMODE
	// RS_CCW_STENCILFAIL is the stencil operation to perform if CCW stencil
	// test fails. Values are from the STENCILOP enumerated type. The default
	// value is STENCILOP_KEEP.
	RS_CCW_STENCILFAIL = C.D3DRS_CCW_STENCILFAIL
	// RS_CCW_STENCILZFAIL is the stencil operation to perform if CCW stencil
	// test passes and z-test fails. Values are from the STENCILOP enumerated
	// type. The default value is STENCILOP_KEEP.
	RS_CCW_STENCILZFAIL = C.D3DRS_CCW_STENCILZFAIL
	// RS_CCW_STENCILPASS is the stencil operation to perform if both CCW
	// stencil and z-tests pass. Values are from the STENCILOP enumerated type.
	// The default value is STENCILOP_KEEP.
	RS_CCW_STENCILPASS = C.D3DRS_CCW_STENCILPASS
	// RS_CCW_STENCILFUNC is the comparison function. CCW stencil test passes
	// if ((ref & mask) stencil function (stencil & mask)) is true. Values are
	// from the CMPFUNC enumerated type. The default value is CMP_ALWAYS.
	RS_CCW_STENCILFUNC = C.D3DRS_CCW_STENCILFUNC
	// RS_COLORWRITEENABLE1 specifies additional ColorWriteEnable values for
	// the devices. See RS_COLORWRITEENABLE. This functionality is available if
	// the PMISCCAPS_INDEPENDENTWRITEMASKS capabilities bit is set in the
	// PrimitiveMiscCaps member of the CAPS structure for the device. The
	// default value is 0x0000000F.
	RS_COLORWRITEENABLE1 = C.D3DRS_COLORWRITEENABLE1
	// RS_COLORWRITEENABLE2 specifies additional ColorWriteEnable values for
	// the devices. See RS_COLORWRITEENABLE. This functionality is available if
	// the PMISCCAPS_INDEPENDENTWRITEMASKS capabilities bit is set in the
	// PrimitiveMiscCaps member of the CAPS structure for the device. The
	// default value is 0x0000000F.
	RS_COLORWRITEENABLE2 = C.D3DRS_COLORWRITEENABLE2
	// RS_COLORWRITEENABLE3 Additional ColorWriteEnable values for the devices.
	// See RS_COLORWRITEENABLE. This functionality is available if the
	// PMISCCAPS_INDEPENDENTWRITEMASKS capabilities bit is set in the
	// PrimitiveMiscCaps member of the CAPS structure for the device. The
	// default value is 0x0000000F.
	RS_COLORWRITEENABLE3 = C.D3DRS_COLORWRITEENABLE3
	// RS_BLENDFACTOR is a COLOR used for a constant blend-factor during alpha
	// blending. This functionality is available if the PBLENDCAPS_BLENDFACTOR
	// capabilities bit is set in the SrcBlendCaps member of CAPS or the
	// DestBlendCaps member of CAPS. See RENDERSTATETYPE. The default value is
	// 0xFFFFFFFF.
	RS_BLENDFACTOR = C.D3DRS_BLENDFACTOR
	// RS_SRGBWRITEENABLE enables render-target writes to be gamma corrected to
	// sRGB. The format must expose USAGE_SRGBWRITE. The default value is 0.
	RS_SRGBWRITEENABLE = C.D3DRS_SRGBWRITEENABLE
	// RS_DEPTHBIAS is a floating-point value that is used for comparison of
	// depth values. The default value is 0.
	// Use Device.SetRenderStateFloat to set this value.
	RS_DEPTHBIAS = C.D3DRS_DEPTHBIAS
	// RS_WRAP8 see RS_WRAP0.
	RS_WRAP8 = C.D3DRS_WRAP8
	// RS_WRAP9 see RS_WRAP0.
	RS_WRAP9 = C.D3DRS_WRAP9
	// RS_WRAP10 see RS_WRAP0.
	RS_WRAP10 = C.D3DRS_WRAP10
	// RS_WRAP11 see RS_WRAP0.
	RS_WRAP11 = C.D3DRS_WRAP11
	// RS_WRAP12 see RS_WRAP0.
	RS_WRAP12 = C.D3DRS_WRAP12
	// RS_WRAP13 see RS_WRAP0.
	RS_WRAP13 = C.D3DRS_WRAP13
	// RS_WRAP14 see RS_WRAP0.
	RS_WRAP14 = C.D3DRS_WRAP14
	// RS_WRAP15 see RS_WRAP0.
	RS_WRAP15 = C.D3DRS_WRAP15
	// RS_SEPARATEALPHABLENDENABLE can be set to true to enable the separate
	// blend mode for the alpha channel. The default value is false.
	// When set to false, the render-target blending factors and operations
	// applied to alpha are forced to be the same as those defined for color.
	// This mode is effectively hardwired to false on implementations that
	// don't set the cap PMISCCAPS_SEPARATEALPHABLEND. See PMISCCAPS.
	// The type of separate alpha blending is determined by the
	// RS_SRCBLENDALPHA and RS_DESTBLENDALPHA render states.
	RS_SEPARATEALPHABLENDENABLE = C.D3DRS_SEPARATEALPHABLENDENABLE
	// RS_SRCBLENDALPHA is one member of the BLEND enumerated type. This value
	// is ignored unless RS_SEPARATEALPHABLENDENABLE is true. The default value
	// is BLEND_ONE.
	RS_SRCBLENDALPHA = C.D3DRS_SRCBLENDALPHA
	// RS_DESTBLENDALPHA is one member of the BLEND enumerated type. This value
	// is ignored unless RS_SEPARATEALPHABLENDENABLE is true. The default value
	// is BLEND_ZERO.
	RS_DESTBLENDALPHA = C.D3DRS_DESTBLENDALPHA
	// RS_BLENDOPALPHA is a value used to select the arithmetic operation
	// applied to separate alpha blending when the render state,
	// RS_SEPARATEALPHABLENDENABLE, is set to true.
	// Valid values are defined by the BLENDOP enumerated type. The default
	// value is BLENDOP_ADD.
	// If the PMISCCAPS_BLENDOP device capability is not supported, then
	// BLENDOP_ADD is performed. See PMISCCAPS.
	RS_BLENDOPALPHA = C.D3DRS_BLENDOPALPHA
)
View Source
const (
	// RTYPE_SURFACE is a surface resource.
	RTYPE_SURFACE = C.D3DRTYPE_SURFACE
	// RTYPE_VOLUME is a volume resource.
	RTYPE_VOLUME = C.D3DRTYPE_VOLUME
	// RTYPE_TEXTURE is a texture resource.
	RTYPE_TEXTURE = C.D3DRTYPE_TEXTURE
	// RTYPE_VOLUMETEXTURE is a volume texture resource.
	RTYPE_VOLUMETEXTURE = C.D3DRTYPE_VOLUMETEXTURE
	// RTYPE_CUBETEXTURE is a cube texture resource.
	RTYPE_CUBETEXTURE = C.D3DRTYPE_CUBETEXTURE
	// RTYPE_VERTEXBUFFER is a vertex buffer resource.
	RTYPE_VERTEXBUFFER = C.D3DRTYPE_VERTEXBUFFER
	// RTYPE_INDEXBUFFER is an index buffer resource.
	RTYPE_INDEXBUFFER = C.D3DRTYPE_INDEXBUFFER
)
View Source
const (
	// STT_UNKNOWN is an uninitialized value. The value of this element is
	// SP_TEXTURETYPE_SHIFT.
	STT_UNKNOWN = C.D3DSTT_UNKNOWN
	// STT_2D declars a 2D texture. The value of this element is
	// SP_TEXTURETYPE_SHIFT * 4.
	STT_2D = C.D3DSTT_2D
	// STT_CUBE declars a cube texture. The value of this element is
	// SP_TEXTURETYPE_SHIFT * 8.
	STT_CUBE = C.D3DSTT_CUBE
	// STT_VOLUME declars a volume texture. The value of this element is
	// SP_TEXTURETYPE_SHIFT * 16.
	STT_VOLUME = C.D3DSTT_VOLUME
)
View Source
const (
	// SAMP_ADDRESSU specifies the texture-address mode for the u coordinate.
	// The default is TADDRESS_WRAP. For more information, see TEXTUREADDRESS.
	SAMP_ADDRESSU = C.D3DSAMP_ADDRESSU
	// SAMP_ADDRESSV specifies the texture-address mode for the v coordinate.
	// The default is TADDRESS_WRAP. For more information, see TEXTUREADDRESS.
	SAMP_ADDRESSV = C.D3DSAMP_ADDRESSV
	// SAMP_ADDRESSW specifies the texture-address mode for the w coordinate.
	// The default is TADDRESS_WRAP. For more information, see TEXTUREADDRESS.
	SAMP_ADDRESSW = C.D3DSAMP_ADDRESSW
	// SAMP_BORDERCOLOR specifies the border color or type COLOR. The default
	// color is 0x00000000.
	SAMP_BORDERCOLOR = C.D3DSAMP_BORDERCOLOR
	// SAMP_MAGFILTER specifies the magnification filter of type
	// TEXTUREFILTERTYPE. The default value is TEXF_POINT.
	SAMP_MAGFILTER = C.D3DSAMP_MAGFILTER
	// SAMP_MINFILTER specifies the minification filter of type
	// TEXTUREFILTERTYPE. The default value is TEXF_POINT.
	SAMP_MINFILTER = C.D3DSAMP_MINFILTER
	// SAMP_MIPFILTER specifies the mipmap filter to use during minification.
	// See TEXTUREFILTERTYPE. The default value is TEXF_NONE.
	SAMP_MIPFILTER = C.D3DSAMP_MIPFILTER
	// SAMP_MIPMAPLODBIAS specifies the mipmap level-of-detail bias. The
	// default value is zero.
	SAMP_MIPMAPLODBIAS = C.D3DSAMP_MIPMAPLODBIAS
	// SAMP_MAXMIPLEVEL specifies the level-of-detail index of the largest map
	// to use. Values range from 0 to (n - 1) where 0 is the largest. The
	// default value is zero.
	SAMP_MAXMIPLEVEL = C.D3DSAMP_MAXMIPLEVEL
	// SAMP_MAXANISOTROPY specifies the maximum anisotropy. Values range from 1
	// to the value that is specified in the MaxAnisotropy member of the CAPS
	// structure. The default value is 1.
	SAMP_MAXANISOTROPY = C.D3DSAMP_MAXANISOTROPY
	// SAMP_SRGBTEXTURE specifies the gamma correction value. The default value
	// is 0, which means gamma is 1.0 and no correction is required. Otherwise,
	// this value means that the sampler should assume gamma of 2.2 on the
	// content and convert it to linear (gamma 1.0) before presenting it to the
	// pixel shader.
	SAMP_SRGBTEXTURE = C.D3DSAMP_SRGBTEXTURE
	// SAMP_ELEMENTINDEX indicates which element index to use, when a
	// multielement texture is assigned to the sampler. The default value is 0.
	SAMP_ELEMENTINDEX = C.D3DSAMP_ELEMENTINDEX
	// SAMP_DMAPOFFSET specifies the vertex offset in the presampled
	// displacement map. This is a constant used by the tessellator, its
	// default value is 0.
	SAMP_DMAPOFFSET = C.D3DSAMP_DMAPOFFSET
)
View Source
const (
	// SHADE_FLAT means flat shading mode. The color and specular component of
	// the first vertex in the triangle are used to determine the color and
	// specular component of the face. These colors remain constant across the
	// triangle; that is, they are not interpolated. The specular alpha is
	// interpolated.
	SHADE_FLAT = C.D3DSHADE_FLAT
	// SHADE_GOURAUD means gouraud shading mode. The color and specular
	// components of the face are determined by a linear interpolation between
	// all three of the triangle's vertices.
	SHADE_GOURAUD = C.D3DSHADE_GOURAUD
	// SHADE_PHONG is not supported.
	SHADE_PHONG = C.D3DSHADE_PHONG
)
View Source
const (
	// SBT_ALL captures the current device state.
	SBT_ALL = C.D3DSBT_ALL
	// SBT_PIXELSTATE capture the current pixel state.
	SBT_PIXELSTATE = C.D3DSBT_PIXELSTATE
	// SBT_VERTEXSTATE capture the current vertex state.
	SBT_VERTEXSTATE = C.D3DSBT_VERTEXSTATE
)
View Source
const (
	// STENCILOP_KEEP does not update the entry in the stencil buffer. This is
	// the default value.
	STENCILOP_KEEP = C.D3DSTENCILOP_KEEP
	// STENCILOP_ZERO sets the stencil-buffer entry to 0.
	STENCILOP_ZERO = C.D3DSTENCILOP_ZERO
	// STENCILOP_REPLACE replaces the stencil-buffer entry with a reference
	// value.
	STENCILOP_REPLACE = C.D3DSTENCILOP_REPLACE
	// STENCILOP_INCRSAT increments the stencil-buffer entry, clamping to the
	// maximum value.
	STENCILOP_INCRSAT = C.D3DSTENCILOP_INCRSAT
	// STENCILOP_DECRSAT decrements the stencil-buffer entry, clamping to zero.
	STENCILOP_DECRSAT = C.D3DSTENCILOP_DECRSAT
	// STENCILOP_INVERT inverts the bits in the stencil-buffer entry.
	STENCILOP_INVERT = C.D3DSTENCILOP_INVERT
	// STENCILOP_INCR increments the stencil-buffer entry, wrapping to zero if
	// the new value exceeds the maximum value.
	STENCILOP_INCR = C.D3DSTENCILOP_INCR
	// STENCILOP_DECR decrements the stencil-buffer entry, wrapping to the
	// maximum value if the new value is less than zero.
	STENCILOP_DECR = C.D3DSTENCILOP_DECR
)
View Source
const (
	// SWAPEFFECT_DISCARD When a swap chain is created with a swap effect of
	// SWAPEFFECT_FLIP or SWAPEFFECT_COPY, the runtime will guarantee that an
	// Device.Present operation will not affect the content of any of the back
	// buffers. Unfortunately, meeting this guarantee can involve substantial
	// video memory or processing overheads, especially when implementing flip
	// semantics for a windowed swap chain or copy semantics for a full-screen
	// swap chain. An application may use the SWAPEFFECT_DISCARD swap effect to
	// avoid these overheads and to enable the display driver to select the
	// most efficient presentation technique for the swap chain. This is also
	// the only swap effect that may be used when specifying a value other than
	// MULTISAMPLE_NONE for the MultiSampleType member of PRESENT_PARAMETERS.
	// Like a swap chain that uses SWAPEFFECT_FLIP, a swap chain that uses
	// SWAPEFFECT_DISCARD might include more than one back buffer, any of which
	// may be accessed using Device.GetBackBuffer or SwapChain.GetBackBuffer.
	// The swap chain is best envisaged as a queue in which 0 always indexes
	// the back buffer that will be displayed by the next Present operation and
	// from which buffers are discarded when they have been displayed.
	// An application that uses this swap effect cannot make any assumptions
	// about the contents of a discarded back buffer and should therefore
	// update an entire back buffer before invoking a Present operation that
	// would display it. Although this is not enforced, the debug version of
	// the runtime will overwrite the contents of discarded back buffers with
	// random data to enable developers to verify that their applications are
	// updating the entire back buffer surfaces correctly.
	SWAPEFFECT_DISCARD = C.D3DSWAPEFFECT_DISCARD
	// SWAPEFFECT_FLIP The swap chain might include multiple back buffers and
	// is best envisaged as a circular queue that includes the front buffer.
	// Within this queue, the back buffers are always numbered sequentially
	// from 0 to (n - 1), where n is the number of back buffers, so that 0
	// denotes the least recently presented buffer. When Present is invoked,
	// the queue is "rotated" so that the front buffer becomes back buffer (n -
	// 1), while the back buffer 0 becomes the new front buffer.
	SWAPEFFECT_FLIP = C.D3DSWAPEFFECT_FLIP
	// SWAPEFFECT_COPY This swap effect may be specified only for a swap chain
	// comprising a single back buffer. Whether the swap chain is windowed or
	// full-screen, the runtime will guarantee the semantics implied by a
	// copy-based Present operation, namely that the operation leaves the
	// content of the back buffer unchanged, instead of replacing it with the
	// content of the front buffer as a flip-based Present operation would.
	// For a full-screen swap chain, the runtime uses a combination of flip
	// operations and copy operations, supported if necessary by hidden back
	// buffers, to accomplish the Present operation. Accordingly, the
	// presentation is synchronized with the display adapter's vertical retrace
	// and its rate is constrained by the chosen presentation interval. A swap
	// chain specified with the PRESENT_INTERVAL_IMMEDIATE flag is the only
	// exception. (Refer to the description of the PresentationIntervals member
	// of the PRESENT_PARAMETERS structure.) In this case, a Present operation
	// copies the back buffer content directly to the front buffer without
	// waiting for the vertical retrace.
	SWAPEFFECT_COPY = C.D3DSWAPEFFECT_COPY
)
View Source
const (
	// TADDRESS_WRAP tiles the texture at every integer junction. For example,
	// for u values between 0 and 3, the texture is repeated three times; no
	// mirroring is performed.
	TADDRESS_WRAP = C.D3DTADDRESS_WRAP
	// TADDRESS_MIRROR is similar to TADDRESS_WRAP, except that the texture is
	// flipped at every integer junction. For u values between 0 and 1, for
	// example, the texture is addressed normally; between 1 and 2, the texture
	// is flipped (mirrored); between 2 and 3, the texture is normal again; and
	// so on.
	TADDRESS_MIRROR = C.D3DTADDRESS_MIRROR
	// TADDRESS_CLAMP means texture coordinates outside the range [0.0, 1.0]
	// are set to the texture color at 0.0 or 1.0, respectively.
	TADDRESS_CLAMP = C.D3DTADDRESS_CLAMP
	// TADDRESS_BORDER means texture coordinates outside the range [0.0, 1.0]
	// are set to the border color.
	TADDRESS_BORDER = C.D3DTADDRESS_BORDER
	// TADDRESS_MIRRORONCE is similar to TADDRESS_MIRROR and TADDRESS_CLAMP.
	// Takes the absolute value of the texture coordinate (thus, mirroring
	// around 0), and then clamps to the maximum value. The most common usage
	// is for volume textures, where support for the full TADDRESS_MIRRORONCE
	// texture-addressing mode is not necessary, but the data is symmetric
	// around the one axis.
	TADDRESS_MIRRORONCE = C.D3DTADDRESS_MIRRORONCE
)
View Source
const (
	// TEXF_NONE when used with SAMP_MIPFILTER, disables mipmapping.
	TEXF_NONE = C.D3DTEXF_NONE
	// TEXF_POINT when used with SAMP_ MAGFILTER or SAMP_MINFILTER, specifies
	// that point filtering is to be used as the texture magnification or
	// minification filter respectively. When used with SAMP_MIPFILTER, enables
	// mipmapping and specifies that the rasterizer chooses the color from the
	// texel of the nearest mip level.
	TEXF_POINT = C.D3DTEXF_POINT
	// TEXF_LINEAR when used with SAMP_ MAGFILTER or SAMP_MINFILTER, specifies
	// that linear filtering is to be used as the texture magnification or
	// minification filter respectively. When used with SAMP_MIPFILTER, enables
	// mipmapping and trilinear filtering; it specifies that the rasterizer
	// interpolates between the two nearest mip levels.
	TEXF_LINEAR = C.D3DTEXF_LINEAR
	// TEXF_ANISOTROPIC when used with SAMP_ MAGFILTER or SAMP_MINFILTER,
	// specifies that anisotropic texture filtering used as a texture
	// magnification or minification filter respectively. Compensates for
	// distortion caused by the difference in angle between the texture polygon
	// and the plane of the screen. Use with SAMP_MIPFILTER is undefined.
	TEXF_ANISOTROPIC = C.D3DTEXF_ANISOTROPIC
	// TEXF_PYRAMIDALQUAD is a 4-sample tent filter used as a texture
	// magnification or minification filter. Use with SAMP_MIPFILTER is
	// undefined.
	TEXF_PYRAMIDALQUAD = C.D3DTEXF_PYRAMIDALQUAD
	// TEXF_GAUSSIANQUAD is a 4-sample Gaussian filter used as a texture
	// magnification or minification filter. Use with SAMP_MIPFILTER is
	// undefined.
	TEXF_GAUSSIANQUAD = C.D3DTEXF_GAUSSIANQUAD
)
View Source
const (
	// TOP_DISABLE disables output from this texture stage and all stages with
	// a higher index. To disable texture mapping, set this as the color
	// operation for the first texture stage (stage 0). Alpha operations cannot
	// be disabled when color operations are enabled. Setting the alpha
	// operation to TOP_DISABLE when color blending is enabled causes undefined
	// behavior.
	TOP_DISABLE = C.D3DTOP_DISABLE
	// TOP_SELECTARG1 uses this texture stage's first color or alpha argument,
	// unmodified, as the output. This operation affects the color argument
	// when used with the TSS_COLOROP texture-stage state, and the alpha
	// argument when used with TSS_ALPHAOP.
	// S(RGBA) = Arg1
	TOP_SELECTARG1 = C.D3DTOP_SELECTARG1
	// TOP_SELECTARG2 Use this texture stage's second color or alpha argument,
	// unmodified, as the output. This operation affects the color argument
	// when used with the D3DTSS_COLOROP texture stage state, and the alpha
	// argument when used with D3DTSS_ALPHAOP.
	// S(RGBA) = Arg2
	TOP_SELECTARG2 = C.D3DTOP_SELECTARG2
	// TOP_MODULATE multiplies the components of the arguments.
	// S(RGBA) = Arg1*Arg2
	TOP_MODULATE = C.D3DTOP_MODULATE
	// TOP_MODULATE2X multiplies the components of the arguments, and shift the
	// products to the left 1 bit (effectively multiplying them by 2) for
	// brightening.
	// S(RGBA) = (Arg1*Arg2)<<1
	TOP_MODULATE2X = C.D3DTOP_MODULATE2X
	// TOP_MODULATE4X multiplies the components of the arguments, and shift the
	// products to the left 2 bits (effectively multiplying them by 4) for
	// brightening.
	// S(RGBA) = (Arg1*Arg2)<<2
	TOP_MODULATE4X = C.D3DTOP_MODULATE4X
	// TOP_ADD adds the components of the arguments.
	// S(RGBA) = Arg1+Arg2
	TOP_ADD = C.D3DTOP_ADD
	// TOP_ADDSIGNED adds the components of the arguments with a - 0.5 bias,
	// making the effective range of values from - 0.5 through 0.5.
	// S(RGBA) = Arg1+Arg2-0.5
	TOP_ADDSIGNED = C.D3DTOP_ADDSIGNED
	// TOP_ADDSIGNED2X adds the components of the arguments with a - 0.5 bias,
	// and shift the products to the left 1 bit.
	// S(RGBA) = (Arg1+Arg2-0.5)<<1
	TOP_ADDSIGNED2X = C.D3DTOP_ADDSIGNED2X
	// TOP_SUBTRACT subtracts the components of the second argument from those
	// of the first argument.
	// S(RGBA) = Arg1-Arg2
	TOP_SUBTRACT = C.D3DTOP_SUBTRACT
	// TOP_ADDSMOOTH adds the first and second arguments; then subtract their
	// product from the sum.
	// S(RGBA) = Arg1+Arg2 - Arg1*Arg2 = Arg1+Arg2*(1-Arg1)
	TOP_ADDSMOOTH = C.D3DTOP_ADDSMOOTH
	// TOP_BLENDDIFFUSEALPHA linearly blends this texture stage, using the
	// interpolated alpha from each vertex.
	// S(RGBA) = Arg1*Alpha + Arg2*(1-Alpha)
	TOP_BLENDDIFFUSEALPHA = C.D3DTOP_BLENDDIFFUSEALPHA
	// TOP_BLENDTEXTUREALPHA linearly blends this texture stage, using the
	// alpha from this stage's texture.
	// S(RGBA) = Arg1*Alpha + Arg2*(1-Alpha)
	TOP_BLENDTEXTUREALPHA = C.D3DTOP_BLENDTEXTUREALPHA
	// TOP_BLENDFACTORALPHA linearly blends this texture stage, using a scalar
	// alpha set with the D3DRS_TEXTUREFACTOR render state.
	// S(RGBA) = Arg1*Alpha + Arg2*(1-Alpha)
	TOP_BLENDFACTORALPHA = C.D3DTOP_BLENDFACTORALPHA
	// TOP_BLENDTEXTUREALPHAPM linearly blends a texture stage that uses a
	// premultiplied alpha.
	// S(RGBA) = Arg1 + Arg2*(1-Alpha)
	TOP_BLENDTEXTUREALPHAPM = C.D3DTOP_BLENDTEXTUREALPHAPM
	// TOP_BLENDCURRENTALPHA linearly blends this texture stage, using the
	// alpha taken from the previous texture stage.
	// S(RGBA) = Arg1*Alpha + Arg2*(1-Alpha)
	TOP_BLENDCURRENTALPHA = C.D3DTOP_BLENDCURRENTALPHA
	// TOP_PREMODULATE is set in stage n. The output of stage n is arg1.
	// Additionally, if there is a texture in stage n + 1, any TA_CURRENT in
	// stage n + 1 is premultiplied by texture in stage n + 1.
	TOP_PREMODULATE = C.D3DTOP_PREMODULATE
	// TOP_MODULATEALPHA_ADDCOLOR modulates the color of the second argument,
	// using the alpha of the first argument; then add the result to argument
	// one. This operation is supported only for color operations
	// (D3DTSS_COLOROP).
	// S(RGBA) = Arg1(RGB)+Arg1(A)*Arg2(RGB)
	TOP_MODULATEALPHA_ADDCOLOR = C.D3DTOP_MODULATEALPHA_ADDCOLOR
	// TOP_MODULATECOLOR_ADDALPHA modulates the arguments; then add the alpha
	// of the first argument. This operation is supported only for color
	// operations (D3DTSS_COLOROP).
	// S(RGBA) = Arg1(RGB)*Arg2(RGB)+Arg1(A)
	TOP_MODULATECOLOR_ADDALPHA = C.D3DTOP_MODULATECOLOR_ADDALPHA
	// TOP_MODULATEINVALPHA_ADDCOLOR is similar to TOP_MODULATEALPHA_ADDCOLOR,
	// but use the inverse of the alpha of the first argument. This operation
	// is supported only for color operations (TSS_COLOROP).
	// S(RGBA) = (1-Arg1(A))*Arg2(RGB)+Arg1(RGB)
	TOP_MODULATEINVALPHA_ADDCOLOR = C.D3DTOP_MODULATEINVALPHA_ADDCOLOR
	// TOP_MODULATEINVCOLOR_ADDALPHA is similar to TOP_MODULATECOLOR_ADDALPHA,
	// but use the inverse of the color of the first argument. This operation
	// is supported only for color operations (TSS_COLOROP).
	// S(RGBA) = (1-Arg1(RGB))*Arg2(RGB)+Arg1(A)
	TOP_MODULATEINVCOLOR_ADDALPHA = C.D3DTOP_MODULATEINVCOLOR_ADDALPHA
	// TOP_BUMPENVMAP performs per-pixel bump mapping, using the environment
	// map in the next texture stage, without luminance. This operation is
	// supported only for color operations (TSS_COLOROP).
	TOP_BUMPENVMAP = C.D3DTOP_BUMPENVMAP
	// TOP_BUMPENVMAPLUMINANCE performs per-pixel bump mapping, using the
	// environment map in the next texture stage, with luminance. This
	// operation is supported only for color operations (TSS_COLOROP).
	TOP_BUMPENVMAPLUMINANCE = C.D3DTOP_BUMPENVMAPLUMINANCE
	// TOP_DOTPRODUCT3 modulates the components of each argument as signed
	// components, add their products; then replicate the sum to all color
	// channels, including alpha. This operation is supported for color and
	// alpha operations.
	// S(RGBA) = Arg1(R)*Arg2(R) + Arg1(G)*Arg2(G) + Arg1(B)*Arg2(B)
	// In DirectX 6 and DirectX 7, multitexture operations the above inputs are
	// all shifted down by half (y = x - 0.5) before use to simulate signed
	// data, and the scalar result is automatically clamped to positive values
	// and replicated to all three output channels. Also, note that as a color
	// operation this does not updated the alpha it just updates the RGB
	// components.
	// However, in DirectX 8.1 shaders you can specify that the output be
	// routed to the .rgb or the .a components or both (the default). You can
	// also specify a separate scalar operation on the alpha channel.
	TOP_DOTPRODUCT3 = C.D3DTOP_DOTPRODUCT3
	// TOP_MULTIPLYADD performs a multiply-accumulate operation. It takes the
	// last two arguments, multiplies them together, and adds them to the
	// remaining input/source argument, and places that into the result.
	// S(RGBA) = Arg1 + Arg2*Arg3
	TOP_MULTIPLYADD = C.D3DTOP_MULTIPLYADD
	// TOP_LERP linearly interpolates between the second and third source
	// arguments by a proportion specified in the first source argument.
	// S(RGBA) = Arg1*Arg2 + (1-Arg1)*Arg3
	TOP_LERP = C.D3DTOP_LERP
)
View Source
const (
	// TSS_COLOROP texture-stage state is a texture color blending operation
	// identified by one member of the TEXTUREOP enumerated type. The default
	// value for the first texture stage (stage 0) is TOP_MODULATE; for all
	// other stages the default is TOP_DISABLE.
	TSS_COLOROP = C.D3DTSS_COLOROP
	// TSS_COLORARG1 texture-stage state is the first color argument for the
	// stage, identified by one of the TA. The default argument is TA_TEXTURE.
	// Specify TA_TEMP to select a temporary register color for read or write.
	// TA_TEMP is supported if the PMISCCAPS_TSSARGTEMP device capability is
	// present. The default value for the register is (0.0, 0.0, 0.0, 0.0).
	TSS_COLORARG1 = C.D3DTSS_COLORARG1
	// TSS_COLORARG2 texture-stage state is the second color argument for the
	// stage, identified by TA. The default argument is TA_CURRENT. Specify
	// TA_TEMP to select a temporary register color for read or write. TA_TEMP
	// is supported if the PMISCCAPS_TSSARGTEMP device capability is present.
	// The default value for the register is (0.0, 0.0, 0.0, 0.0)
	TSS_COLORARG2 = C.D3DTSS_COLORARG2
	// TSS_ALPHAOP texture-stage state is a texture alpha blending operation
	// identified by one member of the TEXTUREOP enumerated type. The default
	// value for the first texture stage (stage 0) is TOP_SELECTARG1, and for
	// all other stages the default is TOP_DISABLE.
	TSS_ALPHAOP = C.D3DTSS_ALPHAOP
	// TSS_ALPHAARG1 texture-stage state is the first alpha argument for the
	// stage, identified by by TA. The default argument is TA_TEXTURE. If no
	// texture is set for this stage, the default argument is TA_DIFFUSE.
	// Specify TA_TEMP to select a temporary register color for read or write.
	// TA_TEMP is supported if the PMISCCAPS_TSSARGTEMP device capability is
	// present. The default value for the register is (0.0, 0.0, 0.0, 0.0).
	TSS_ALPHAARG1 = C.D3DTSS_ALPHAARG1
	// TSS_ALPHAARG2 texture-stage state is the second alpha argument for the
	// stage, identified by by TA. The default argument is TA_CURRENT. Specify
	// TA_TEMP to select a temporary register color for read or write. TA_TEMP
	// is supported if the PMISCCAPS_TSSARGTEMP device capability is present.
	// The default value for the register is (0.0, 0.0, 0.0, 0.0).
	TSS_ALPHAARG2 = C.D3DTSS_ALPHAARG2
	// TSS_BUMPENVMAT00 texture-stage state is a floating-point value for the
	// [0][0] coefficient in a bump-mapping matrix. The default value is 0.0.
	TSS_BUMPENVMAT00 = C.D3DTSS_BUMPENVMAT00
	// TSS_BUMPENVMAT01 texture-stage state is a floating-point value for the
	// [0][1] coefficient in a bump-mapping matrix. The default value is 0.0.
	TSS_BUMPENVMAT01 = C.D3DTSS_BUMPENVMAT01
	// TSS_BUMPENVMAT10 texture-stage state is a floating-point value for the
	// [1][0] coefficient in a bump-mapping matrix. The default value is 0.0.
	TSS_BUMPENVMAT10 = C.D3DTSS_BUMPENVMAT10
	// TSS_BUMPENVMAT11 texture-stage state is a floating-point value for the
	// [1][1] coefficient in a bump-mapping matrix. The default value is 0.0.
	TSS_BUMPENVMAT11 = C.D3DTSS_BUMPENVMAT11
	// TSS_TEXCOORDINDEX is an index of the texture coordinate set to use with
	// this texture stage. You can specify up to eight sets of texture
	// coordinates per vertex. If a vertex does not include a set of texture
	// coordinates at the specified index, the system defaults to the u and v
	// coordinates (0,0).
	// When rendering using vertex shaders, each stage's texture coordinate
	// index must be set to its default value. The default index for each stage
	// is equal to the stage index. Set this state to the zero-based index of
	// the coordinate set for each vertex that this texture stage uses.
	// Additionally, applications can include, as logical OR with the index
	// being set, one of the constants to request that Direct3D automatically
	// generate the input texture coordinates for a texture transformation.
	// With the exception of TSS_TCI_PASSTHRU, which resolves to zero, if any
	// of the following values is included with the index being set, the system
	// uses the index strictly to determine texture wrapping mode. These flags
	// are most useful when performing environment mapping.
	TSS_TEXCOORDINDEX = C.D3DTSS_TEXCOORDINDEX
	// TSS_BUMPENVLSCALE is a floating-point scale value for bump-map
	// luminance. The default value is 0.0.
	TSS_BUMPENVLSCALE = C.D3DTSS_BUMPENVLSCALE
	// TSS_BUMPENVLOFFSET is a floating-point offset value for bump-map
	// luminance. The default value is 0.0.
	TSS_BUMPENVLOFFSET = C.D3DTSS_BUMPENVLOFFSET
	// TSS_TEXTURETRANSFORMFLAGS is a member of the TEXTURETRANSFORMFLAGS
	// enumerated type that controls the transformation of texture coordinates
	// for this texture stage. The default value is TTFF_DISABLE.
	TSS_TEXTURETRANSFORMFLAGS = C.D3DTSS_TEXTURETRANSFORMFLAGS
	// TSS_COLORARG0 specifies settings for the third color operand for triadic
	// operations (multiply, add, and linearly interpolate), identified by TA.
	// This setting is supported if the TEXOPCAPS_MULTIPLYADD or TEXOPCAPS_LERP
	// device capabilities are present. The default argument is TA_CURRENT.
	// Specify TA_TEMP to select a temporary register color for read or write.
	// TA_TEMP is supported if the PMISCCAPS_TSSARGTEMP device capability is
	// present. The default value for the register is (0.0, 0.0, 0.0, 0.0).
	TSS_COLORARG0 = C.D3DTSS_COLORARG0
	// TSS_ALPHAARG0 specifies settings for the alpha channel selector operand
	// for triadic operations (multiply, add, and linearly interpolate),
	// identified by TA. This setting is supported if the TEXOPCAPS_MULTIPLYADD
	// or TEXOPCAPS_LERP device capabilities are present. The default argument
	// is TA_CURRENT. Specify TA_TEMP to select a temporary register color for
	// read or write. TA_TEMP is supported if the PMISCCAPS_TSSARGTEMP device
	// capability is present. The default argument is (0.0, 0.0, 0.0, 0.0).
	TSS_ALPHAARG0 = C.D3DTSS_ALPHAARG0
	// TSS_RESULTARG is a setting to select destination register for the result
	// of this stage, identified by TA. This value can be set to TA_CURRENT
	// (the default value) or to TA_TEMP, which is a single temporary register
	// that can be read into subsequent stages as an input argument. The final
	// color passed to the fog blender and frame buffer is taken from
	// TA_CURRENT, so the last active texture stage state must be set to write
	// to current. This setting is supported if the PMISCCAPS_TSSARGTEMP device
	// capability is present.
	TSS_RESULTARG = C.D3DTSS_RESULTARG
	// TSS_CONSTANT is a per-stage constant color. To see if a device supports
	// a per-stage constant color, see the PMISCCAPS_PERSTAGECONSTANT constant
	// in PMISCCAPS. TSS_CONSTANT is used by TA_CONSTANT.
	TSS_CONSTANT = C.D3DTSS_CONSTANT
)
View Source
const (
	// TTFF_DISABLE means texture coordinates are passed directly to the
	// rasterizer.
	TTFF_DISABLE = C.D3DTTFF_DISABLE
	// TTFF_COUNT1 means the rasterizer should expect 1D texture coordinates.
	// This value is used by fixed function vertex processing; it should be set
	// to 0 when using a programmable vertex shader.
	TTFF_COUNT1 = C.D3DTTFF_COUNT1
	// TTFF_COUNT2 means the rasterizer should expect 2D texture coordinates.
	// This value is used by fixed function vertex processing; it should be set
	// to 0 when using a programmable vertex shader.
	TTFF_COUNT2 = C.D3DTTFF_COUNT2
	// TTFF_COUNT3 means the rasterizer should expect 3D texture coordinates.
	// This value is used by fixed function vertex processing; it should be set
	// to 0 when using a programmable vertex shader.
	TTFF_COUNT3 = C.D3DTTFF_COUNT3
	// TTFF_COUNT4 means the rasterizer should expect 4D texture coordinates.
	// This value is used by fixed function vertex processing; it should be set
	// to 0 when using a programmable vertex shader.
	TTFF_COUNT4 = C.D3DTTFF_COUNT4
	// TTFF_PROJECTED is a flag honored by the fixed function pixel pipeline,
	// as well as the programmable pixel pipeline in versions ps_1_1 to ps_1_3.
	// When texture projection is enabled for a texture stage, all four
	// floating point values must be written to the corresponding texture
	// register. Each texture coordinate is divided by the last element before
	// being passed to the rasterizer. For example, if this flag is specified
	// with the TTFF_COUNT3 flag, the first and second texture coordinates are
	// divided by the third coordinate before being passed to the rasterizer.
	TTFF_PROJECTED = C.D3DTTFF_PROJECTED
)
View Source
const (
	// TS_VIEW identifies the transformation matrix being set as the view
	// transformation matrix. The default value is nil (the identity matrix).
	TS_VIEW = C.D3DTS_VIEW
	// TS_PROJECTION identifies the transformation matrix being set as the
	// projection transformation matrix. The default value is nil (the identity
	// matrix).
	TS_PROJECTION = C.D3DTS_PROJECTION
	// TS_TEXTURE0 identifies the transformation matrix being set for texture
	// stage 0.
	TS_TEXTURE0 = C.D3DTS_TEXTURE0
	// TS_TEXTURE1 identifies the transformation matrix being set for texture
	// stage 1.
	TS_TEXTURE1 = C.D3DTS_TEXTURE1
	// TS_TEXTURE2 identifies the transformation matrix being set for texture
	// stage 2.
	TS_TEXTURE2 = C.D3DTS_TEXTURE2
	// TS_TEXTURE3 identifies the transformation matrix being set for texture
	// stage 3.
	TS_TEXTURE3 = C.D3DTS_TEXTURE3
	// TS_TEXTURE4 identifies the transformation matrix being set for texture
	// stage 4.
	TS_TEXTURE4 = C.D3DTS_TEXTURE4
	// TS_TEXTURE5 identifies the transformation matrix being set for texture
	// stage 5.
	TS_TEXTURE5 = C.D3DTS_TEXTURE5
	// TS_TEXTURE6 identifies the transformation matrix being set for texture
	// stage 6.
	TS_TEXTURE6 = C.D3DTS_TEXTURE6
	// TS_TEXTURE7 identifies the transformation matrix being set for texture
	// stage 7.
	TS_TEXTURE7 = C.D3DTS_TEXTURE7
)
View Source
const (
	// VBF_DISABLE disables vertex blending; apply only the world matrix set by
	// the TS_WORLDMATRIX macro, where the index value for the transformation
	// state is 0.
	VBF_DISABLE = C.D3DVBF_DISABLE
	// VBF_1WEIGHTS enables vertex blending between the two matrices set by the
	// TS_WORLDMATRIX macro, where the index value for the transformation
	// states are 0 and 1.
	VBF_1WEIGHTS = C.D3DVBF_1WEIGHTS
	// VBF_2WEIGHTS enables vertex blending between the three matrices set by
	// the TS_WORLDMATRIX macro, where the index value for the transformation
	// states are 0, 1, and 2.
	VBF_2WEIGHTS = C.D3DVBF_2WEIGHTS
	// VBF_3WEIGHTS enables vertex blending between the four matrices set by
	// the TS_WORLDMATRIX macro, where the index value for the transformation
	// states are 0, 1, 2, and 3.
	VBF_3WEIGHTS = C.D3DVBF_3WEIGHTS
	// VBF_TWEENING means vertex blending is done by using the value assigned
	// to RS_TWEENFACTOR.
	VBF_TWEENING = C.D3DVBF_TWEENING
	// VBF_0WEIGHTS uses a single matrix with a weight of 1.0.
	VBF_0WEIGHTS = C.D3DVBF_0WEIGHTS
)
View Source
const (
	// ZB_FALSE disables depth buffering.
	ZB_FALSE = C.D3DZB_FALSE
	// ZB_TRUE enables z-buffering.
	ZB_TRUE = C.D3DZB_TRUE
	// ZB_USEW enables w-buffering.
	ZB_USEW = C.D3DZB_USEW
)

Variables

This section is empty.

Functions

func Close

func Close()

Close has to be called once after using this library, call Init once before calling any other function. Close will free the d3d9.dll library resource.

func FVFTexCoordSize1

func FVFTexCoordSize1(CoordIndex uint) uint32

FVFTexCoordSize1 constructs bit patterns that are used to identify texture coordinate formats within a FVF description. The results of these macros can be combined within a FVF description by using the OR operator.

func FVFTexCoordSize2

func FVFTexCoordSize2(CoordIndex uint) uint32

FVFTexCoordSize2 constructs bit patterns that are used to identify texture coordinate formats within a FVF description. The results of these macros can be combined within a FVF description by using the OR operator.

func FVFTexCoordSize3

func FVFTexCoordSize3(CoordIndex uint) uint32

FVFTexCoordSize3 constructs bit patterns that are used to identify texture coordinate formats within a FVF description. The results of these macros can be combined within a FVF description by using the OR operator.

func FVFTexCoordSize4

func FVFTexCoordSize4(CoordIndex uint) uint32

FVFTexCoordSize4 constructs bit patterns that are used to identify texture coordinate formats within a FVF description. The results of these macros can be combined within a FVF description by using the OR operator.

func Init

func Init() (err error)

Init loads the d3d9.dll and returns an error if it can not find it. Call init once before using this library and call Close once when you are finished.

func PSVersion

func PSVersion(major, minor uint) uint32

PSVersion creates a pixel shader version token.

func VSVersion

func VSVersion(major, minor uint) uint32

VSVersion creates a vertex shader version token.

Types

type ADAPTER_IDENTIFIER

type ADAPTER_IDENTIFIER struct {
	Driver           [C.MAX_DEVICE_IDENTIFIER_STRING]byte
	Description      [C.MAX_DEVICE_IDENTIFIER_STRING]byte
	DeviceName       [32]byte
	DriverVersion    int64
	VendorId         uint32
	DeviceId         uint32
	SubSysId         uint32
	Revision         uint32
	DeviceIdentifier GUID
	WHQLLevel        uint32
}

ADAPTER_IDENTIFIER contains information identifying the adapter.

type BACKBUFFER_TYPE

type BACKBUFFER_TYPE uint32

BACKBUFFER_TYPE defines constants that describe the type of a back buffer.

type BASISTYPE

type BASISTYPE uint32

BASISTYPE defines the basis type of a high-order patch surface.

type BLEND

type BLEND uint32

BLEND defines the supported blend mode.

type BLENDOP

type BLENDOP uint32

BLENDOP defines the supported blend operations.

type BOX

type BOX struct {
	Left   uint
	Top    uint
	Right  uint
	Bottom uint
	Front  uint
	Back   uint
}

BOX defines a volume.

type BaseTexture

type BaseTexture struct {
	Resource
	// contains filtered or unexported fields
}

BaseTexture and its methods are used to manipulate texture resources including cube and volume textures.

func (BaseTexture) GenerateMipSubLevels

func (obj BaseTexture) GenerateMipSubLevels()

GenerateMipSubLevels generates mip sub levels.

func (BaseTexture) GetAutoGenFilterType

func (obj BaseTexture) GetAutoGenFilterType() TEXTUREFILTERTYPE

GetAutoGenFilterType returns the filter type that is used for automatically generated mipmap sublevels.

func (BaseTexture) GetLOD

func (obj BaseTexture) GetLOD() uint32

GetLOD returns a value clamped to the maximum level-of-detail set for a managed texture (this method is not supported for an unmanaged texture).

func (BaseTexture) GetLevelCount

func (obj BaseTexture) GetLevelCount() uint32

GetLevelCount returns the number of texture levels in a multilevel texture.

func (BaseTexture) Release

func (obj BaseTexture) Release()

Release has to be called when finished using the object to free its associated resources.

func (BaseTexture) SetAutoGenFilterType

func (obj BaseTexture) SetAutoGenFilterType(
	FilterType TEXTUREFILTERTYPE,
) (
	err Error,
)

SetAutoGenFilterType sets the filter type that is used for automatically generated mipmap sublevels.

func (BaseTexture) SetLOD

func (obj BaseTexture) SetLOD(LODNew uint32) uint32

SetLOD sets the most detailed level-of-detail for a managed texture.

type CAPS

type CAPS struct {
	DeviceType                        DEVTYPE
	AdapterOrdinal                    uint
	Caps                              uint32
	Caps2                             uint32
	Caps3                             uint32
	PresentationIntervals             uint32
	CursorCaps                        uint32
	DevCaps                           uint32
	PrimitiveMiscCaps                 uint32
	RasterCaps                        uint32
	ZCmpCaps                          uint32
	SrcBlendCaps                      uint32
	DestBlendCaps                     uint32
	AlphaCmpCaps                      uint32
	ShadeCaps                         uint32
	TextureCaps                       uint32
	TextureFilterCaps                 uint32
	CubeTextureFilterCaps             uint32
	VolumeTextureFilterCaps           uint32
	TextureAddressCaps                uint32
	VolumeTextureAddressCaps          uint32
	LineCaps                          uint32
	MaxTextureWidth                   uint32
	MaxTextureHeight                  uint32
	MaxVolumeExtent                   uint32
	MaxTextureRepeat                  uint32
	MaxTextureAspectRatio             uint32
	MaxAnisotropy                     uint32
	MaxVertexW                        float32
	GuardBandLeft                     float32
	GuardBandTop                      float32
	GuardBandRight                    float32
	GuardBandBottom                   float32
	ExtentsAdjust                     float32
	StencilCaps                       uint32
	FVFCaps                           uint32
	TextureOpCaps                     uint32
	MaxTextureBlendStages             uint32
	MaxSimultaneousTextures           uint32
	VertexProcessingCaps              uint32
	MaxActiveLights                   uint32
	MaxUserClipPlanes                 uint32
	MaxVertexBlendMatrices            uint32
	MaxVertexBlendMatrixIndex         uint32
	MaxPointSize                      float32
	MaxPrimitiveCount                 uint32
	MaxVertexIndex                    uint32
	MaxStreams                        uint32
	MaxStreamStride                   uint32
	VertexShaderVersion               uint32
	MaxVertexShaderConst              uint32
	PixelShaderVersion                uint32
	PixelShader1xMaxValue             float32
	DevCaps2                          uint32
	MasterAdapterOrdinal              uint
	AdapterOrdinalInGroup             uint
	NumberOfAdaptersInGroup           uint
	DeclTypes                         uint32
	NumSimultaneousRTs                uint32
	StretchRectFilterCaps             uint32
	VS20Caps                          VSHADERCAPS2_0
	PS20Caps                          PSHADERCAPS2_0
	VertexTextureFilterCaps           uint32
	MaxVShaderInstructionsExecuted    uint32
	MaxPShaderInstructionsExecuted    uint32
	MaxVertexShader30InstructionSlots uint32
	MaxPixelShader30InstructionSlots  uint32
}

CAPS represents the capabilities of the hardware exposed through the Direct3D object.

type CLIPSTATUS

type CLIPSTATUS struct {
	ClipUnion        uint32
	ClipIntersection uint32
}

CLIPSTATUS describes the current clip status.

type CMPFUNC

type CMPFUNC uint32

CMPFUNC defines the supported compare functions.

type COLOR

type COLOR uint32

COLOR represents a color with red, green, blue and alpha channels, 8 bits each, in a 32 bit unsinged integer.

func ColorARGB

func ColorARGB(a, r, g, b uint8) COLOR

ColorARGB converts the given color channel values to a color. Each channel ranges from 0 (no intensity) to 255 (full intensity).

func ColorAYUV

func ColorAYUV(a, y, u, v uint8) COLOR

ColorAYUV converts the given color channel values to a color. Each channel ranges from 0 (no intensity) to 255 (full intensity).

func ColorRGB

func ColorRGB(r, g, b uint8) COLOR

ColorRGB converts the given color channel values to a color. Each channel ranges from 0 (no intensity) to 255 (full intensity).

func ColorRGBA

func ColorRGBA(r, g, b, a uint8) COLOR

ColorRGBA converts the given color channel values to a color. Each channel ranges from 0 (no intensity) to 255 (full intensity).

func ColorValue

func ColorValue(r, g, b, a float32) COLOR

ColorValue converts the given color channel values to a color. Each channel ranges from 0.0 (no intensity) to 1.0 (full intensity).

func ColorXRGB

func ColorXRGB(r, g, b uint8) COLOR

ColorXRGB converts the given color channel values to a color. Each channel ranges from 0 (no intensity) to 255 (full intensity).

func ColorXYUV

func ColorXYUV(y, u, v uint8) COLOR

ColorXYUV converts the given color channel values to a color. Each channel ranges from 0 (no intensity) to 255 (full intensity).

func ColorYUV

func ColorYUV(y, u, v uint8) COLOR

ColorYUV converts the given color channel values to a color. Each channel ranges from 0 (no intensity) to 255 (full intensity).

type COLORVALUE

type COLORVALUE struct {
	R float32
	G float32
	B float32
	A float32
}

COLORVALUE describes color values.

type CUBEMAP_FACES

type CUBEMAP_FACES uint32

CUBEMAP_FACES defines the faces of a cubemap.

type CULL

type CULL uint32

CULL defines the supported culling modes.

type CubeTexture

type CubeTexture struct {
	BaseTexture
	// contains filtered or unexported fields
}

CubeTexture and its methods are used to manipulate a cube texture resource.

func (CubeTexture) AddDirtyRect

func (obj CubeTexture) AddDirtyRect(
	FaceType CUBEMAP_FACES,
	pDirtyRect *RECT,
) (
	err Error,
)

AddDirtyRect adds a dirty region to a cube texture resource.

func (CubeTexture) GetCubeMapSurface

func (obj CubeTexture) GetCubeMapSurface(
	FaceType CUBEMAP_FACES,
	Level uint,
) (
	ppCubeMapSurface Surface,
	err Error,
)

GetCubeMapSurface retrieves a cube texture map surface.

func (CubeTexture) GetLevelDesc

func (obj CubeTexture) GetLevelDesc(
	Level uint,
) (
	pDesc SURFACE_DESC,
	err Error,
)

GetLevelDesc retrieves a description of one face of the specified cube texture level.

func (CubeTexture) LockRect

func (obj CubeTexture) LockRect(
	FaceType CUBEMAP_FACES,
	Level uint,
	pRect *RECT,
	Flags uint32,
) (
	pLockedRect LOCKED_RECT,
	err Error,
)

LockRect locks a rectangle on a cube texture resource.

func (CubeTexture) Release

func (obj CubeTexture) Release()

Release has to be called when finished using the object to free its associated resources.

func (CubeTexture) UnlockRect

func (obj CubeTexture) UnlockRect(
	FaceType CUBEMAP_FACES,
	Level uint,
) (
	err Error,
)

UnlockRect unlocks a rectangle on a cube texture resource.

type D3DRECT

type D3DRECT struct {
	X1 int32
	Y1 int32
	X2 int32
	Y2 int32
}

D3DRECT defines a rectangle.

type DEBUGMONITORTOKENS

type DEBUGMONITORTOKENS uint32

DEBUGMONITORTOKENS defines the debug monitor tokens.

type DECLMETHOD

type DECLMETHOD byte

DECLMETHOD defines the vertex declaration method which is a predefined operation performed by the tessellator (or any procedural geometry routine on the vertex data during tessellation).

type DECLTYPE

type DECLTYPE byte

DECLTYPE defines a vertex declaration data type.

type DECLUSAGE

type DECLUSAGE byte

DECLUSAGE identifies the intended use of vertex data.

type DEGREETYPE

type DEGREETYPE uint32

DEGREETYPE defines the degree of the variables in the equation that describes a curve.

type DEVICE_CREATION_PARAMETERS

type DEVICE_CREATION_PARAMETERS struct {
	AdapterOrdinal uint
	DeviceType     DEVTYPE
	HFocusWindow   unsafe.Pointer
	BehaviorFlags  uint32
}

DEVICE_CREATION_PARAMETERS describes the creation parameters for a device.

type DEVINFO_D3D9BANDWIDTHTIMINGS

type DEVINFO_D3D9BANDWIDTHTIMINGS struct {
	MaxBandwidthUtilized                float32
	FrontEndUploadMemoryUtilizedPercent float32
	VertexRateUtilizedPercent           float32
	TriangleSetupRateUtilizedPercent    float32
	FillRateUtilizedPercent             float32
}

DEVINFO_D3D9BANDWIDTHTIMINGS contains throughput metrics for help in understanding the performance of an application.

type DEVINFO_D3D9CACHEUTILIZATION

type DEVINFO_D3D9CACHEUTILIZATION struct {
	TextureCacheHitRate             float32
	PostTransformVertexCacheHitRate float32
}

DEVINFO_D3D9CACHEUTILIZATION measures the cache hit rate performance for textures and indexed vertices.

type DEVINFO_D3D9INTERFACETIMINGS

type DEVINFO_D3D9INTERFACETIMINGS struct {
	WaitingForGPUToUseApplicationResourceTimePercent float32
	WaitingForGPUToAcceptMoreCommandsTimePercent     float32
	WaitingForGPUToStayWithinLatencyTimePercent      float32
	WaitingForGPUExclusiveResourceTimePercent        float32
	WaitingForGPUOtherTimePercent                    float32
}

DEVINFO_D3D9INTERFACETIMINGS contains the percent of time processing data in the driver. These statistics may help identify cases when the driver is waiting for other resources.

type DEVINFO_D3D9PIPELINETIMINGS

type DEVINFO_D3D9PIPELINETIMINGS struct {
	VertexProcessingTimePercent   float32
	PixelProcessingTimePercent    float32
	OtherGPUProcessingTimePercent float32
	GPUIdleTimePercent            float32
}

DEVINFO_D3D9PIPELINETIMINGS contains the percent of time processing data in the pipeline.

type DEVINFO_D3D9STAGETIMINGS

type DEVINFO_D3D9STAGETIMINGS struct {
	MemoryProcessingPercent      float32
	ComputationProcessingPercent float32
}

DEVINFO_D3D9STAGETIMINGS contains the percent of time processing shader data.

type DEVINFO_D3DVERTEXSTATS

type DEVINFO_D3DVERTEXSTATS struct {
	NumRenderedTriangles      uint32
	NumExtraClippingTriangles uint32
}

DEVINFO_D3DVERTEXSTATS reports the number of triangles that have been processed and clipped by the runtime's software vertex processing.

type DEVINFO_VCACHE

type DEVINFO_VCACHE struct {
	Pattern     uint32
	OptMethod   uint32
	CacheSize   uint32
	MagicNumber uint32
}

DEVINFO_VCACHE contains vertex cache optimization hints.

type DEVTYPE

type DEVTYPE uint32

DEVTYPE defines device types.

type DISPLAYMODE

type DISPLAYMODE struct {
	Width       uint
	Height      uint
	RefreshRate uint
	Format      FORMAT
}

DISPLAYMODE describes the display mode.

type Device

type Device struct {
	// contains filtered or unexported fields
}

Device and its methods are used to perform DrawPrimitive-based rendering, create resources, work with system-level variables, adjust gamma ramp levels, work with palettes and create shaders.

func (Device) BeginScene

func (obj Device) BeginScene() (err Error)

BeginScene begins a scene. Applications must call BeginScene before performing any rendering and must call EndScene when rendering is complete and before calling BeginScene again.

func (Device) BeginStateBlock

func (obj Device) BeginStateBlock() (err Error)

BeginStateBlock signals Direct3D to begin recording a device-state block.

func (Device) Clear

func (obj Device) Clear(
	pRects []D3DRECT,
	Flags uint32,
	Color COLOR,
	Z float32,
	Stencil uint32,
) (
	err Error,
)

Clear clears one or more surfaces such as a render target, multiple render targets, a stencil buffer, and a depth buffer.

func (Device) ColorFill

func (obj Device) ColorFill(
	pSurface Surface,
	pRect *RECT,
	color COLOR,
) (
	err Error,
)

ColorFill allows an application to fill a rectangular area of a POOL_DEFAULT surface with a specified color.

func (Device) CreateAdditionalSwapChain

func (obj Device) CreateAdditionalSwapChain(
	inpPresentationParameters PRESENT_PARAMETERS,
) (
	ppSwapChain SwapChain,
	outpPresentationParameters PRESENT_PARAMETERS,
	err Error,
)

CreateAdditionalSwapChain creates an additional swap chain for rendering multiple views.

func (Device) CreateCubeTexture

func (obj Device) CreateCubeTexture(
	EdgeLength uint,
	Levels uint,
	Usage uint32,
	Format FORMAT,
	Pool POOL,
	pSharedHandle unsafe.Pointer,
) (
	ppCubeTexture CubeTexture,
	err Error,
)

CreateCubeTexture creates a cube texture resource.

func (Device) CreateDepthStencilSurface

func (obj Device) CreateDepthStencilSurface(
	Width uint,
	Height uint,
	Format FORMAT,
	MultiSample MULTISAMPLE_TYPE,
	MultisampleQuality uint32,
	Discard bool,
	pSharedHandle unsafe.Pointer,
) (
	ppSurface Surface,
	err Error,
)

CreateDepthStencilSurface creates a depth-stencil resource.

func (Device) CreateIndexBuffer

func (obj Device) CreateIndexBuffer(
	Length uint,
	Usage uint32,
	Format FORMAT,
	Pool POOL,
	pSharedHandle unsafe.Pointer,
) (
	ppIndexBuffer IndexBuffer,
	err Error,
)

CreateIndexBuffer creates an index buffer.

func (Device) CreateOffscreenPlainSurface

func (obj Device) CreateOffscreenPlainSurface(
	Width uint,
	Height uint,
	Format FORMAT,
	Pool POOL,
	pSharedHandle unsafe.Pointer,
) (
	ppSurface Surface,
	err Error,
)

CreateOffscreenPlainSurface creates an off-screen surface.

func (Device) CreatePixelShader

func (obj Device) CreatePixelShader(
	pFunction unsafe.Pointer,
) (
	ppShader PixelShader,
	err Error,
)

CreatePixelShader creates a pixel shader.

func (Device) CreatePixelShaderFromBytes

func (obj Device) CreatePixelShaderFromBytes(
	pFunction []byte,
) (
	ppShader PixelShader,
	err Error,
)

CreatePixelShaderFromBytes creates a pixel shader from a byte slice.

func (Device) CreateQuery

func (obj Device) CreateQuery(Type QUERYTYPE) (ppQuery Query, err Error)

CreateQuery creates a status query.

func (Device) CreateRenderTarget

func (obj Device) CreateRenderTarget(
	Width uint,
	Height uint,
	Format FORMAT,
	MultiSample MULTISAMPLE_TYPE,
	MultisampleQuality uint32,
	Lockable bool,
	pSharedHandle unsafe.Pointer,
) (
	ppSurface Surface,
	err Error,
)

CreateRenderTarget creates a render-target surface.

func (Device) CreateStateBlock

func (obj Device) CreateStateBlock(
	Type STATEBLOCKTYPE,
) (
	ppSB StateBlock,
	err Error,
)

CreateStateBlock creates a new state block that contains the values for all device states, vertex-related states, or pixel-related states.

func (Device) CreateTexture

func (obj Device) CreateTexture(
	Width uint,
	Height uint,
	Levels uint,
	Usage uint32,
	Format FORMAT,
	Pool POOL,
	pSharedHandle unsafe.Pointer,
) (
	ppTexture Texture,
	err Error,
)

CreateTexture creates a texture resource.

func (Device) CreateVertexBuffer

func (obj Device) CreateVertexBuffer(
	Length uint,
	Usage uint32,
	FVF uint32,
	Pool POOL,
	pSharedHandle unsafe.Pointer,
) (
	ppVertexBuffer VertexBuffer,
	err Error,
)

CreateVertexBuffer creates a vertex buffer.

func (Device) CreateVertexDeclaration

func (obj Device) CreateVertexDeclaration(
	pVertexElements []VERTEXELEMENT,
) (
	ppDecl VertexDeclaration,
	err Error,
)

CreateVertexDeclaration creates a vertex shader declaration from the device and the vertex elements. The last element should be DeclEnd().

func (Device) CreateVertexShader

func (obj Device) CreateVertexShader(
	pFunction unsafe.Pointer,
) (
	ppShader VertexShader,
	err Error,
)

CreateVertexShader creates a vertex shader.

func (Device) CreateVertexShaderFromBytes

func (obj Device) CreateVertexShaderFromBytes(
	pFunction []byte,
) (
	ppShader VertexShader,
	err Error,
)

CreateVertexShaderFromBytes creates a vertex shader from a byte slice.

func (Device) CreateVolumeTexture

func (obj Device) CreateVolumeTexture(
	Width uint,
	Height uint,
	Depth uint,
	Levels uint,
	Usage uint32,
	Format FORMAT,
	Pool POOL,
	pSharedHandle unsafe.Pointer,
) (
	ppVolumeTexture VolumeTexture,
	err Error,
)

CreateVolumeTexture creates a volume texture resource.

func (Device) DeletePatch

func (obj Device) DeletePatch(Handle uint) (err Error)

DeletePatch frees a cached high-order patch.

func (Device) DrawIndexedPrimitive

func (obj Device) DrawIndexedPrimitive(
	Type PRIMITIVETYPE,
	BaseVertexIndex int,
	MinIndex uint,
	NumVertices uint,
	StartIndex uint,
	PrimitiveCount uint,
) (err Error)

DrawIndexedPrimitive renders the specified geometric primitive into an array of vertices, based on indexing.

func (Device) DrawIndexedPrimitiveUP

func (obj Device) DrawIndexedPrimitiveUP(
	PrimitiveType PRIMITIVETYPE,
	MinVertexIndex uint,
	NumVertices uint,
	PrimitiveCount uint,
	pIndexData unsafe.Pointer,
	IndexDataFormat FORMAT,
	pVertexStreamZeroData unsafe.Pointer,
	VertexStreamZeroStride uint,
) (
	err Error,
)

DrawIndexedPrimitiveUP renders the specified geometric primitive with data specified by a user memory pointer.

func (Device) DrawIndexedPrimitiveUPuint16

func (obj Device) DrawIndexedPrimitiveUPuint16(
	PrimitiveType PRIMITIVETYPE,
	MinVertexIndex uint,
	NumVertices uint,
	PrimitiveCount uint,
	indexData []uint16,
	pVertexStreamZeroData unsafe.Pointer,
	VertexStreamZeroStride uint,
) (
	err Error,
)

DrawIndexedPrimitiveUPuint16 renders the specified geometric primitive with data specified by a user memory pointer.

func (Device) DrawIndexedPrimitiveUPuint32

func (obj Device) DrawIndexedPrimitiveUPuint32(
	PrimitiveType PRIMITIVETYPE,
	MinVertexIndex uint,
	NumVertices uint,
	PrimitiveCount uint,
	indexData []uint32,
	pVertexStreamZeroData unsafe.Pointer,
	VertexStreamZeroStride uint,
) (
	err Error,
)

DrawIndexedPrimitiveUPuint32 renders the specified geometric primitive with data specified by a user memory pointer.

func (Device) DrawPrimitive

func (obj Device) DrawPrimitive(
	PrimitiveType PRIMITIVETYPE,
	StartVertex uint,
	PrimitiveCount uint,
) (
	err Error)

DrawPrimitive renders a sequence of nonindexed, geometric primitives of the specified type from the current set of data input streams.

func (Device) DrawPrimitiveUP

func (obj Device) DrawPrimitiveUP(
	PrimitiveType PRIMITIVETYPE,
	PrimitiveCount uint,
	pVertexStreamZeroData unsafe.Pointer,
	VertexStreamZeroStride uint,
) (
	err Error,
)

DrawPrimitiveUP renders data specified by a user memory pointer as a sequence of geometric primitives of the specified type.

func (Device) DrawRectPatch

func (obj Device) DrawRectPatch(
	Handle uint,
	pNumSegs [4]float32,
	pRectPatchInfo *RECTPATCH_INFO,
) (
	err Error,
)

DrawRectPatch draws a rectangular patch using the currently set streams.

func (Device) DrawTriPatch

func (obj Device) DrawTriPatch(
	Handle uint,
	pNumSegs [3]float32,
	pTriPatchInfo *TRIPATCH_INFO,
) (
	err Error,
)

DrawTriPatch draws a triangular patch using the currently set streams.

func (Device) EndScene

func (obj Device) EndScene() (err Error)

EndScene ends a scene that was begun by calling BeginScene.

func (Device) EndStateBlock

func (obj Device) EndStateBlock() (ppSB StateBlock, err Error)

EndStateBlock signals Direct3D to stop recording a device-state block and retrieve a pointer to the state block interface.

func (Device) EvictManagedResources

func (obj Device) EvictManagedResources() (err Error)

EvictManagedResources evicts all managed resources, including both Direct3D and driver-managed resources.

func (Device) GetAvailableTextureMem

func (obj Device) GetAvailableTextureMem() uint

GetAvailableTextureMem returns an estimate of the amount of available texture memory.

func (Device) GetBackBuffer

func (obj Device) GetBackBuffer(
	iSwapChain uint,
	BackBuffer uint,
	Type BACKBUFFER_TYPE,
) (
	ppBackBuffer Surface,
	err Error,
)

GetBackBuffer retrieves a back buffer from the device's swap chain. Call Release on the returned surface when finished using it.

func (Device) GetClipPlane

func (obj Device) GetClipPlane(Index uint32) (pPlane [4]float32, err Error)

GetClipPlane retrieves the coefficients of a user-defined clipping plane for the device.

func (Device) GetClipStatus

func (obj Device) GetClipStatus() (pClipStatus CLIPSTATUS, err Error)

GetClipStatus retrieves the clip status.

func (Device) GetCreationParameters

func (obj Device) GetCreationParameters() (
	pParameters DEVICE_CREATION_PARAMETERS,
	err Error,
)

GetCreationParameters retrieves the creation parameters of the device.

func (Device) GetCurrentTexturePalette

func (obj Device) GetCurrentTexturePalette() (pPaletteNumber uint, err Error)

GetCurrentTexturePalette retrieves the current texture palette.

func (Device) GetDepthStencilSurface

func (obj Device) GetDepthStencilSurface() (
	ppZStencilSurface Surface,
	err Error,
)

GetDepthStencilSurface returns the depth-stencil surface owned by the Direct3DDevice object. Call Release on the returned surface when finished using it.

func (Device) GetDeviceCaps

func (obj Device) GetDeviceCaps() (pCaps CAPS, err Error)

GetDeviceCaps retrieves the capabilities of the rendering device.

func (Device) GetDirect3D

func (obj Device) GetDirect3D() (ppD3D9 Direct3D, err Error)

GetDirect3D returns an interface to the instance of the Direct3D object that created the device. Call Release on the returned object when finished using it.

func (Device) GetDisplayMode

func (obj Device) GetDisplayMode(
	iSwapChain uint,
) (
	pMode DISPLAYMODE,
	err Error,
)

GetDisplayMode retrieves the display mode's spatial resolution, color resolution, and refresh frequency.

func (Device) GetFVF

func (obj Device) GetFVF() (pFVF uint32, err Error)

GetFVF gets the fixed vertex function declaration.

func (Device) GetFrontBufferData

func (obj Device) GetFrontBufferData(
	iSwapChain uint,
	pDestSurface Surface,
) (
	err Error,
)

GetFrontBufferData generates a copy of the device's front buffer and places that copy in a system memory buffer provided by the application.

func (Device) GetGammaRamp

func (obj Device) GetGammaRamp(iSwapChain uint) (pRamp GAMMARAMP)

GetGammaRamp retrieves the gamma correction ramp for the swap chain.

func (Device) GetIndices

func (obj Device) GetIndices() (ppIndexData IndexBuffer, err Error)

GetIndices retrieves index data.

func (Device) GetLight

func (obj Device) GetLight(Index uint32) (pLight LIGHT, err Error)

GetLight retrieves a set of lighting properties that this device uses.

func (Device) GetLightEnable

func (obj Device) GetLightEnable(Index uint32) (pEnable bool, err Error)

GetLightEnable retrieves the activity status - enabled or disabled - for a set of lighting parameters within a device.

func (Device) GetMaterial

func (obj Device) GetMaterial() (pMaterial MATERIAL, err Error)

GetMaterial retrieves the current material properties for the device.

func (Device) GetNPatchMode

func (obj Device) GetNPatchMode() float32

GetNPatchMode returns the N-patch mode segments.

func (Device) GetNumberOfSwapChains

func (obj Device) GetNumberOfSwapChains() uint

GetNumberOfSwapChains returns the number of implicit swap chains.

func (Device) GetPaletteEntries

func (obj Device) GetPaletteEntries(
	PaletteNumber uint,
) (
	pEntries [256]PALETTEENTRY,
	err Error,
)

GetPaletteEntries retrieves palette entries.

func (Device) GetPixelShader

func (obj Device) GetPixelShader() (ppShader PixelShader, err Error)

GetPixelShader retrieves the currently set pixel shader.

func (Device) GetPixelShaderConstantB

func (obj Device) GetPixelShaderConstantB(
	StartRegister uint,
	pConstantData []bool,
) (
	err Error,
)

GetPixelShaderConstantB returns a Boolean shader constant. The given bool slice is filled with the constant data.

func (Device) GetPixelShaderConstantF

func (obj Device) GetPixelShaderConstantF(
	StartRegister uint,
	pConstantData []float32,
) (
	err Error,
)

GetPixelShaderConstantF returns a floating-point shader constant. The given float slice is filled with the constant data. The length of the slice must be a multiple of four.

func (Device) GetPixelShaderConstantI

func (obj Device) GetPixelShaderConstantI(
	StartRegister uint,
	pConstantData []int32,
) (
	err Error,
)

GetPixelShaderConstantI returns an integer shader constant. The given int slice is filled with the constant data. The length of the slice must be a multiple of four.

func (Device) GetRasterStatus

func (obj Device) GetRasterStatus(
	iSwapChain uint,
) (
	pRasterStatus RASTER_STATUS,
	err Error,
)

GetRasterStatus returns information describing the raster of the monitor on which the swap chain is presented.

func (Device) GetRenderState

func (obj Device) GetRenderState(
	State RENDERSTATETYPE,
) (
	pValue uint32,
	err Error,
)

GetRenderState retrieves a render-state value for a device.

func (Device) GetRenderTarget

func (obj Device) GetRenderTarget(
	RenderTargetIndex uint32,
) (
	ppRenderTarget Surface,
	err Error,
)

GetRenderTarget retrieves a render-target surface.

func (Device) GetRenderTargetData

func (obj Device) GetRenderTargetData(
	pRenderTarget Surface,
	pDestSurface Surface,
) (
	err Error,
)

GetRenderTargetData copies the render-target data from device memory to system memory.

func (Device) GetSamplerState

func (obj Device) GetSamplerState(
	Sampler uint32,
	Type SAMPLERSTATETYPE,
) (
	pValue uint32,
	err Error,
)

GetSamplerState return the sampler state value.

func (Device) GetScissorRect

func (obj Device) GetScissorRect() (pRect RECT, err Error)

GetScissorRect returns the scissor rectangle.

func (Device) GetSoftwareVertexProcessing

func (obj Device) GetSoftwareVertexProcessing() bool

GetSoftwareVertexProcessing returns true if software vertex processing is set. Otherwise, it returns false.

func (Device) GetStreamSource

func (obj Device) GetStreamSource(
	StreamNumber uint,
) (
	ppStreamData VertexBuffer,
	pOffsetInBytes uint,
	pStride uint,
	err Error,
)

GetStreamSource retrieves a vertex buffer bound to the specified data stream.

func (Device) GetStreamSourceFreq

func (obj Device) GetStreamSourceFreq(
	StreamNumber uint,
) (
	pDivider uint,
	err Error,
)

GetStreamSourceFreq returns the stream source frequency divider value.

func (Device) GetSwapChain

func (obj Device) GetSwapChain(
	iSwapChain uint,
) (
	ppSwapChain SwapChain,
	err Error,
)

GetSwapChain returns a pointer to a swap chain.

func (Device) GetTexture

func (obj Device) GetTexture(Stage uint32) (ppTexture BaseTexture, err Error)

GetTexture retrieves a texture assigned to a stage for a device.

func (Device) GetTextureStageState

func (obj Device) GetTextureStageState(
	Stage uint32,
	Type TEXTURESTAGESTATETYPE,
) (
	pValue uint32,
	err Error,
)

GetTextureStageState retrieves a state value for an assigned texture.

func (Device) GetTransform

func (obj Device) GetTransform(
	State TRANSFORMSTATETYPE,
) (
	pMatrix MATRIX,
	err Error,
)

GetTransform retrieves a matrix describing a transformation state.

func (Device) GetVertexDeclaration

func (obj Device) GetVertexDeclaration() (ppDecl VertexDeclaration, err Error)

GetVertexDeclaration returns a vertex shader declaration.

func (Device) GetVertexShader

func (obj Device) GetVertexShader() (ppShader VertexShader, err Error)

GetVertexShader retrieves the currently set vertex shader.

func (Device) GetVertexShaderConstantB

func (obj Device) GetVertexShaderConstantB(
	StartRegister uint,
	pConstantData []bool,
) (
	err Error,
)

GetVertexShaderConstantB returns a Boolean shader constant. The given bool slice is filled with the constant data.

func (Device) GetVertexShaderConstantF

func (obj Device) GetVertexShaderConstantF(
	StartRegister uint,
	pConstantData []float32,
) (
	err Error,
)

GetVertexShaderConstantF returns a floating-point shader constant. The given float slice is filled with the constant data. The length of the slice must be a multiple of four.

func (Device) GetVertexShaderConstantI

func (obj Device) GetVertexShaderConstantI(
	StartRegister uint,
	pConstantData []int32,
) (
	err Error,
)

GetVertexShaderConstantI returns an integer shader constant. The given int slice is filled with the constant data. The length of the slice must be a multiple of four.

func (Device) GetViewport

func (obj Device) GetViewport() (pViewport VIEWPORT, err Error)

GetViewport retrieves the viewport parameters currently set for the device.

func (Device) LightEnable

func (obj Device) LightEnable(LightIndex uint32, bEnable bool) (err Error)

LightEnable enables or disables a set of lighting parameters within a device.

func (Device) MultiplyTransform

func (obj Device) MultiplyTransform(
	State TRANSFORMSTATETYPE,
	pMatrix MATRIX,
) (
	err Error,
)

MultiplyTransform multiplies a device's world, view, or projection matrices by a specified matrix.

func (Device) Present

func (obj Device) Present(
	pSourceRect *RECT,
	pDestRect *RECT,
	hDestWindowOverride unsafe.Pointer,
	pDirtyRegion *RGNDATA,
) (
	err Error,
)

Present presents the contents of the next buffer in the sequence of back buffers owned by the device.

func (Device) ProcessVertices

func (obj Device) ProcessVertices(
	SrcStartIndex uint,
	DestIndex uint,
	VertexCount uint,
	pDestBuffer VertexBuffer,
	pVertexDecl VertexDeclaration,
	Flags uint32,
) (
	err Error,
)

ProcessVertices applies the vertex processing defined by the vertex shader to the set of input data streams, generating a single stream of interleaved vertex data to the destination vertex buffer.

func (Device) Release

func (obj Device) Release()

Release has to be called when finished using the object to free its associated resources.

func (Device) Reset

func (obj Device) Reset(
	inpPresentationParameters PRESENT_PARAMETERS,
) (
	outpPresentationParameters PRESENT_PARAMETERS,
	err Error,
)

Reset resets the type, size, and format of the swap chain.

func (Device) SetClipPlane

func (obj Device) SetClipPlane(Index uint32, pPlane [4]float32) (err Error)

SetClipPlane sets the coefficients of a user-defined clipping plane for the device.

func (Device) SetClipStatus

func (obj Device) SetClipStatus(pClipStatus CLIPSTATUS) (err Error)

SetClipStatus sets the clip status.

func (Device) SetCurrentTexturePalette

func (obj Device) SetCurrentTexturePalette(PaletteNumber uint) (err Error)

SetCurrentTexturePalette sets the current texture palette.

func (Device) SetCursorPosition

func (obj Device) SetCursorPosition(X int, Y int, Flags uint32)

SetCursorPosition sets the cursor position and update options.

func (Device) SetCursorProperties

func (obj Device) SetCursorProperties(
	XHotSpot uint,
	YHotSpot uint,
	pCursorBitmap Surface,
) (
	err Error,
)

SetCursorProperties sets properties for the cursor.

func (Device) SetDepthStencilSurface

func (obj Device) SetDepthStencilSurface(pNewZStencil Surface) (err Error)

SetDepthStencilSurface sets the depth stencil surface.

func (Device) SetDialogBoxMode

func (obj Device) SetDialogBoxMode(bEnableDialogs bool) (err Error)

SetDialogBoxMode allows the use of GDI dialog boxes in full-screen mode applications.

func (Device) SetFVF

func (obj Device) SetFVF(FVF uint32) (err Error)

SetFVF sets the current vertex stream declaration.

func (Device) SetGammaRamp

func (obj Device) SetGammaRamp(iSwapChain uint, Flags uint32, pRamp GAMMARAMP)

SetGammaRamp sets the gamma correction ramp for the implicit swap chain. This method will affect the entire screen (not just the active window if you are running in windowed mode).

func (Device) SetIndices

func (obj Device) SetIndices(pIndexData IndexBuffer) (err Error)

SetIndices sets index data.

func (Device) SetLight

func (obj Device) SetLight(Index uint32, pLight LIGHT) (err Error)

SetLight assigns a set of lighting properties for this device.

func (Device) SetMaterial

func (obj Device) SetMaterial(pMaterial MATERIAL) (err Error)

SetMaterial sets the material properties for the device.

func (Device) SetNPatchMode

func (obj Device) SetNPatchMode(nSegments float32) (err Error)

SetNPatchMode enables or disables N-patches. nSegments specifies the number of subdivision segments. If the number of segments is less than 1.0, N-patches are disabled. The default value is 0.0.

func (Device) SetPaletteEntries

func (obj Device) SetPaletteEntries(
	PaletteNumber uint,
	pEntries [256]PALETTEENTRY,
) (
	err Error,
)

SetPaletteEntries sets palette entries.

func (Device) SetPixelShader

func (obj Device) SetPixelShader(pShader PixelShader) (err Error)

SetPixelShader sets the current pixel shader to a previously created pixel shader.

func (Device) SetPixelShaderConstantB

func (obj Device) SetPixelShaderConstantB(
	StartRegister uint,
	pConstantData []bool,
) (
	err Error,
)

SetPixelShaderConstantB sets a Boolean shader constant.

func (Device) SetPixelShaderConstantF

func (obj Device) SetPixelShaderConstantF(
	StartRegister uint,
	pConstantData []float32,
) (
	err Error,
)

SetPixelShaderConstantF sets a floating-point shader constant. The length of the slice must be a multiple of four.

func (Device) SetPixelShaderConstantI

func (obj Device) SetPixelShaderConstantI(
	StartRegister uint,
	pConstantData []int32,
) (
	err Error,
)

SetPixelShaderConstantI sets an integer shader constant. The length of the slice must be a multiple of four.

func (Device) SetRenderState

func (obj Device) SetRenderState(
	State RENDERSTATETYPE,
	Value uint32,
) (
	err Error,
)

SetRenderState sets a single device render-state parameter.

func (Device) SetRenderStateBool

func (obj Device) SetRenderStateBool(
	State RENDERSTATETYPE,
	Value bool,
) (
	err Error,
)

func (Device) SetRenderStateFloat

func (obj Device) SetRenderStateFloat(
	State RENDERSTATETYPE,
	Value float32,
) (
	err Error,
)

func (Device) SetRenderTarget

func (obj Device) SetRenderTarget(
	RenderTargetIndex uint32,
	pRenderTarget Surface,
) (
	err Error,
)

SetRenderTarget sets a new color buffer for the device.

func (Device) SetSamplerState

func (obj Device) SetSamplerState(
	Sampler uint32,
	Type SAMPLERSTATETYPE,
	Value uint32,
) (
	err Error,
)

SetSamplerState sets the sampler state value.

func (Device) SetScissorRect

func (obj Device) SetScissorRect(pRect RECT) (err Error)

SetScissorRect sets the scissor rectangle.

func (Device) SetSoftwareVertexProcessing

func (obj Device) SetSoftwareVertexProcessing(bSoftware bool) (err Error)

SetSoftwareVertexProcessing can be used to switch between software and hardware vertex processing.

func (Device) SetStreamSource

func (obj Device) SetStreamSource(
	StreamNumber uint,
	pStreamData VertexBuffer,
	OffsetInBytes uint,
	Stride uint,
) (
	err Error,
)

SetStreamSource binds a vertex buffer to a device data stream.

func (Device) SetStreamSourceFreq

func (obj Device) SetStreamSourceFreq(
	StreamNumber uint,
	FrequencyParameter uint,
) (
	err Error,
)

SetStreamSourceFreq sets the stream source frequency divider value. This may be used to draw several instances of geometry.

func (Device) SetTexture

func (obj Device) SetTexture(Sampler uint32, pTexture BaseTexture) (err Error)

SetTexture assigns a texture to a stage for a device.

func (Device) SetTextureStageState

func (obj Device) SetTextureStageState(
	Stage uint32,
	Type TEXTURESTAGESTATETYPE,
	Value uint32,
) (
	err Error,
)

SetTextureStageState sets the state value for the currently assigned texture.

func (Device) SetTransform

func (obj Device) SetTransform(
	State TRANSFORMSTATETYPE,
	pMatrix MATRIX,
) (
	err Error,
)

SetTransform sets a single device transformation-related state.

func (Device) SetVertexDeclaration

func (obj Device) SetVertexDeclaration(pDecl VertexDeclaration) (err Error)

SetVertexDeclaration sets a vertex declaration.

func (Device) SetVertexShader

func (obj Device) SetVertexShader(pShader VertexShader) (err Error)

SetVertexShader sets the vertex shader.

func (Device) SetVertexShaderConstantB

func (obj Device) SetVertexShaderConstantB(
	StartRegister uint,
	pConstantData []bool,
) (
	err Error,
)

SetVertexShaderConstantB sets a Boolean vertex shader constant.

func (Device) SetVertexShaderConstantF

func (obj Device) SetVertexShaderConstantF(
	StartRegister uint,
	pConstantData []float32,
) (
	err Error,
)

SetVertexShaderConstantF sets a floating-point vertex shader constant. The length of the slice must be a multiple of four.

func (Device) SetVertexShaderConstantI

func (obj Device) SetVertexShaderConstantI(
	StartRegister uint,
	pConstantData []int32,
) (
	err Error,
)

SetVertexShaderConstantI sets an integer vertex shader constant. The length of the slice must be a multiple of four.

func (Device) SetViewport

func (obj Device) SetViewport(pViewport VIEWPORT) (err Error)

SetViewport sets the viewport parameters for the device.

func (Device) ShowCursor

func (obj Device) ShowCursor(bShow bool) bool

ShowCursor displays or hides the cursor.

func (Device) StretchRect

func (obj Device) StretchRect(
	pSourceSurface Surface,
	pSourceRect *RECT,
	pDestSurface Surface,
	pDestRect *RECT,
	Filter TEXTUREFILTERTYPE,
) (
	err Error,
)

StretchRect copies the contents of the source rectangle to the destination rectangle. The source rectangle can be stretched and filtered by the copy. This function is often used to change the aspect ratio of a video stream.

func (Device) TestCooperativeLevel

func (obj Device) TestCooperativeLevel() (err Error)

TestCooperativeLevel reports the current cooperative-level status of the Direct3D device for a windowed or full-screen application.

func (Device) UpdateSurface

func (obj Device) UpdateSurface(
	pSourceSurface Surface,
	pSourceRect *RECT,
	pDestinationSurface Surface,
	pDestinationPoint *POINT,
) (
	err Error,
)

UpdateSurface copies rectangular subsets of pixels from one surface to another.

func (Device) UpdateTexture

func (obj Device) UpdateTexture(
	pSourceTexture BaseTexture,
	pDestinationTexture BaseTexture,
) (
	err Error,
)

UpdateTexture updates the dirty portions of a texture.

func (Device) ValidateDevice

func (obj Device) ValidateDevice() (pNumPasses uint32, err Error)

ValidateDevice reports the device's ability to render the current texture-blending operations and arguments in a single pass.

type Direct3D

type Direct3D struct {
	// contains filtered or unexported fields
}

Direct3D and its methods are used to create Direct3D objects and set up the environment. Its interface includes methods for enumerating and retrieving capabilities of the device.

func Create

func Create(version uint) (obj Direct3D, err error)

Create takes the SDK version as argument and returns a new Direct3D object. Use SDK_VERSION as the parameter.

func (Direct3D) CheckDepthStencilMatch

func (obj Direct3D) CheckDepthStencilMatch(
	Adapter uint,
	DeviceType DEVTYPE,
	AdapterFormat FORMAT,
	RenderTargetFormat FORMAT,
	DepthStencilFormat FORMAT,
) (
	err Error,
)

CheckDepthStencilMatch determines whether a depth-stencil format is compatible with a render-target format in a particular display mode.

func (Direct3D) CheckDeviceFormat

func (obj Direct3D) CheckDeviceFormat(
	Adapter uint,
	DeviceType DEVTYPE,
	AdapterFormat FORMAT,
	Usage uint32,
	RType RESOURCETYPE,
	CheckFormat FORMAT,
) (
	err Error,
)

CheckDeviceFormat determines whether a surface format is available as a specified resource type and can be used as a texture, depth-stencil buffer, or render target, or any combination of the three, on a device representing this adapter.

func (Direct3D) CheckDeviceFormatConversion

func (obj Direct3D) CheckDeviceFormatConversion(
	Adapter uint,
	DeviceType DEVTYPE,
	SourceFormat FORMAT,
	TargetFormat FORMAT,
) (
	err Error,
)

CheckDeviceFormatConversion tests the device to see if it supports conversion from one display format to another.

func (Direct3D) CheckDeviceMultiSampleType

func (obj Direct3D) CheckDeviceMultiSampleType(
	Adapter uint,
	DeviceType DEVTYPE,
	SurfaceFormat FORMAT,
	Windowed bool,
	MultiSampleType MULTISAMPLE_TYPE,
) (
	pQualityLevels uint32,
	err Error,
)

CheckDeviceMultiSampleType determines if a multisampling technique is available on this device.

func (Direct3D) CheckDeviceType

func (obj Direct3D) CheckDeviceType(
	Adapter uint,
	DeviceType DEVTYPE,
	DisplayFormat FORMAT,
	BackBufferFormat FORMAT,
	Windowed bool,
) (
	err Error,
)

CheckDeviceType verifies whether a hardware accelerated device type can be used on this adapter.

func (Direct3D) CreateDevice

func (obj Direct3D) CreateDevice(
	Adapter uint,
	DeviceType DEVTYPE,
	hFocusWindow unsafe.Pointer,
	BehaviorFlags uint32,
	inpPresentationParameters PRESENT_PARAMETERS,
) (
	ppReturnedDeviceInterface Device,
	outpPresentationParameters PRESENT_PARAMETERS,
	err Error,
)

CreateDevice reates a device to represent the display adapter.

func (Direct3D) EnumAdapterModes

func (obj Direct3D) EnumAdapterModes(
	Adapter uint,
	Format FORMAT,
	Mode uint,
) (
	pMode DISPLAYMODE,
	err Error,
)

EnumAdapterModes queries the device to determine whether the specified adapter supports the requested format and display mode. This method could be used in a loop to enumerate all the available adapter modes.

func (Direct3D) GetAdapterCount

func (obj Direct3D) GetAdapterCount() uint

GetAdapterCount returns the number of adapters on the system.

func (Direct3D) GetAdapterDisplayMode

func (obj Direct3D) GetAdapterDisplayMode(
	Adapter uint,
) (
	pMode DISPLAYMODE,
	err Error,
)

GetAdapterDisplayMode retrieves the current display mode of the adapter.

func (Direct3D) GetAdapterIdentifier

func (obj Direct3D) GetAdapterIdentifier(
	Adapter uint,
	Flags uint32,
) (
	pIdentifier ADAPTER_IDENTIFIER,
	err Error,
)

GetAdapterIdentifier describes the physical display adapters present in the system when the IDirect3D9 interface was instantiated. Adapter must be a value from 0 to GetAdapterCount()-1.

func (Direct3D) GetAdapterModeCount

func (obj Direct3D) GetAdapterModeCount(Adapter uint, Format FORMAT) uint

GetAdapterModeCount returns the number of display modes available on this adapter.

func (Direct3D) GetAdapterMonitor

func (obj Direct3D) GetAdapterMonitor(Adapter uint) unsafe.Pointer

GetAdapterMonitor returns the handle of the monitor associated with the Direct3D object.

func (Direct3D) GetDeviceCaps

func (obj Direct3D) GetDeviceCaps(
	Adapter uint,
	DeviceType DEVTYPE,
) (
	pCaps CAPS,
	err Error,
)

GetDeviceCaps retrieves device-specific information about a device.

func (Direct3D) RegisterSoftwareDevice

func (obj Direct3D) RegisterSoftwareDevice(
	pInitializeFunction unsafe.Pointer,
) (
	err Error,
)

RegisterSoftwareDevice registers a pluggable software device. Software devices provide software rasterization enabling applications to access a variety of software rasterizers.

func (Direct3D) Release

func (obj Direct3D) Release()

Release has to be called when finished using the object to free its associated resources.

type Error

type Error interface {
	error
	// Code returns the Direct3D error code for a function. Call this function
	// only if the Error is not nil, if the error code is D3D_OK or any other
	// code that signifies success, a function will return nil as the Error
	// instead of a non-nil error with that code in it. This way, functions
	// behave in a standard Go way, returning nil as the error in case of
	// success and only returning non-nil errors if something went wrong.
	Code() int
}

Error is returned by all Direct3D9 functions. It encapsulates the error code returned by Direct3D. If a function succeeds it will return nil as the Error and if it fails you can retrieve the error code using the Code() function. You can check the result against the predefined error codes (like ERR_DEVICELOST, E_OUTOFMEMORY etc).

type FILLMODE

type FILLMODE uint32

FILLMODE defines constants describing the fill mode.

type FOGMODE

type FOGMODE uint32

FOGMODE defines constants that describe the fog mode.

type FORMAT

type FORMAT uint32

FORMAT defines the various types of surface formats.

type GAMMARAMP

type GAMMARAMP struct {
	Red   [256]uint16
	Green [256]uint16
	Blue  [256]uint16
}

GAMMARAMP contains red, green, and blue ramp data.

type GUID

type GUID struct {
	Data1 uint32
	Data2 uint16
	Data3 uint16
	Data4 [8]uint8
}

GUID is a globally unique identifier.

type INDEXBUFFER_DESC

type INDEXBUFFER_DESC struct {
	Format FORMAT
	Type   RESOURCETYPE
	Usage  uint32
	Pool   POOL
	Size   uint
}

INDEXBUFFER_DESC describes an index buffer.

type IndexBuffer

type IndexBuffer struct {
	Resource
	// contains filtered or unexported fields
}

IndexBuffer and its methods are used to manipulate an index buffer resource.

func (IndexBuffer) GetDesc

func (obj IndexBuffer) GetDesc() (pDesc INDEXBUFFER_DESC, err Error)

GetDesc retrieves a description of the index buffer resource.

func (IndexBuffer) Lock

func (obj IndexBuffer) Lock(
	OffsetToLock uint,
	SizeToLock uint,
	Flags uint32,
) (
	data IndexBufferMemory,
	err Error,
)

Lock locks a range of index data and obtains a pointer to the index buffer memory.

func (IndexBuffer) Release

func (obj IndexBuffer) Release()

Release has to be called when finished using the object to free its associated resources.

func (IndexBuffer) Unlock

func (obj IndexBuffer) Unlock() (err Error)

Unlock unlocks index data.

type IndexBufferMemory

type IndexBufferMemory struct {
	Memory unsafe.Pointer
}

IndexBufferMemory encapsulates a raw memory pointer and provides methods to get and set typical slice types.

func (IndexBufferMemory) GetUint16s

func (m IndexBufferMemory) GetUint16s(offsetInBytes int, data []uint16)

GetUint16s copies data from memory to the given slice, starting at the given offset in bytes.

func (IndexBufferMemory) GetUint32s

func (m IndexBufferMemory) GetUint32s(offsetInBytes int, data []uint32)

GetUint32s copies data from memory to the given slice, starting at the given offset in bytes.

func (IndexBufferMemory) SetUint16s

func (m IndexBufferMemory) SetUint16s(offsetInBytes int, data []uint16)

SetUint16s copies the given slice to the memory, starting at the given offset in bytes.

func (IndexBufferMemory) SetUint32s

func (m IndexBufferMemory) SetUint32s(offsetInBytes int, data []uint32)

SetUint32s copies the given slice to the memory, starting at the given offset in bytes.

type LIGHT

type LIGHT struct {
	Type         LIGHTTYPE
	Diffuse      COLORVALUE
	Specular     COLORVALUE
	Ambient      COLORVALUE
	Position     VECTOR
	Direction    VECTOR
	Range        float32
	Falloff      float32
	Attenuation0 float32
	Attenuation1 float32
	Attenuation2 float32
	Theta        float32
	Phi          float32
}

LIGHT defines a set of lighting properties.

type LIGHTTYPE

type LIGHTTYPE uint32

LIGHTTYPE defines the light type.

type LOCKED_BOX

type LOCKED_BOX struct {
	RowPitch   int
	SlicePitch int
	PBits      unsafe.Pointer
}

LOCKED_BOX describes a locked box (volume).

type LOCKED_RECT

type LOCKED_RECT struct {
	Pitch int
	PBits unsafe.Pointer
}

LOCKED_RECT describes a locked rectangular region.

func (LOCKED_RECT) SetAllBytes

func (r LOCKED_RECT) SetAllBytes(data []byte, stride int)

SetAllBytes will fill the whole rect with the given data, taking into account the rect's pitch. The given byte slice is expected to have the given stride in bytes, i.e. one line in the given data is <stride> bytes in length. If the byte slice is tightly packed, stride will be 0.

type LUID

type LUID struct {
	LowPart  uint32
	HighPart int32
}

LUID is a locally unique identifier.

type MATERIAL

type MATERIAL struct {
	Diffuse  COLORVALUE
	Ambient  COLORVALUE
	Specular COLORVALUE
	Emissive COLORVALUE
	Power    float32
}

MATERIAL specifies material properties.

type MATERIALCOLORSOURCE

type MATERIALCOLORSOURCE uint32

MATERIALCOLORSOURCE defines the location at which a color or color component must be accessed for lighting calculations.

type MATRIX

type MATRIX [16]float32

MATRIX escribes a matrix.

type MULTISAMPLE_TYPE

type MULTISAMPLE_TYPE uint32

MULTISAMPLE_TYPE defines the levels of full-scene multisampling that the device can apply.

type PALETTEENTRY

type PALETTEENTRY struct {
	PeRed   byte
	PeGreen byte
	PeBlue  byte
	PeFlags byte
}

PALETTEENTRY specifies the color and usage of an entry in a logical palette.

type PATCHEDGESTYLE

type PATCHEDGESTYLE uint32

PATCHEDGESTYLE defines whether the current tessellation mode is discrete or continuous.

type POINT

type POINT struct {
	X int32
	Y int32
}

POINT describes a 2D point.

type POOL

type POOL uint32

POOL defines the memory class that holds the buffers for a resource.

type PRESENT_PARAMETERS

type PRESENT_PARAMETERS struct {
	BackBufferWidth            uint
	BackBufferHeight           uint
	BackBufferFormat           FORMAT
	BackBufferCount            uint
	MultiSampleType            MULTISAMPLE_TYPE
	MultiSampleQuality         uint32
	SwapEffect                 SWAPEFFECT
	HDeviceWindow              unsafe.Pointer
	Windowed                   bool
	EnableAutoDepthStencil     bool
	AutoDepthStencilFormat     FORMAT
	Flags                      uint32
	FullScreen_RefreshRateInHz uint
	PresentationInterval       uint
}

PRESENT_PARAMETERS describes the presentation parameters.

type PRIMITIVETYPE

type PRIMITIVETYPE uint32

PRIMITIVETYPE defines the primitives supported by Direct3D.

type PSHADERCAPS2_0

type PSHADERCAPS2_0 struct {
	Caps                    uint32
	DynamicFlowControlDepth int
	NumTemps                int
	StaticFlowControlDepth  int
	NumInstructionSlots     int
}

PSHADERCAPS2_0 describes pixel shader driver caps.

type PixelShader

type PixelShader struct {
	// contains filtered or unexported fields
}

PixelShader and its methods are used to manipulate a pixel shader resource.

func (PixelShader) GetDevice

func (obj PixelShader) GetDevice() (ppDevice Device, err Error)

GetDevice returns the device.

func (PixelShader) GetFunction

func (obj PixelShader) GetFunction() (pData []byte, err Error)

GetFunction returns the shader data.

func (PixelShader) Release

func (obj PixelShader) Release()

Release has to be called when finished using the object to free its associated resources.

type QUERYTYPE

type QUERYTYPE byte

QUERYTYPE identifies the query type.

type Query

type Query struct {
	// contains filtered or unexported fields
}

Query and its methods are used to perform asynchronous queries on a driver.

func (Query) GetData

func (obj Query) GetData(pData []byte, dwGetDataFlags uint32) (err Error)

GetData polls a queried resource to get the query state or a query result.

func (Query) GetDataSize

func (obj Query) GetDataSize() uint32

GetDataSize returns the number of bytes in the query data.

func (Query) GetDevice

func (obj Query) GetDevice() (pDevice Device, err Error)

GetDevice returns the device that is being queried.

func (Query) GetType

func (obj Query) GetType() QUERYTYPE

GetType returns the query type.

func (Query) Issue

func (obj Query) Issue(dwIssueFlags uint32) (err Error)

Issue issues a query.

func (Query) Release

func (obj Query) Release()

Release has to be called when finished using the object to free its associated resources.

type RANGE

type RANGE struct {
	Offset uint
	Size   uint
}

RANGE defines a range.

type RASTER_STATUS

type RASTER_STATUS struct {
	InVBlank bool
	ScanLine uint
}

RASTER_STATUS describes the raster status.

type RECT

type RECT struct {
	Left   int32
	Top    int32
	Right  int32
	Bottom int32
}

RECT describes a rectangle.

type RECTPATCH_INFO

type RECTPATCH_INFO struct {
	StartVertexOffsetWidth  uint
	StartVertexOffsetHeight uint
	Width                   uint
	Height                  uint
	Stride                  uint
	Basis                   BASISTYPE
	Degree                  DEGREETYPE
}

RECTPATCH_INFO describes a rectangular high-order patch.

type RENDERSTATETYPE

type RENDERSTATETYPE uint32

RENDERSTATETYPE defines set-up states for all kinds of vertex and pixel processing. Some render states set up vertex processing, and some set up pixel processing. Render states can be saved and restored using stateblocks.

type RESOURCESTATS

type RESOURCESTATS struct {
	BThrashing            bool
	ApproxBytesDownloaded uint32
	NumEvicts             uint32
	NumVidCreates         uint32
	LastPri               uint32
	NumUsed               uint32
	NumUsedInVidMem       uint32
	WorkingSet            uint32
	WorkingSetBytes       uint32
	TotalManaged          uint32
	TotalBytes            uint32
}

RESOURCESTATS contains resource statistics gathered by the DEVINFO_ResourceManager when using the asynchronous query mechanism.

type RESOURCETYPE

type RESOURCETYPE uint32

RESOURCETYPE defines resource types.

type RGNDATA

type RGNDATA struct {
	Rdh    RGNDATAHEADER
	Buffer [1]byte
}

RGNDATA contains region data.

type RGNDATAHEADER

type RGNDATAHEADER struct {
	DwSize   uint32
	IType    uint32
	NCount   uint32
	NRgnSize uint32
	RcBound  RECT
}

RGNDATAHEADER describes region data.

type Resource

type Resource struct {
	// contains filtered or unexported fields
}

Resource and its methods are used to query and prepare resources.

func (Resource) FreePrivateData

func (obj Resource) FreePrivateData(refguid GUID) (err Error)

FreePrivateData frees the specified private data associated with this resource.

func (Resource) GetDevice

func (obj Resource) GetDevice() (ppDevice Device, err Error)

GetDevice retrieves the device associated with a resource. Call Release on the returned device when finished using it.

func (Resource) GetPriority

func (obj Resource) GetPriority() uint32

GetPriority retrieves the priority for this resource.

func (Resource) GetPrivateData

func (obj Resource) GetPrivateData(refguid GUID) (data []byte, err Error)

GetPrivateData copies the private data associated with the resource to a provided buffer.

func (Resource) GetType

func (obj Resource) GetType() RESOURCETYPE

GetType returns the type of the resource.

func (Resource) PreLoad

func (obj Resource) PreLoad()

PreLoad preloads a managed resource.

func (Resource) Release

func (obj Resource) Release()

Release has to be called when finished using the object to free its associated resources.

func (Resource) SetPriority

func (obj Resource) SetPriority(PriorityNew uint32) uint32

SetPriority assigns the priority of a resource for scheduling purposes.

func (Resource) SetPrivateData

func (obj Resource) SetPrivateData(
	refguid GUID,
	pData unsafe.Pointer,
	SizeOfData uint32,
	Flags uint32,
) (
	err Error,
)

SetPrivateData associates data with the resource that is intended for use by the application, not by Direct3D. Data is passed by value, and multiple sets of data can be associated with a single resource.

func (Resource) SetPrivateDataBytes

func (obj Resource) SetPrivateDataBytes(
	refguid GUID,
	data []byte,
	Flags uint32,
) (
	err Error,
)

SetPrivateDataBytes associates data with the resource that is intended for use by the application, not by Direct3D. Data is passed by value, and multiple sets of data can be associated with a single resource.

type SAMPLERSTATETYPE

type SAMPLERSTATETYPE uint32

SAMPLERSTATETYPE defines texture sampling operations such as texture addressing and texture filtering. Some sampler states set-up vertex processing, and some set-up pixel processing. Sampler states can be saved and restored using stateblocks.

type SAMPLER_TEXTURE_TYPE

type SAMPLER_TEXTURE_TYPE uint32

SAMPLER_TEXTURE_TYPE defines the sampler texture types for vertex shaders.

type SHADEMODE

type SHADEMODE uint32

SHADEMODE defines constants that describe the supported shading modes.

type STATEBLOCKTYPE

type STATEBLOCKTYPE uint32

STATEBLOCKTYPE predefines sets of pipeline state used by state blocks.

type STENCILOP

type STENCILOP uint32

STENCILOP defines stencil-buffer operations.

type SURFACE_DESC

type SURFACE_DESC struct {
	Format             FORMAT
	Type               RESOURCETYPE
	Usage              uint32
	Pool               POOL
	MultiSampleType    MULTISAMPLE_TYPE
	MultiSampleQuality uint32
	Width              uint
	Height             uint
}

SURFACE_DESC describes a surface.

type SWAPEFFECT

type SWAPEFFECT uint32

SWAPEFFECT defines swap effects.

type StateBlock

type StateBlock struct {
	// contains filtered or unexported fields
}

StateBlock and its methods are used to encapsulate render states.

func (StateBlock) Apply

func (obj StateBlock) Apply() (err Error)

Apply applies the state block to the current device state.

func (StateBlock) Capture

func (obj StateBlock) Capture() (err Error)

Capture captures the current value of states that are included in a stateblock.

func (StateBlock) GetDevice

func (obj StateBlock) GetDevice() (ppDevice Device, err Error)

GetDevice returns the device.

func (StateBlock) Release

func (obj StateBlock) Release()

Release has to be called when finished using the object to free its associated resources.

type Surface

type Surface struct {
	Resource
	// contains filtered or unexported fields
}

Surface and its methods are used to query and prepare surfaces.

func (Surface) GetContainerCubeTexture

func (obj Surface) GetContainerCubeTexture(
	riid GUID,
) (
	cubeTex CubeTexture,
	err Error,
)

GetContainerCubeTexture provides access to the parent cube texture.

func (Surface) GetContainerSwapChain

func (obj Surface) GetContainerSwapChain(
	riid GUID,
) (
	chain SwapChain,
	err Error,
)

GetContainerSwapChain provides access to the parent swap chain if this surface is a back buffer.

func (Surface) GetContainerTexture

func (obj Surface) GetContainerTexture(
	riid GUID,
) (
	tex Texture,
	err Error,
)

GetContainerTexture provides access to the parent texture.

func (Surface) GetDC

func (obj Surface) GetDC() (phdc unsafe.Pointer, err Error)

GetDC retrieves a device context.

func (Surface) GetDesc

func (obj Surface) GetDesc() (pDesc SURFACE_DESC, err Error)

GetDesc retrieves a description of the surface.

func (Surface) LockRect

func (obj Surface) LockRect(
	pRect *RECT,
	Flags uint32,
) (
	pLockedRect LOCKED_RECT,
	err Error,
)

LockRect locks a rectangle on a surface.

func (Surface) Release

func (obj Surface) Release()

Release has to be called when finished using the object to free its associated resources.

func (Surface) ReleaseDC

func (obj Surface) ReleaseDC(hdc unsafe.Pointer) (err Error)

ReleaseDC releases a device context handle.

func (Surface) UnlockRect

func (obj Surface) UnlockRect() (err Error)

UnlockRect unlocks a rectangle on a surface.

type SwapChain

type SwapChain struct {
	// contains filtered or unexported fields
}

SwapChain and its methods are used to manipulate a swap chain.

func (SwapChain) GetBackBuffer

func (obj SwapChain) GetBackBuffer(
	BackBuffer uint,
	Type BACKBUFFER_TYPE,
) (
	ppBackBuffer Surface,
	err Error,
)

GetBackBuffer retrieves a back buffer from the swap chain of the device. Call Release on the returned surface when finished using it.

func (SwapChain) GetDevice

func (obj SwapChain) GetDevice() (ppDevice Device, err Error)

GetDevice retrieves the device associated with the swap chain. Call Release on the returned device when finished using it.

func (SwapChain) GetDisplayMode

func (obj SwapChain) GetDisplayMode() (pMode DISPLAYMODE, err Error)

GetDisplayMode retrieves the display mode's spatial resolution, color resolution, and refresh frequency.

func (SwapChain) GetFrontBufferData

func (obj SwapChain) GetFrontBufferData(pDestSurface Surface) (err Error)

GetFrontBufferData generates a copy of the swapchain's front buffer and places that copy in a system memory buffer provided by the application. Call Release on the returned surface when finished using it.

func (SwapChain) GetPresentParameters

func (obj SwapChain) GetPresentParameters() (
	pPresentationParameters PRESENT_PARAMETERS,
	err Error,
)

GetPresentParameters retrieves the presentation parameters associated with a swap chain.

func (SwapChain) GetRasterStatus

func (obj SwapChain) GetRasterStatus() (
	pRasterStatus RASTER_STATUS,
	err Error,
)

GetRasterStatus returns information describing the raster of the monitor on which the swap chain is presented.

func (SwapChain) Present

func (obj SwapChain) Present(
	pSourceRect *RECT,
	pDestRect *RECT,
	hDestWindowOverride unsafe.Pointer,
	pDirtyRegion *RGNDATA,
	dwFlags uint32,
) (
	err Error,
)

Present presents the contents of the next buffer in the sequence of back buffers owned by the swap chain.

func (SwapChain) Release

func (obj SwapChain) Release()

Release has to be called when finished using the object to free its associated resources.

type TEXTUREADDRESS

type TEXTUREADDRESS uint32

TEXTUREADDRESS defines constants that describe the supported texture-addressing modes.

type TEXTUREFILTERTYPE

type TEXTUREFILTERTYPE uint32

TEXTUREFILTERTYPE defines texture filtering modes for a texture stage.

type TEXTUREOP

type TEXTUREOP uint32

TEXTUREOP defines per-stage texture-blending operations.

type TEXTURESTAGESTATETYPE

type TEXTURESTAGESTATETYPE uint32

TEXTURESTAGESTATETYPE defines multi-blender texture operations. Some sampler states set up vertex processing, and some set up pixel processing. Texture stage states can be saved and restored using stateblocks.

type TEXTURETRANSFORMFLAGS

type TEXTURETRANSFORMFLAGS uint32

TEXTURETRANSFORMFLAGS defines texture coordinate transformation values.

type TRANSFORMSTATETYPE

type TRANSFORMSTATETYPE uint32

TRANSFORMSTATETYPE defines constants that describe transformation state values.

func TSWorldMatrix

func TSWorldMatrix(index int) TRANSFORMSTATETYPE

TSWorldMatrix maps indices in the range 0 through 255 to the corresponding transform states.

type TRIPATCH_INFO

type TRIPATCH_INFO struct {
	StartVertexOffset uint
	NumVertices       uint
	Basis             BASISTYPE
	Degree            DEGREETYPE
}

TRIPATCH_INFO describes a triangular high-order patch.

type Texture

type Texture struct {
	BaseTexture
	// contains filtered or unexported fields
}

Texture and its methods are used to manipulate a texture resource.

func (Texture) AddDirtyRect

func (obj Texture) AddDirtyRect(pDirtyRect *RECT) (err Error)

AddDirtyRect adds a dirty region to a texture resource.

func (Texture) GetLevelDesc

func (obj Texture) GetLevelDesc(Level uint) (pDesc SURFACE_DESC, err Error)

GetLevelDesc retrieves a level description of a texture resource.

func (Texture) GetSurfaceLevel

func (obj Texture) GetSurfaceLevel(
	Level uint,
) (
	ppSurfaceLevel Surface,
	err Error,
)

GetSurfaceLevel retrieves the specified texture surface level.

func (Texture) LockRect

func (obj Texture) LockRect(
	Level uint,
	pRect *RECT,
	Flags uint32,
) (
	pLockedRect LOCKED_RECT,
	err Error,
)

LockRect locks a rectangle on a texture resource.

func (Texture) Release

func (obj Texture) Release()

Release has to be called when finished using the object to free its associated resources.

func (Texture) UnlockRect

func (obj Texture) UnlockRect(Level uint) (err Error)

UnlockRect unlocks a rectangle on a texture resource.

type VECTOR

type VECTOR struct {
	X float32
	Y float32
	Z float32
}

VECTOR defines a vector.

type VERTEXBLENDFLAGS

type VERTEXBLENDFLAGS uint16

VERTEXBLENDFLAGS defines flags used to control the number or matrices that the system applies when performing multimatrix vertex blending.

type VERTEXBUFFER_DESC

type VERTEXBUFFER_DESC struct {
	Format FORMAT
	Type   RESOURCETYPE
	Usage  uint32
	Pool   POOL
	Size   uint
	FVF    uint32
}

VERTEXBUFFER_DESC describes a vertex buffer.

type VERTEXELEMENT

type VERTEXELEMENT struct {
	Stream     uint16
	Offset     uint16
	Type       DECLTYPE
	Method     DECLMETHOD
	Usage      DECLUSAGE
	UsageIndex byte
}

VERTEXELEMENT defines the vertex data layout. Each vertex can contain one or more data types, and each data type is described by a vertex element.

func DeclEnd

func DeclEnd() VERTEXELEMENT

DeclEnd marks the end of a slice of VERTEXELEMENTs.

type VIEWPORT

type VIEWPORT struct {
	X      uint32
	Y      uint32
	Width  uint32
	Height uint32
	MinZ   float32
	MaxZ   float32
}

VIEWPORT defines the window dimensions of a render-target surface onto which a 3D volume projects.

type VOLUME_DESC

type VOLUME_DESC struct {
	Format FORMAT
	Type   RESOURCETYPE
	Usage  uint32
	Pool   POOL
	Width  uint
	Height uint
	Depth  uint
}

VOLUME_DESC describes a volume.

type VSHADERCAPS2_0

type VSHADERCAPS2_0 struct {
	Caps                    uint32
	DynamicFlowControlDepth int
	NumTemps                int
	StaticFlowControlDepth  int
}

VSHADERCAPS2_0 contains vertex shader capabilities.

type VertexBuffer

type VertexBuffer struct {
	Resource
	// contains filtered or unexported fields
}

VertexBuffer and its methods are used to manipulate vertex buffer resources.

func (VertexBuffer) GetDesc

func (obj VertexBuffer) GetDesc() (pDesc VERTEXBUFFER_DESC, err Error)

GetDesc retrieves a description of the vertex buffer resource.

func (VertexBuffer) Lock

func (obj VertexBuffer) Lock(
	OffsetToLock uint,
	SizeToLock uint,
	Flags uint32,
) (
	data VertexBufferMemory,
	err Error,
)

Lock locks a range of vertex data and obtains a pointer to the vertex buffer memory.

func (VertexBuffer) Release

func (obj VertexBuffer) Release()

Release has to be called when finished using the object to free its associated resources.

func (VertexBuffer) Unlock

func (obj VertexBuffer) Unlock() (err Error)

Unlock unlocks vertex data.

type VertexBufferMemory

type VertexBufferMemory struct {
	Memory unsafe.Pointer
}

VertexBufferMemory encapsulates a raw memory pointer and provides methods to get and set typical slice types.

func (VertexBufferMemory) GetBytes

func (m VertexBufferMemory) GetBytes(offsetInBytes int, data []byte)

GetBytes copies data from memory to the given slice, starting at the given offset in bytes.

func (VertexBufferMemory) GetFloat32s

func (m VertexBufferMemory) GetFloat32s(offsetInBytes int, data []float32)

GetFloat32s copies data from memory to the given slice, starting at the given offset in bytes.

func (VertexBufferMemory) GetFloat64s

func (m VertexBufferMemory) GetFloat64s(offsetInBytes int, data []float64)

GetFloat64s copies data from memory to the given slice, starting at the given offset in bytes.

func (VertexBufferMemory) GetInt16s

func (m VertexBufferMemory) GetInt16s(offsetInBytes int, data []int16)

GetInt16s copies data from memory to the given slice, starting at the given offset in bytes.

func (VertexBufferMemory) GetInt32s

func (m VertexBufferMemory) GetInt32s(offsetInBytes int, data []int32)

GetInt32s copies data from memory to the given slice, starting at the given offset in bytes.

func (VertexBufferMemory) GetInt8s

func (m VertexBufferMemory) GetInt8s(offsetInBytes int, data []int8)

GetInt8s copies data from memory to the given slice, starting at the given offset in bytes.

func (VertexBufferMemory) GetUint16s

func (m VertexBufferMemory) GetUint16s(offsetInBytes int, data []uint16)

GetUint16s copies data from memory to the given slice, starting at the given offset in bytes.

func (VertexBufferMemory) GetUint32s

func (m VertexBufferMemory) GetUint32s(offsetInBytes int, data []uint32)

GetUint32s copies data from memory to the given slice, starting at the given offset in bytes.

func (VertexBufferMemory) GetUint8s

func (m VertexBufferMemory) GetUint8s(offsetInBytes int, data []uint8)

GetUint8s copies data from memory to the given slice, starting at the given offset in bytes.

func (VertexBufferMemory) SetBytes

func (m VertexBufferMemory) SetBytes(offsetInBytes int, data []byte)

SetBytes copies the given slice to the memory, starting at the given offset in bytes.

func (VertexBufferMemory) SetFloat32s

func (m VertexBufferMemory) SetFloat32s(offsetInBytes int, data []float32)

SetFloat32s copies the given slice to the memory, starting at the given offset in bytes.

func (VertexBufferMemory) SetFloat64s

func (m VertexBufferMemory) SetFloat64s(offsetInBytes int, data []float64)

SetFloat64s copies the given slice to the memory, starting at the given offset in bytes.

func (VertexBufferMemory) SetInt16s

func (m VertexBufferMemory) SetInt16s(offsetInBytes int, data []int16)

SetInt16s copies the given slice to the memory, starting at the given offset in bytes.

func (VertexBufferMemory) SetInt32s

func (m VertexBufferMemory) SetInt32s(offsetInBytes int, data []int32)

SetInt32s copies the given slice to the memory, starting at the given offset in bytes.

func (VertexBufferMemory) SetInt8s

func (m VertexBufferMemory) SetInt8s(offsetInBytes int, data []int8)

SetInt8s copies the given slice to the memory, starting at the given offset in bytes.

func (VertexBufferMemory) SetUint16s

func (m VertexBufferMemory) SetUint16s(offsetInBytes int, data []uint16)

SetUint16s copies the given slice to the memory, starting at the given offset in bytes.

func (VertexBufferMemory) SetUint32s

func (m VertexBufferMemory) SetUint32s(offsetInBytes int, data []uint32)

SetUint32s copies the given slice to the memory, starting at the given offset in bytes.

func (VertexBufferMemory) SetUint8s

func (m VertexBufferMemory) SetUint8s(offsetInBytes int, data []uint8)

SetUint8s copies the given slice to the memory, starting at the given offset in bytes.

type VertexDeclaration

type VertexDeclaration struct {
	// contains filtered or unexported fields
}

VertexDeclaration and its methods are used to encapsulate the vertex shader declaration.

func (VertexDeclaration) GetDeclaration

func (obj VertexDeclaration) GetDeclaration() (
	pDecl []VERTEXELEMENT,
	err Error,
)

GetDeclaration returns the vertex shader declaration.

func (VertexDeclaration) GetDevice

func (obj VertexDeclaration) GetDevice() (ppDevice Device, err Error)

GetDevice returns the current device.

func (VertexDeclaration) Release

func (obj VertexDeclaration) Release()

Release has to be called when finished using the object to free its associated resources.

type VertexShader

type VertexShader struct {
	// contains filtered or unexported fields
}

VertexShader and its methods are used to encapsulate the functionality of a vertex shader.

func (VertexShader) GetDevice

func (obj VertexShader) GetDevice() (ppDevice Device, err Error)

GetDevice retrieves the device.

func (VertexShader) GetFunction

func (obj VertexShader) GetFunction() (pData []byte, err Error)

GetFunction returns the shader data.

func (VertexShader) Release

func (obj VertexShader) Release()

Release has to be called when finished using the object to free its associated resources.

type Volume

type Volume struct {
	// contains filtered or unexported fields
}

Volume and its methods are used to manipulate volume resources.

func (Volume) FreePrivateData

func (obj Volume) FreePrivateData(refguid GUID) (err Error)

FreePrivateData frees the specified private data associated with this volume.

func (Volume) GetContainer

func (obj Volume) GetContainer(
	riid GUID,
) (
	ppContainer VolumeTexture,
	err Error,
)

GetContainer provides access to the parent volume texture object, if this surface is a child level of a volume texture. Call Release on the returned volume texture when finished using it.

func (Volume) GetDesc

func (obj Volume) GetDesc() (pDesc VOLUME_DESC, err Error)

GetDesc retrieves a description of the volume.

func (Volume) GetDevice

func (obj Volume) GetDevice() (ppDevice Device, err Error)

GetDevice retrieves the device associated with a volume.

func (Volume) GetPrivateData

func (obj Volume) GetPrivateData(refguid GUID) (pData []byte, err Error)

GetPrivateData copies the private data associated with the volume to a provided buffer.

func (Volume) LockBox

func (obj Volume) LockBox(
	pBox *BOX,
	Flags uint32,
) (
	pLockedVolume LOCKED_BOX,
	err Error,
)

LockBox locks a box on a volume resource.

func (Volume) Release

func (obj Volume) Release()

Release has to be called when finished using the object to free its associated resources.

func (Volume) SetPrivateData

func (obj Volume) SetPrivateData(
	refguid GUID,
	pData unsafe.Pointer,
	SizeOfData uint32,
	Flags uint32,
) (
	err Error,
)

SetPrivateData associates data with the volume that is intended for use by the application, not by Direct3D.

func (Volume) SetPrivateDataInBytes

func (obj Volume) SetPrivateDataInBytes(
	refguid GUID,
	data []byte,
	Flags uint32,
) (
	err Error,
)

SetPrivateDataInBytes associates data with the volume that is intended for use by the application, not by Direct3D.

func (Volume) UnlockBox

func (obj Volume) UnlockBox() (err Error)

UnlockBox unlocks a box on a volume resource.

type VolumeTexture

type VolumeTexture struct {
	BaseTexture
	// contains filtered or unexported fields
}

VolumeTexture and its methods are used to manipulate a volume texture resource.

func (VolumeTexture) AddDirtyBox

func (obj VolumeTexture) AddDirtyBox(pDirtyBox *BOX) (err Error)

AddDirtyBox adds a dirty region to a volume texture resource.

func (VolumeTexture) GetLevelDesc

func (obj VolumeTexture) GetLevelDesc(
	Level uint,
) (
	pDesc VOLUME_DESC,
	err Error,
)

GetLevelDesc retrieves a level description of a volume texture resource.

func (VolumeTexture) GetVolumeLevel

func (obj VolumeTexture) GetVolumeLevel(
	Level uint,
) (
	ppVolumeLevel Volume,
	err Error,
)

GetVolumeLevel retrieves the specified volume texture level. Call Release on the returned volume when finished using it.

func (VolumeTexture) LockBox

func (obj VolumeTexture) LockBox(
	Level uint,
	pBox *BOX,
	Flags uint32,
) (
	pLockedVolume LOCKED_BOX,
	err Error,
)

LockBox locks a box on a volume texture resource.

func (VolumeTexture) Release

func (obj VolumeTexture) Release()

Release has to be called when finished using the object to free its associated resources.

func (VolumeTexture) UnlockBox

func (obj VolumeTexture) UnlockBox(Level uint) (err Error)

UnlockBox unlocks a box on a volume texture resource.

type ZBUFFERTYPE

type ZBUFFERTYPE uint32

ZBUFFERTYPE defines constants that describe depth-buffer formats.

Directories

Path Synopsis
samples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL