directx

Mapping corners to arbitrary positions using Direct2D

我的梦境 提交于 2019-12-02 04:38:27
问题 I'm using WIC and Direct2D (via SharpDX) to composite photos into video frames. For each frame I have the exact coordinates where each corner will be found. While the photos themselves are a standard aspect ratio (e.g. 4:3 or 16:9) the insertion points are not -- they may be rotated, scaled, and skewed. Now I know in Direct2D I can apply matrix transformations to accomplish this... but I'm not exactly sure how. The examples I've seen are more about applying specific transformations (e.g.

DX11 Unresolved Externals

时光毁灭记忆、已成空白 提交于 2019-12-02 04:38:20
问题 1>------ Build started: Project: Setup, Configuration: Debug Win32 ------ 1>BoxDemo.obj : error LNK2019: unresolved external symbol _D3DX11CreateEffectFromMemory@24 referenced in function "private: void __thiscall BoxApp::BuildFX(void)" (?BuildFX@BoxApp@@AAEXXZ) 1>C:\Users\Josh\Documents\Game Institute\DirectX\Chapter 1\Projects\Setup\Debug\Setup.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I'm using VS2012 and

Loading a .X model in DirectX 9

戏子无情 提交于 2019-12-02 04:03:26
问题 I'm trying to make my first 3D demo for my portfolio but I'm having problems loading in multiple .X files so that I might be able to make a simple game. I've worked through the msdn tutorials and Frank Luna's book that show how to load in one mesh. I even tried to mod franks demo code but I've found his code only does what he intended to. Modding it is just a complete headache. I'm wondering if anyone knows and good help libs or websites with example code, that can take the hassle out of

how to convert XMMATRIX to D3DMATRIX in DirectX 9?

早过忘川 提交于 2019-12-02 03:35:57
I learn DirectX (DirectX 9) from www.directxtutorial.com and using visual studio 2012 in windows 8. d3dx9 (d3dx) replace by other header like DirectXMath, therefore I replaced all that is needed, but there is a problem - convert XMMATRIX to D3DMATRIX. The problem code (The problem written - / problem! /): void render_frame(void) { // clear the window to a deep blue d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0); d3ddev->BeginScene(); // begins the 3D scene // select which vertex format we are using d3ddev->SetFVF(CUSTOMFVF); // SET UP THE PIPELINE DirectX::XMMATRIX

Directx changes

谁说我不能喝 提交于 2019-12-02 03:18:13
i have a problem with win8 and directx library. i have directx jun 2010 i added its d3dx11.lib and .h files but it doesnt work and says library not found. i found hte link bellow that says you can work with win8 sdk instead of directx libraries and d3dx.... libraries are not supported anymore. http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275%28v=vs.85%29.aspx i found in vs2012 there is a project that builds directx proggram but when i made a project with it it wasnt like any directx code ive seen before its more like xna what these really mean? how should i work with these

Why do DirectX fullscreen applications give black screenshots?

蹲街弑〆低调 提交于 2019-12-02 02:23:56
问题 You may know that trying to capture DirectX fullscreen applications the GDI way (using BitBlt() ) gives a black screenshot. My question is rather simple but I couldn't find any answer: why ? I mean technically , why does it give a black screenshot? I'm reading a DirectX tutorial here: http://www.directxtutorial.com/Lesson.aspx?lessonid=9-4-1. It's written: [...] the function BeginScene() [...] does something called locking, where the buffer in the video RAM is 'locked', granting you exclusive

Loading a .X model in DirectX 9

╄→гoц情女王★ 提交于 2019-12-02 01:13:38
I'm trying to make my first 3D demo for my portfolio but I'm having problems loading in multiple .X files so that I might be able to make a simple game. I've worked through the msdn tutorials and Frank Luna's book that show how to load in one mesh. I even tried to mod franks demo code but I've found his code only does what he intended to. Modding it is just a complete headache. I'm wondering if anyone knows and good help libs or websites with example code, that can take the hassle out of loading .X models into a game and allow me to move them etc When I was learning DirectX 9, this site was a

Why do DirectX fullscreen applications give black screenshots?

时间秒杀一切 提交于 2019-12-02 00:14:05
You may know that trying to capture DirectX fullscreen applications the GDI way (using BitBlt() ) gives a black screenshot. My question is rather simple but I couldn't find any answer: why ? I mean technically , why does it give a black screenshot? I'm reading a DirectX tutorial here: http://www.directxtutorial.com/Lesson.aspx?lessonid=9-4-1 . It's written: [...] the function BeginScene() [...] does something called locking, where the buffer in the video RAM is 'locked', granting you exclusive access to this memory. Is this the reason? VRAM is locked so GDI can't access it and it gives a black

DX11 Unresolved Externals

删除回忆录丶 提交于 2019-12-01 23:57:39
1>------ Build started: Project: Setup, Configuration: Debug Win32 ------ 1>BoxDemo.obj : error LNK2019: unresolved external symbol _D3DX11CreateEffectFromMemory@24 referenced in function "private: void __thiscall BoxApp::BuildFX(void)" (?BuildFX@BoxApp@@AAEXXZ) 1>C:\Users\Josh\Documents\Game Institute\DirectX\Chapter 1\Projects\Setup\Debug\Setup.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I'm using VS2012 and trying to setup DX11 using a sample program from Frank D Lunas DX11 book. I have no idea what this error

C# directx sprite origin

吃可爱长大的小学妹 提交于 2019-12-01 23:54:45
i have this problem when my Sprite rotation origin is fixed at top left corner of window (same with sprite.Draw and sprite.Draw2D ) Either way if i change rotation center it's still at top left. I need sprite to rotate around its Z axis. Edit: I have tried this: hereMatrix pm = Matrix.Translation(_playerPos.X + 8, _playerPos.Y + 8, 0); sprite.Transform = Matrix.RotationZ(_angle) * pm; sprite.Draw(playerTexture, textureSize, new Vector3(8, 8, 0), new Vector3(_playerPos.X, _playerPos.Y, 0), Color.White); But it does not seem to works well... When you draw it, is it in the correct place? I