directx

DirectX Exception handling

坚强是说给别人听的谎言 提交于 2020-01-06 16:46:06
问题 I'm following the rastertek tutorial on DirectX while also studying Exception-Safety in Generic Components by David Abrahams (http://www.boost.org/community/exception_safety.html). Why (to the best of anyone's knowledge) is the exception handling set up the way it is in the rastertek tutorial and what level of protection does it offer? For instance: mhresult = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, &mfeatureLevel, 1, D3D11_SDK_VERSION, &mswapChainDesc,

Angrybots Environment Floors

荒凉一梦 提交于 2020-01-06 07:31:10
问题 Have your ever payed attention to the environment floor's texture of the angry bots demo which comes with unity3D ? here is the texture : (why this atlas texture looks like this with less alpha ? ) This Texture name is EnvironmentFloorTiles_A and I Wonder how they have created this and why they had to this ? I had opened this in a new standard material in 3DS max and applied this to a plane with UV's modified , by a miracle it was mapped on the plane as a chromatic texture. Perhaps there is a

DirectX Install Directory

我与影子孤独终老i 提交于 2020-01-06 06:38:49
问题 So, I tried installing Microsoft DirectX 2010, when I was setting the directory of in the installer I put it to the wrong directory that I wanted it in. Now, every time I open the installer, it doesn't give me an option to change the directory, it just says continue and install. If anyone has a solution to this that would be really nice. EDIT: Also forgot to note that when I installed it on my D: drive (its supposed to be on C: ) I get the error code S1023 回答1: The S1023 issue is detailed in

How do I pass a handle of DirectX shared resource to another (unrelated) process?

谁都会走 提交于 2020-01-06 05:15:33
问题 I'm trying to pass a HANDLE between two unrelated processes (no child process). This HANDLE rSharedHandle comes from DXDevice9->CreateTexture(w, h, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &pTexture9, &rSharedHandle); And I want / need to use it on the other side to be shared using DXDevice11->OpenSharedResource(rSharedHandle, __uuidof(ID3D11Resource), (void**)(&TmpResource11)); The complete explanation of the procedure is can be found here. I came across this question which as answers but not

C++ and DirectX I can see right through models and the world as if it was all transparent?

╄→гoц情女王★ 提交于 2020-01-05 22:20:27
问题 The issue is that I can see through models and the world and see whats on the other side. When I look at the terrain I can see if there is anything through a mountain on the otherside and so on. This has happened before but I fixed it and don't remember how. Any way to fix this? 回答1: You probably need to fix the winding direction of your vertices. If you have them reversed by accident and backface culling is enabled, then you will see through these triangles. Winding direction is set as a

Detect window restore operation is about to begin

痴心易碎 提交于 2020-01-05 07:00:09
问题 WM_GETMINMAXINFO is generated when maximize operation is about to begin and WM_SIZE when maximize operation is finished. WM_SIZE is also generated when restore operation is finished. But how to detect window restore operation is about to begin? I need detect exact moment when window is about to restore , but not the moment when already restored. I am developing multithread DirectX application. I render in dedicated secondary thread. When window is about to begin maximize or restore I need to

How to set a click event for a Sphere (Mesh)?

断了今生、忘了曾经 提交于 2020-01-05 06:09:09
问题 In the picture above you can see a part of my application. I load a file with different values and afterwards I parse them. Then I draw a 3D coordinate system to show the Lab color space. To draw each sphere I use the Mesh - function: /// <summary> /// Vertex für die Kugel /// </summary> struct Vertex { public float x, y, z; // Position of vertex in 3D space public int color; // Diffuse color of vertex /// <summary> /// Konstruktor der Vertex /// </summary> /// <param name="_x">X(A) -

C++ DirectInput Mouse Scroll Wheel with a Laptop Touchpad

左心房为你撑大大i 提交于 2020-01-05 05:25:49
问题 When using DirectInput, it is my understanding that the mouse wheel delta should be stored in DIMOUSESTATE objects lZ variable. However, when I am scrolling with my laptop touchpad instead of an actual mouse with a wheel, it seems like the scroll is not being recognized since 1Z remains zero always. Is there a better solution than using WM_MOUSEWHEEL if that will even work? Since I am currently using DirectInput for the rest of the input I would like to stay consistent and use that but how

Converting DirectX vertexes to OpenGL vertexes

六眼飞鱼酱① 提交于 2020-01-05 05:05:42
问题 I have a file with full of vertex data which was exported from a software which used DirectX. Now I want to create a mesh in Ogre out of it. I set Ogre to use OpenGL since I develop on a Mac, with Xcode. My question is how can I convert these vertices to be OpenGL compatible? For example If I have a DirectX vertex in this format: DirectXVertex vertexDX = {x, y, z} what would it look like in a OpenGL vertex: OpenGLVertex vertexGL = ? Also in the file I have the data of the faces of the

Converting DirectX vertexes to OpenGL vertexes

China☆狼群 提交于 2020-01-05 05:04:13
问题 I have a file with full of vertex data which was exported from a software which used DirectX. Now I want to create a mesh in Ogre out of it. I set Ogre to use OpenGL since I develop on a Mac, with Xcode. My question is how can I convert these vertices to be OpenGL compatible? For example If I have a DirectX vertex in this format: DirectXVertex vertexDX = {x, y, z} what would it look like in a OpenGL vertex: OpenGLVertex vertexGL = ? Also in the file I have the data of the faces of the