directx

How to resize DirectX window efficiently?

那年仲夏 提交于 2019-12-05 17:09:33
I looked at this site example: http://www.codesampler.com/dx9src/dx9src_6.htm But the code is rather weird: it frees every texture, vertex buffer, everything! and then builds them up again: loads the model from disk ... i dont think that is very efficient! OpenGL can do window resizing on fly with no such limitations. How can i do the same as OpenGL does: efficient window resize with no need to free every resource in my program? I tried the code in the above link example, without those invalidateDeviceObjects/restoreDeviceObjects function calls, but it didnt work.. so i guess it must be done?

Converting DirectX SDK code to new Windows 8.1 SDK Code

自闭症网瘾萝莉.ら 提交于 2019-12-05 15:51:14
I'm currently creating a Video Game + Engine. I found some really amazing tutorials on DirectX 11 programming at RasterTek . They unfortunately use the depreciated DirectX SDK, and I am using VS 2013 with the new DirectX SDK included in the Windows SDK. I am converting the code to use the Windows SDK, but I've run into some problems on tutorial 4 (yes I will be converting all 49 tutorials, and there will probably be more issues) From Working with D3DXMath , I am told that D3DXVECTOR3 should be converted to XMFLOAT3. I am then trying to use these XMFLOAT3 in D3DXVec3TransformCoord, which has

UpdateLayeredWindow with normal canvas/textout

余生长醉 提交于 2019-12-05 14:04:18
Is there a way to draw on form with canvas and then use the updatelayeredwindow so not the form will be visible but the text, like a transculent form showing only text? if not, then is there a way to make some sort of transculent form with only the canvas (opengl/directx) maybe? i would like to draw with commands on the top of all windows. You can set the TransparentColor property of the form to 'True', then set the form color to the same color of TransparentColorValue , and all of the form's client area will be transparent. If the Delphi version you use does not have the 'TransparentColor

Cross compiling Direct3D on Linux with mingw

让人想犯罪 __ 提交于 2019-12-05 11:59:05
How to configure mingw32 to cross-compile Direct3D Apps for Windows? Is there any possibility? I have actually succeeded compiling code from this tutorial: http://www.directxtutorial.com/Tutorial9/B-Direct3DBasics/dx9B4.aspx - using Code::Blocks on Kubuntu with i586-mingw32msvc-g++. I needed to add #define UNICODE and remove the #pragma ... parts to do this, and I used header files from /usr/i586-mingw32msvc/include and libs also from mingw package. However I cannot compile code from this tutorial: http://www.directxtutorial.com/Tutorial9/B-Direct3DBasics/dx9B5.aspx Mingw doesn't have d3dx9.h

nVidia SLI Tricks [closed]

為{幸葍}努か 提交于 2019-12-05 10:31:46
Closed . This question is opinion-based . It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post . Closed 2 months ago . I'm optimizing a directx graphics application to take advantage of nVidia's SLI technology. I'm currently investigating some of the techniques mentioned in their 'Best Practices' web page, but wanted to know what advice/experience any of you have had with this? Thanks! This is not really an answer to you question, more of a comment on SLI. My understanding is that SLI is

Displaying a video in DirectX

梦想与她 提交于 2019-12-05 09:49:12
What is the best/easiest way to display a video (with sound!) in an application using XAudio2 and Direct3D9/10? At the very least it needs to be able to stream potentially larger videos, and take care of the fact that the windows aspect ratio may differ from the videos (eg by adding letter boxes), although ideally Id like the ability to embed the video into a 3D scene. I could of course work out a way to load each frame into a texture, discarding/reusing the textures once rendered, and playing the audio separately through XAudio2, however as well as writing a loader for at least one format,

c# text/winForm overlay video games like xfire,PIX,steam,fraps etc

天涯浪子 提交于 2019-12-05 08:33:58
I know there is plenty of post about this topic , however I've been looking for a solution to this for months. I checked about 300 posts on google about this. The only good thing I found was a c++ program that was drawing a colored rectangle over League's window. I am not very familiar with directx. My program is in c# and I would to write text or if possible make a winForm visible over a full screen video game. I tried every single sample found on forums but 50% of them are old and links aren't working anymore. Hope you guys can help me. Thank you, Kevin You can detect directx games by

How to copy frontBuffer data to texture DirectX 9

送分小仙女□ 提交于 2019-12-05 08:33:55
问题 I can't seem to find a way to create a texture from the surface data I acquire through the front buffer data of my application This is the code I'm pretty sure is working (Direct X 9, C++) // capture screen IDirect3DSurface9* pSurface; g_pd3dDevice->CreateOffscreenPlainSurface(640, 480, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &pSurface, NULL); g_pd3dDevice->GetFrontBufferData(0, pSurface); Now that I've got my frontBufferData, I would like to create a IDirect3DTexture9 object with it. This function

Microsoft objects, the Release() functions return value?

怎甘沉沦 提交于 2019-12-05 08:29:51
I'm curious because I couldn't find out about this on MSDN. I've found the Release() function is present in various COM objects which I'm obviously supposed to use for deleting pointers. But I'm not sure what does it return exactly? I used to think it would return the number of references which still exist to the object remaining, therefore something like: while( pointer->Release() > 0 ); Would obviously release all references to that pointer? Or am I not seeing something? *note I'm talking about this from the concept of the IDirect3DTexture9::Release() function Your theory is true. COM memory

Shader's function parameters performance

只谈情不闲聊 提交于 2019-12-05 08:09:11
I'm trying to understand how passing parameters is implemented in shader languages. I've read several articles and documentation, but still I have some doubts. In particular I'm trying to understand the differences with a C++ function call, with a particular emphasis on performances. There are slightly differences between HSLS,Cg and GLSL but I guess the underline implementation is quite similar. What I've understood so far: Unless otherwise specified a function parameter is always passed by value (is this true even for matrix?) Passing by value in this context hasn't the same implications as