tk11 Namespace Reference

Classes

class  Mapped_Subresource
 Scoped mapped subresource. More...
class  Precision_Clock
 A clock which measures the current system time. More...
class  Secondary_Clock
 A secondary clock which is driven by an input clock. More...
struct  Failed_To_Register_Window_Class
 Failed to register window class. More...
struct  Failed_To_Create_Window
 Failed to create window. More...
struct  Register_Raw_Input_Failed
 Failed to register taw input device. More...
struct  File_Not_Found
 A file was not found. More...
struct  Direct3D_Error
 A Direct3D API function failed. More...
struct  Framework_Parameters
 Framework parameters. More...
class  Framework
 Direct3D Rendering framework. More...
struct  Input_Element_Format
 Get input element format for a vector type. More...
class  D3D11_Rasterizer_Desc
 Direct3D 11 Rasterizer state description. More...
class  D3D11_Depth_Stencil_Desc
 Direct3D 11 Depth/Stencil state description. More...
class  D3D11_Depth_Stencil_View_Desc
 Direct3D 11 Depth/stencil view description. More...
class  Render_Target_Binding
 Automatic binding of a render target. More...
class  D3D11_Texture2D_Desc
 Direct3D 11 2D texture description. More...
struct  Exception
 Exception base class. More...
struct  Window_Parameters
 Window parameters. More...
class  Window
 Direct3D Rendering window. More...

Typedefs

typedef boost::optional< LRESULT > Message_Result
 Optional result of window procedure.
typedef boost::function< void(ID3D11Device_ptr)> Init_Callback
 Callback type for scene initialization.
typedef boost::function< void(ID3D11DeviceContext_ptr,
ID3D11RenderTargetView_ptr,
ID3D11DepthStencilView_ptr)> 
Render_Callback
 Callback type for scene rendering.
typedef boost::function< void(ID3D11DeviceContext_ptr)> Aux_Render_Callback
 Callback type for auxiliary scene rendering.
typedef boost::function< void(const
Duration &)> 
Update_Callback
 Callback type for scene update.
typedef boost::function< void(unsigned
int, unsigned int, bool,
ID3D11Device_ptr,
IDXGISwapChain_ptr,
ID3D11Texture2D_ptr)> 
Resize_Callback
 Callback type for target window resize.
typedef boost::function
< Message_Result(HWND, UINT,
WPARAM, LPARAM)> 
Message_Callback
 Callback type for windows message hook.
typedef boost::function< void()> Deactivate_Callback
 Callback type for window deactivation.
typedef boost::function< void()> Activate_Callback
 Callback type for window activation.
typedef boost::function< void(int,
int)> 
Mouse_Move_Callback
 Callback type for mouse pointer movement.
typedef boost::function< void()> Mouse_Enter_Callback
 Callback type for mouse pointer entering the window.
typedef boost::function< void()> Mouse_Leave_Callback
 Callback type for mouse pointer leaving the window.
typedef boost::function< void(Mouse_Button,
int, int)> 
Mouse_Down_Callback
 Callback type for mouse button press.
typedef boost::function< void(Mouse_Button,
int, int)> 
Mouse_Up_Callback
 Callback type for mouse button release.
typedef boost::function< void(int,
int)> 
Mouse_Motion_Callback
 Callback type for high precision mouse motion.
typedef boost::function< void(int,
int, int)> 
Mouse_Wheel_Callback
 Callback type for mouse wheel motion.
typedef boost::function< void(unsigned
int)> 
Key_Down_Callback
 Callback type for key press.
typedef boost::function< void(unsigned
int)> 
Key_Up_Callback
 Callback type for key release.
typedef boost::function< void(unsigned
int)> 
Key_Repeat_Callback
 Callback type for key repeat.
typedef boost::function< void(unsigned
int)> 
Char_Input_Callback
 Callback type for character input.
typedef boost::intrusive_ptr
< ID3D11Device > 
ID3D11Device_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11DeviceContext > 
ID3D11DeviceContext_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11InputLayout > 
ID3D11InputLayout_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11BlendState > 
ID3D11BlendState_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11RasterizerState > 
ID3D11RasterizerState_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11DepthStencilState > 
ID3D11DepthStencilState_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11RenderTargetView > 
ID3D11RenderTargetView_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11DepthStencilView > 
ID3D11DepthStencilView_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11Buffer > 
ID3D11Buffer_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11Resource > 
ID3D11Resource_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11Texture1D > 
ID3D11Texture1D_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11Texture2D > 
ID3D11Texture2D_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11Texture3D > 
ID3D11Texture3D_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11ShaderResourceView > 
ID3D11ShaderResourceView_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11VertexShader > 
ID3D11VertexShader_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D11PixelShader > 
ID3D11PixelShader_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< IDXGIFactory > 
IDXGIFactory_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< IDXGIAdapter > 
IDXGIAdapter_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< IDXGIDevice > 
IDXGIDevice_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< IDXGIOutput > 
IDXGIOutput_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< IDXGISwapChain > 
IDXGISwapChain_ptr
 Smart pointer to COM interface.
typedef boost::intrusive_ptr
< ID3D10Blob > 
ID3D10Blob_ptr
 Smart pointer to COM interface.
typedef boost::error_info
< detail::hresult_tag, HRESULT > 
errinfo_hresult
 Error information: Result code of a Direct3D function (HRESULT).
typedef boost::posix_time::ptime Time
 Time value type.
typedef
boost::posix_time::time_duration 
Duration
 Time duration type.
typedef std::basic_string< TCHAR > tstring
 A string of TCHAR characters.

Enumerations

enum  Mouse_Button { left_button = 0, middle_button = 1, right_button = 2, extra_button1 = 3, extra_button2 = 4 }
 

Mouse button identifiers.

More...
enum  Active_Condition { active_if_not_minimized = 0, active_always = 1, active_if_activated = 2 }
 

Condition for window being active.

More...
enum  Cursor_Mode { standard_cursor = 0, hide_cursor = 1, manual_cursor = 2 }
 

Strategy for displaying the Windows mouse cursor.

More...

Functions

ID3D11Buffer_ptr create_buffer (ID3D11Device_ptr device, const D3D11_BUFFER_DESC &desc, const D3D11_SUBRESOURCE_DATA &init_data)
 Create a Direct3D buffer.
ID3D11Buffer_ptr create_buffer (ID3D11Device_ptr device, const D3D11_BUFFER_DESC &desc)
 Create a Direct3D buffer without initial data.
template<typename T >
ID3D11Buffer_ptr create_typed_buffer (ID3D11Device_ptr device, const T *data, std::size_t size, UINT bind_flags, D3D11_USAGE usage=D3D11_USAGE_DEFAULT)
 Create a typed Direct3D buffer.
template<typename Vertex >
ID3D11Buffer_ptr create_vertex_buffer (ID3D11Device_ptr device, const Vertex *data, std::size_t size, D3D11_USAGE usage=D3D11_USAGE_DEFAULT)
 Create a Direct3D vertex buffer.
template<typename Index >
ID3D11Buffer_ptr create_index_buffer (ID3D11Device_ptr device, const Index *data, std::size_t size, D3D11_USAGE usage=D3D11_USAGE_DEFAULT)
 Create a Direct3D index buffer.
ID3D11Buffer_ptr create_constant_buffer (ID3D11Device_ptr device, std::size_t size, D3D11_USAGE usage=D3D11_USAGE_DYNAMIC, UINT cpu_access_flags=D3D11_CPU_ACCESS_WRITE)
 Create a Direct3D constant buffer.
ID3D11Buffer_ptr create_constant_buffer (ID3D11Device_ptr device, const void *data, std::size_t size, D3D11_USAGE usage=D3D11_USAGE_IMMUTABLE, UINT cpu_access_flags=0)
 Create an initialized Direct3D constant buffer.
template<typename T >
ID3D11Buffer_ptr create_typed_constant_buffer (ID3D11Device_ptr device, D3D11_USAGE usage=D3D11_USAGE_DYNAMIC, UINT cpu_access_flags=D3D11_CPU_ACCESS_WRITE)
 Create a Direct3D constant buffer for a specific data structure.
template<typename T >
ID3D11Buffer_ptr create_typed_constant_buffer (ID3D11Device_ptr device, const T &data, D3D11_USAGE usage=D3D11_USAGE_IMMUTABLE, UINT cpu_access_flags=0)
 Create a Direct3D constant buffer for a specific data structure.
void update_constant_buffer (ID3D11DeviceContext_ptr context, ID3D11Buffer_ptr buffer, const void *data, std::size_t size)
 Update constant buffer with untyped data.
template<typename T >
void typed_update_constant_buffer (ID3D11DeviceContext_ptr context, ID3D11Buffer_ptr buffer, const T &data)
 Update constant buffer with a specific data structure.
ID3D11InputLayout_ptr create_input_layout (ID3D11Device_ptr device, const D3D11_INPUT_ELEMENT_DESC *elements, UINT num_elements, ID3D10Blob_ptr shader_code)
 Create input layout.
D3D11_INPUT_ELEMENT_DESC make_input_element (DXGI_FORMAT format, const char *semantic_name, UINT semantic_index=0, UINT input_slot=0)
 Make input element.
template<typename T , std::size_t N>
D3D11_INPUT_ELEMENT_DESC make_vector_input_element (const char *semantic_name, UINT semantic_index=0, UINT input_slot=0)
 Make vector-valued input element.
ID3D10Blob_ptr load_compiled_shader (const char *file_name)
 Load a compiled shader.
ID3D11VertexShader_ptr create_vertex_shader (ID3D11Device_ptr device, ID3D10Blob_ptr code)
 Create vertex shader.
ID3D11PixelShader_ptr create_pixel_shader (ID3D11Device_ptr device, ID3D10Blob_ptr code)
 Create pixel shader.
ID3D11DepthStencilState_ptr create_depth_stencil_state (ID3D11Device_ptr device, const D3D11_DEPTH_STENCIL_DESC &desc)
 Create Direct3D 11 depth/stencil state.
ID3D11RasterizerState_ptr create_rasterizer_state (ID3D11Device_ptr device, const D3D11_RASTERIZER_DESC &desc)
 Create Direct3D 11 rasterizer state.
ID3D11BlendState_ptr create_blend_state (ID3D11Device_ptr device, const D3D11_BLEND_DESC &desc)
 Create Direct3D 11 blend state.
ID3D11RenderTargetView_ptr create_render_target_view (ID3D11Device_ptr device, ID3D11Texture2D_ptr texture)
 Create a render target view from a texture.
ID3D11DepthStencilView_ptr create_depth_stencil_view (ID3D11Device_ptr device, ID3D11Texture2D_ptr texture)
 Create a depth/stencil view from a texture.
ID3D11DepthStencilView_ptr create_depth_stencil_view (ID3D11Device_ptr device, ID3D11Texture2D_ptr texture, const D3D11_DEPTH_STENCIL_VIEW_DESC &desc)
 Create a depth/stencil view with specific attributes from a texture.
ID3D11DepthStencilView_ptr create_depth_stencil_view_2d (ID3D11Device_ptr device, unsigned int width, unsigned int height, DXGI_FORMAT format=DXGI_FORMAT_D32_FLOAT)
 Create a 2D depth/stencil view with typical parameters.
ID3D11Texture1D_ptr create_texture_1d (ID3D11Device_ptr device, const D3D11_TEXTURE1D_DESC &desc, const D3D11_SUBRESOURCE_DATA &init_data)
 Create 1D texture.
ID3D11Texture1D_ptr create_texture_1d (ID3D11Device_ptr device, const D3D11_TEXTURE1D_DESC &desc)
 Create uninitialized 1D texture.
ID3D11Texture1D_ptr create_texture_1d (ID3D11Device_ptr device, UINT width, DXGI_FORMAT format, const void *data, UINT mip_levels=1, D3D11_USAGE usage=D3D11_USAGE_IMMUTABLE, UINT cpu_access_flags=0)
 Create 1D texture with typical parameters.
ID3D11Texture1D_ptr create_texture_1d (ID3D11Device_ptr device, UINT width, DXGI_FORMAT format, UINT mip_levels=1, D3D11_USAGE usage=D3D11_USAGE_DYNAMIC, UINT cpu_access_flags=D3D11_CPU_ACCESS_WRITE)
 Create uninitialized 1D texture with typical parameters.
ID3D11Texture2D_ptr create_texture_2d (ID3D11Device_ptr device, const D3D11_TEXTURE2D_DESC &desc, const D3D11_SUBRESOURCE_DATA &init_data)
 Create 2D texture.
ID3D11Texture2D_ptr create_texture_2d (ID3D11Device_ptr device, const D3D11_TEXTURE2D_DESC &desc)
 Create uninitialized 2D texture.
ID3D11Texture2D_ptr create_texture_2d (ID3D11Device_ptr device, UINT width, UINT height, DXGI_FORMAT format, const void *data, std::size_t pitch, UINT mip_levels=1, D3D11_USAGE usage=D3D11_USAGE_IMMUTABLE, UINT cpu_access_flags=0)
 Create 2D texture with typical parameters.
ID3D11Texture2D_ptr create_texture_2d (ID3D11Device_ptr device, UINT width, UINT height, DXGI_FORMAT format, UINT mip_levels=1, D3D11_USAGE usage=D3D11_USAGE_DYNAMIC, UINT cpu_access_flags=D3D11_CPU_ACCESS_WRITE)
 Create uninitialized 2D texture with typical parameters.
ID3D11ShaderResourceView_ptr create_shader_resource_view (ID3D11Device_ptr device, ID3D11Resource_ptr resource, const D3D11_SHADER_RESOURCE_VIEW_DESC &desc)
 Create shader resource view.
ID3D11ShaderResourceView_ptr create_shader_resource_view_1d (ID3D11Device_ptr device, ID3D11Texture1D_ptr resource, DXGI_FORMAT format, UINT most_detailed_mip=0, UINT mip_levels=1)
 Create shader resource view of existing 1D texture.
ID3D11ShaderResourceView_ptr create_shader_resource_view_1d (ID3D11Device_ptr device, const D3D11_TEXTURE1D_DESC &desc, const D3D11_SUBRESOURCE_DATA &init_data, UINT most_detailed_mip=0)
 Create resource view of new 1D texture.
ID3D11ShaderResourceView_ptr create_shader_resource_view_1d (ID3D11Device_ptr device, UINT width, DXGI_FORMAT format, const void *data, UINT mip_levels=1, D3D11_USAGE usage=D3D11_USAGE_IMMUTABLE, UINT cpu_access_flags=0, UINT most_detailed_mip=0)
 Create resource view of new 1D texture with typical parameters.
ID3D11ShaderResourceView_ptr create_shader_resource_view_2d (ID3D11Device_ptr device, ID3D11Texture2D_ptr resource, DXGI_FORMAT format, UINT most_detailed_mip=0, UINT mip_levels=1)
 Create shader resource view of existing 2D texture.
ID3D11ShaderResourceView_ptr create_shader_resource_view_2d (ID3D11Device_ptr device, const D3D11_TEXTURE2D_DESC &desc, const D3D11_SUBRESOURCE_DATA &init_data, UINT most_detailed_mip=0)
 Create resource view of new 2D texture.
ID3D11ShaderResourceView_ptr create_shader_resource_view_2d (ID3D11Device_ptr device, UINT width, UINT height, DXGI_FORMAT format, const void *data, std::size_t pitch, UINT mip_levels=1, D3D11_USAGE usage=D3D11_USAGE_IMMUTABLE, UINT cpu_access_flags=0, UINT most_detailed_mip=0)
 Create resource view of new 2D texture with typical parameters.
template<typename Int >
Int time_div_int (const Duration &t1, const Duration &t2)
 Integer division of time durations.
template<typename Float >
Float time_div_float (const Duration &t1, const Duration &t2)
 Floating-point division of time durations.
void show_error_dialog (const std::string &error_string)
 Show error popup message.
template<class Target , class Source >
boost::intrusive_ptr< Target > query_interface (Source ps, const IID &iid=__uuidof(Target))
 Query a COM interface from another.

Variables

const boost::none_t not_handled = boost::none
 Default result of a window procedure.

Detailed Description

Tk11 Namespace

Tk11 Direct3D 11 Toolkit version 0.2 (SourceForge)
Copyright Florian Winter 2010 - 2010. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Generated on Sun Apr 11 20:23:02 2010 for Tk11 by  doxygen 1.6.3