Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10_1.h|17|warning: ignoring #pragma warning | C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|22|warning: ignoring #pragma warning | C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\dxgi.h|17|warning: ignoring #pragma warning | C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|839|error: `__out' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|839|error: expected `,' or `...' before '*' token| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|839|error: ISO C++ forbids declaration of `ID3D10Device' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|843|error: `__in' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|843|error: expected `,' or `...' before '&' token| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|847|error: ISO C++ forbids declaration of `GUID' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|851|error: `__in' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|851|error: expected `,' or `...' before '&' token| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|855|error: ISO C++ forbids declaration of `GUID' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|859|error: `__in' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|859|error: expected `,' or `...' before '&' token| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|861|error: ISO C++ forbids declaration of `GUID' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1006|error: `UINT8' does not name a type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1007|error: `UINT8' does not name a type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1034|error: `__out' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1034|error: expected `,' or `...' before '*' token| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1034|error: ISO C++ forbids declaration of `D3D10_DEPTH_STENCIL_DESC' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1193|error: `UINT8' does not name a type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1218|error: `__out' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1218|error: expected `,' or `...' before '*' token| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1218|error: ISO C++ forbids declaration of `D3D10_BLEND_DESC' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1364|error: `__out' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1364|error: expected `,' or `...' before '*' token| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1364|error: ISO C++ forbids declaration of `D3D10_RASTERIZER_DESC' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1507|error: `__out' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1507|error: expected `,' or `...' before '*' token| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1507|error: ISO C++ forbids declaration of `D3D10_RESOURCE_DIMENSION' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1511|error: `__in' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1511|error: expected `,' or `...' before "EvictionPriority"| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1511|error: ISO C++ forbids declaration of `UINT' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1693|error: `__in' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1693|error: expected `,' or `...' before "MapType"| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1697|error: ISO C++ forbids declaration of `D3D10_MAP' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1703|error: `__out' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1703|error: expected `,' or `...' before '*' token| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1703|error: ISO C++ forbids declaration of `D3D10_BUFFER_DESC' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1919|error: `__in' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1919|error: expected `,' or `...' before "Subresource"| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1925|error: ISO C++ forbids declaration of `UINT' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1929|error: `__in' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1929|error: expected `,' or `...' before "Subresource"| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1929|error: ISO C++ forbids declaration of `UINT' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1933|error: `__out' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1933|error: expected `,' or `...' before '*' token| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|1933|error: ISO C++ forbids declaration of `D3D10_TEXTURE1D_DESC' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|2167|error: `__in' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|2167|error: expected `,' or `...' before "Subresource"| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|2173|error: ISO C++ forbids declaration of `UINT' with no type| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|2177|error: `__in' has not been declared| C:\Program Files\Microsoft DirectX SDK (August 2009)\Include\d3d10.h|2177|error: expected `,' or `...' before "Subresource"| ||More errors follow but not being shown.| ||Edit the max errors limit in compiler options...| ||=== Build finished: 50 errors, 3 warnings ===| |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
// Initialize Direct2D HRESULT Initialize(HWND hwnd) { // Variables ID2D1Factory* pFactory = NULL; HRESULT hr; RECT rc; ID2D1RenderTarget* pRT = NULL; // Create The single-threaded Factory if(!SUCCEEDED(hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &pFactory))) return -1; // Size of the Window GetClientRect(hwnd, &rc); // Create the render target hr = pFactory->CreateHwndRenderTarget(D2D1::RenderTargetProperties(), D2D1::HwndRenderTargetProperties(hwnd, D2D1::SizeU(rc.right-rc.left, rc.bottom-rc.top)), &pRT); return 0; } |
Quellcode |
|
1 |
main.cpp|116|error C2664: 'HRESULT ID2D1Factory::CreateHwndRenderTarget(const D2D1_RENDER_TARGET_PROPERTIES *,const D2D1_HWND_RENDER_TARGET_PROPERTIES *,ID2D1HwndRenderTarget **)': Konvertierung des Parameters 1 von 'D2D1_RENDER_TARGET_PROPERTIES' in 'const D2D1_RENDER_TARGET_PROPERTIES *' nicht m”glich| |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
HRESULT DemoApp::CreateDeviceResources() { HRESULT hr = S_OK; if (!m_pRenderTarget) { RECT rc; GetClientRect(m_hwnd, &rc); D2D1_SIZE_U size = D2D1::SizeU( rc.right - rc.left, rc.bottom - rc.top ); // Create a Direct2D render target. hr = m_pD2DFactory->CreateHwndRenderTarget( D2D1::RenderTargetProperties(), D2D1::HwndRenderTargetProperties(m_hwnd, size), &m_pRenderTarget ); if (SUCCEEDED(hr)) { // Create a black brush. hr = m_pRenderTarget->CreateSolidColorBrush( D2D1::ColorF(D2D1::ColorF::Black), &m_pBlackBrush ); } } return hr; } |
Werbeanzeige