{
///////////////////////////////////////////////////////////////////////////
+ typedef ::ID3D10Device idirect3d_device;
+ typedef ::ID3D10Texture2D idirect3d_texture;
+ //typedef ::IDirect3DTexture10 dx_display_mode_struct;
+ typedef ::D3DFORMAT d3dformat_t;
+
///////////////////////////////////////////////////////////////////////////
namespace graphics
{
using namespace ::roast::directx::graphics;
+
+ typedef ::roast::directx::dx10::idirect3d_device idevice;
+ typedef ::roast::directx::dx10::idirect3d_texture itexture;
+ }
+
+ namespace exception_code_root
+ {
+ enum _
+ {
+ first= 0x10000000,
+ device= 0x10000020,
+ ___tail
+ };
}
}
}
#ifndef __SFJP_ROAST_EX__graphics__directx__dx10__idirect3d_HPP__
#define __SFJP_ROAST_EX__graphics__directx__dx10__idirect3d_HPP__
+#include "roast/graphics/directx/dx10/common.hpp"
+
namespace roast
{
namespace directx
{
- namespace dx9
+ namespace dx10
{
namespace graphics
{
- UINT numModes = 0;
+ /* UINT numModes = 0;
DXGI_MODE_DESC* displayModes = NULL;
DXGI_FORMAT format = DXGI_FORMAT_R32G32B32A32_FLOAT;
displayModes = new DXGI_MODE_DESC[numModes];
// Get the list
- hr = pOutput->GetDisplayModeList( format, 0, &numModes, displayModes);
+ hr = pOutput->GetDisplayModeList( format, 0, &numModes, displayModes);*/
+
+ ////////////
+
+ class first : public first_base
+ {
+ public:
+ enum exception_codes
+ {
+ exception_codes__head = exception_code_root::first,
+
+ get_device_caps__GetDeviceCaps_Failed,
+ get_current_display_mode__GetAdapterDisplayMode_Failed
+ };
+ public:
+ first(){}
+
+ ////////////////////////////////////////////////////////
+
+ ////////////////////////////////////////////////////////
+
+ //idirect3d* get_idirect3d_ptr(){ return get_internal_ptr(); }
+ };
}
}
}
class device : public device_base, public iunknown_<idirect3d_device>
{
public:
- device(first &f,
- UINT Adapter,
- D3DDEVTYPE DeviceType,
- HWND hFocusWindow,
- DWORD BehaviorFlags,
- D3DPRESENT_PARAMETERS* pPresentationParameters)
- {
- if ( pPresentationParameters == NULL )
- throw exception("device::device() pPresentationParameters parametor should be not NULL.");
-
- HRESULT hr = f.get_idirect3d_ptr()->CreateDevice( Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, &m_if );
- if ( hr != D3D_OK )
- throw api_error("IDirect3D9::CreateDevice() Failed.", hr);
- }
idirect3d_device* get_idirect3d_device_ptr(){ return get_internal_ptr(); }
};
#include "roast/graphics/directx/dx9.hpp"
+#include "roast/graphics/directx/dx10.hpp"
#include "roast/windows/window.hpp"
#include "roast/windows/message_loop.hpp"
#include <stdio.h>
-using namespace ::roast::directx::dx9;
+using namespace ::roast::directx::dx10;
void main( void )
{
w.start("hoge",500,500);
graphics::device d(f);
+ graphics::device d2(f);
d.start(w, false);
+ d2.start(w, false);
d.begin_scene();
d.clear(0xff400000);
d.end_scene();
d.present();
+ d2.begin_scene();
+ d2.clear(0xff800000);
+ d2.end_scene();
+ d2.present();
- ::roast::windows::message_loop lp;
+ ::roast::windows::peek_message_loop lp;
lp.start();
//Sleep(1000);
}
>
</File>
</Filter>
+ <Filter
+ Name="dx10"
+ >
+ <File
+ RelativePath="..\..\include\roast\graphics\directx\dx10\common.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\roast\graphics\directx\dx10\dx10.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\roast\graphics\directx\dx10\idirect3d.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\roast\graphics\directx\dx10\idirect3d_device.hpp"
+ >
+ </File>
+ </Filter>
</Filter>
</Filter>
</Filter>