Presentation is loading. Please wait.

Presentation is loading. Please wait.

App structure options Select feature levels to support D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0,

Similar presentations


Presentation on theme: "App structure options Select feature levels to support D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0,"— Presentation transcript:

1

2

3

4

5 App structure options

6

7

8

9

10

11

12

13 Select feature levels to support D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_1 }; UINT creationFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;

14 Create the device and context

15 DirectX control panel

16

17

18

19

20

21 Task object library #include using namespace Concurrency; // task defined with capturing lambda // continuation lambda argument is return value of previous // continuation using existing function baz() float f = 1.0f; task ([=]() { return foo(f); }).then([](int x) { bar(x); }).then(baz); C++ Dev Camp: Async-made-simple-with-Cpp-PPL

22

23

24

25

26

27

28

29 Windows 8 PC spectrum

30

31

32

33

34 Relative mouse handler // for mouse-only use // register handler for relative mouse movement events Windows::Devices::Input::MouseDevice::GetForCurrentView()->MouseMoved += ref new TypedEventHandler (this, &MoveLookController::OnMouseMoved); // Handle Mouse Input via dedicated relative movement handler void MoveLookController::OnMouseMoved( _In_ MouseDevice^ mouseDevice, _In_ MouseEventArgs^ args ) { float2 pointerDelta; pointerDelta.x = static_cast (args->MouseDelta.X); pointerDelta.y = static_cast (args->MouseDelta.Y);...

35 

36

37 Creating another FrameworkView m_dxView = Windows::ApplicationModel::Core::CoreApplication:: CreateNewView("GameScreen.DirectXView","Example Entrypoint String"); Lets you have a full XAML environment for UI-heavy menus, options, etc. Then have a separate DirectX-only screen Yet another approach to XAML interop beyond SwapChainBackgroundPanel

38

39 Decision – Rotation

40 Rotation preferences { DisplayOrientations::None; // Enable rotation by OS/Accelerometer DisplayOrientations::Landscape; // Lock rotation by OS/Accelerometer DisplayOrientations::LandscapeFlipped; // and enable this orientation DisplayOrientations::Portrait; DisplayOrientations::PortraitFlipped; } using namespace Windows::Graphics::Display; DisplayProperties::AutoRotationPreferences = DisplayOrientations::Landscape; | DisplayOrientations::LandscapeFlipped;

41

42

43

44 Copying additional assets to AppData/Local void myGame::OnActivated(CoreApplicationView^ applicationView, IActivatedEventArgs^ args) { CoreWindow::GetForCurrentThread()->Activate(); if(args->Kind == ActivationKind::File) { auto item = safe_cast (args)->Files->GetAt(0); if(item->Name == "texturepack.MyGame_wad") { safe_cast (item)->CopyAsync( ApplicationData::Current->LocalFolder, "data.wad", NameCollisionOption::ReplaceExisting ); }

45

46 Your move.

47 Get started Check out the DirectX Samples: Visual Studio project templatesFile->New Project->C++->DirectX Direct3D Tutorial SampleD3DTutorial DirectX Touch Input SampleSimple3DTouch Direct3D Sprite SampleSimple3DSprites Direct3D Resource Loading SampleDirect3DResourceLoading Direct3D Bump Mapping SampleBumpMapping DirectX Marble Maze Game SampleMarble Maze DirectX 3D Shooting Game SampleSimple3DGame … Get your app onto the Windows Store

48

49 Please submit session evals on the Build Windows 8 App or at http://aka.ms/BuildSessionshttp://aka.ms/BuildSessions Link to more detailed talks referenced:

50

51


Download ppt "App structure options Select feature levels to support D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0,"

Similar presentations


Ads by Google