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
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 35 36 37 38 39 40 41 42 43 44 45 46 47 |
int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow ) { // Enable run-time memory check for debug builds. #if defined(DEBUG) | defined(_DEBUG) _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); #endif // DXUT will create and use the best device (either D3D9 or D3D11) // that is available on the system depending on which D3D callbacks are set below // Set general DXUT callbacks DXUTSetCallbackFrameMove(OnFrameMove); DXUTSetCallbackKeyboard(OnKeyboard); DXUTSetCallbackMouse(OnMouse); DXUTSetCallbackMsgProc(MsgProc); DXUTSetCallbackDeviceChanging(ModifyDeviceSettings); DXUTSetCallbackDeviceRemoved(OnDeviceRemoved); // Set the D3D11 DXUT callbacks. Remove these sets if the app doesn't need to support D3D11 DXUTSetCallbackD3D11DeviceAcceptable(IsD3D11DeviceAcceptable); DXUTSetCallbackD3D11DeviceCreated(OnD3D11CreateDevice); DXUTSetCallbackD3D11SwapChainResized(OnD3D11ResizedSwapChain); DXUTSetCallbackD3D11FrameRender(OnD3D11FrameRender); DXUTSetCallbackD3D11SwapChainReleasing(OnD3D11ReleasingSwapChain); DXUTSetCallbackD3D11DeviceDestroyed(OnD3D11DestroyDevice); // Perform any application-level initialization here PlaySound(L"Media\\Musik\\Ambient_Normal.wav",0,SND_ASYNC | SND_LOOP); //Hintergrundmusik //Öffne Lade Form SplashScreen<Kap03_01::lo1>^ splashscreen = gcnew SplashScreen<Kap03_01::lo1>(); splashscreen->Show(); DXUTInit( true, true, NULL ); // Parse the command line, show msgboxes on error, no extra command line params DXUTSetCursorSettings( true, true ); // Show the cursor and clip it when in full screen DXUTCreateWindow( L"Test" ); //Setze fenster name DXUTCreateDevice( D3D_FEATURE_LEVEL_10_0, true, 1366, 768 ); splashscreen->Quit(); DXUTMainLoop(); // Starte haupt Schleife RenderLopp() etc // Perform any application-level cleanup here return DXUTGetExitCode(); } |
dx11
unregistriert
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
#include "DXUT.h" #include "DXUTgui.h" #include "DXUTmisc.h" #include "DXUTCamera.h" #include "DXUTSettingsDlg.h" #include "SDKmisc.h" #include "SDKmesh.h" #include "resource.h" #include "lo.h" #include<fstream> #include<string> #include<windows.h> #include <sstream> #include <conio.h> #include "Menü.h" #include "d3dx11effect.h" #include "MyEngine\\Material.h" using namespace MyEngine; using namespace std; bool save_profile; bool cl; Light g_Light; CFirstPersonCamera g_Camera; CDXUTSDKMesh g_Mesh; Material* g_pMaterial; ID3D11InputLayout* g_pInputLayout; D3D11_INPUT_ELEMENT_DESC* g_pLayout = VERTEXPOSITIONNORMALTEXTURED::GetVertexLayout(); UINT g_numElements = VERTEXPOSITIONNORMALTEXTURED::GetNumElements(); //-------------------------------------------------------------------------------------- // Eigene //-------------------------------------------------------------------------------------- float ElapsedTime; //Message Box rückgabe int ruck; void abc(Kap03_01::lo1^ frmlo2) { Kap03_01::lo1^ frmlo3 = frmlo2; frmlo3->ShowDialog(); } void sofort_beenden() { system("taskkill /F /IM Game.exe"); } //-------------------------------------------------------------------------------------- // Reject any D3D11 devices that aren't acceptable by returning false //-------------------------------------------------------------------------------------- bool CALLBACK IsD3D11DeviceAcceptable( const CD3D11EnumAdapterInfo *AdapterInfo, UINT Output, const CD3D11EnumDeviceInfo *DeviceInfo, DXGI_FORMAT BackBufferFormat, bool bWindowed, void* pUserContext ) { return true; } //-------------------------------------------------------------------------------------- // Called right before creating a D3D9 or D3D11 device, allowing the app to modify the device settings as needed //-------------------------------------------------------------------------------------- bool CALLBACK ModifyDeviceSettings(DXUTDeviceSettings* pDeviceSettings, void* pUserContext) { return true; } |
dx11
unregistriert
Community-Fossil
Beruf: Teamleiter Mobile Applikationen & Senior Software Engineer
dx11
unregistriert
dx11
unregistriert
Werbeanzeige