2
votes
0answers
30 views

Load an Image to the BackBuffer

How can I load and display an Image?... I have tried something but it didnt.. worked.. this is what I've tried.. File : StrikeOps_main.cpp .. void : render_frame : Intro::DisplayIntro(d3ddev, ...
0
votes
0answers
139 views

How to make an Game Intro

How do I display my logo (a short video) before displaying the main menu? For example when you start Call of Duty, it displays the IW / 3ARC logo, Activision, and then a cinematic. I just need to ...
0
votes
0answers
22 views

merging meshes directx10 [duplicate]

Say I have a line of 10 cubes. Each side has 2 triangles that make up the face of each cube. If I want to reduce the number of triangles being drawn, how can I merge the 20 triangles into just 2 big ...
0
votes
2answers
59 views

DirectX: Render the black bars

I'm still quite a beginner in the industry. I'm working on a game with some friends and I would like to add a cinematic between 2 levels like in the attached picture. My question is how can I render ...
1
vote
2answers
146 views

How do I handle DirectX mouse events?

I am a beginner making my second game (simple low graphics FPS), in Visual C++ 2010. So far, I only know how to use keyboard controls. I've had source files like keyboard.h and keyboard.ccp, ...
2
votes
1answer
69 views

Using normals in DirectX 10

I've got a working OBJ loader that loads vertices, indices, texture coordinates, and normals. As of right now it doesn't process texture coordinates or normals but it stores them in arrays and creates ...
0
votes
0answers
12 views

how to attach normals to my mesh in d3d10 [duplicate]

so ive got a working OBJ loader that loads vertices, indices, tex coords, and normals.. as of right now it doesn't process tex coords or normals but it stores them in arrays and creates a valid mesh ...
1
vote
2answers
62 views

How do I correctly multiply an XMMATRIX by a scalar?

Using DirectXMath and its XMMATRIX structure in C++ and Direct X 11, how does one multiply that matrix structure by a single float scalar? I want to implement the operation B = A * f; where A and B ...
0
votes
1answer
48 views

Getting invalid argument error on R32G32B32_FLOAT texture creation

D3D11_TEXTURE2D_DESC texDesc; texDesc.ArraySize = 1; texDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE; texDesc.CPUAccessFlags = 0; texDesc.Format = DXGI_FORMAT_R32G32B32_FLOAT; ...
0
votes
1answer
51 views

Drawing .mtl files in Directx

So I've created my own obj loader and it loads normal's, UV's, vertices, indices and faces.. but it will only draw the whole obj a single color. I would like my loader to display the model as if it ...
0
votes
1answer
88 views

How do I determine the look-at vector of a free-look camera?

I'm trying to create a free-look camera with DirectX 10. I've figured out how to get the directions for forward and back and left to right. However, I don't know how to rotate the look-at vector of ...
-1
votes
1answer
68 views

Should I reuse vertex buffers for multiple draw operations? Would this be more efficient?

I am constructing the game scenario and buttons using Vertex Buffers. I am making a v_buffer for each item, and then releasing them. I don't like my method. Should I reuse my vertex buffer for ...
0
votes
1answer
63 views

How can I move the view in a DirectX game?

I'm making a game in C++ using Direct3D 9. How do I move the camera at constant rate? I'm making a Flappy Bird type game and I'd like to move the camera forward through the level.
0
votes
2answers
108 views

Texture coordinates for a 3D box

I have a box model in my DirectX application, stored as 8 vertices: MyVertex vertices[] = { { DirectX::XMFLOAT3( - 1.0f, + 1.0f, - 1.0f ), /*,tex coord...*/}, //0 { DirectX::XMFLOAT3( + ...
1
vote
1answer
96 views

Load texture from different thread

I am trying to load textures from a different thread but it fails everytime on this following method: D3DX10CreateShaderResourceViewFromFile Turning off my multithreaded routines make the textures ...
0
votes
1answer
56 views

Tangent plane vectors smoothing with vertex normals [closed]

I'm trying to find a way to smooth out normals obtained from cross product of tangent and bitangent vectors calculated per face basis. I've already asked a similar question on SO, however with no ...
0
votes
1answer
144 views

When should rendering be performed during a frame?

When working with OpenGL or DirectX, should draw calls be done all at once, at the end of the update loop, or is it better to have draw calls occur during the update loop rather than just at the end?
0
votes
1answer
87 views

How to share matrix in HLSL?

I am trying to share this across multiple effect files: matrix worldMatrix : register(vs_4_0, b0); If I set this from one effect file, will it effect every effect file which has the same type of ...
0
votes
1answer
54 views

Changing the maxDepth of viewport

Whenever I change the maxDepth of the viewport from 1.0 to say 300.0f (just for kicks), everything on my screen disappears. Why is that? Is there anywhere else I have to account for this change in ...
1
vote
1answer
53 views

Does `SetResourceArray` copy the data into the GPU?

I am trying to create multiple textures, and only several of them change every few frames. I don't want to have to copy in the whole array via SetResourceArray for just a few textures that change, ...
1
vote
1answer
72 views

How do I determine color resolution of an output in DXGI/D3D?

i'm was revising some code i wrote some time ago when working on the window wrapper for my rendering framework. The framework is based off DirectX, but it wasn't really using any D3D-related facility. ...
0
votes
1answer
135 views

Why am I getting rendered rectangles that are off relative to their bounding rectangles in this code?

I am rendering different rectangles with the help of the DirectXTK (PrimitiveBatch) and surrounding them with a BoundingOrientedBox (DirectXCollision.h). For visualization I draw the corners of the ...
0
votes
1answer
99 views

Center directional light shadow to the cameras eye

I'm currently drawing my directional light shadow using this view and projection: XMFLOAT3 dir((float)pitch, (float)yaw, (float)roll); XMFLOAT3 center(0.0f, 0.0f, 0.0f); XMVECTOR lightDir = ...
1
vote
2answers
134 views

How can I repeat a portion of a texture on a quad?

I want to repeat a selected part of the texture into a quad. I was looking at this thread, however the solution involved changing my HLSL. Is there any way to do it without changing my shader ...
1
vote
1answer
93 views

When creating the horizontal blur, how is the vertex shader being called for each pixel?

I am following this tutorial. I am confused as to why the VertexShader is being called each time for the PixelShader. I was under the assumption the VertexShader is called only 6 times during the ...
0
votes
1answer
100 views

Creating a 2D texture array for depth view

Following my question here, I decided to create an 2D texture array for all of my depth screen texture so that I can use them for shadows for all my lights. I'm having an issue setting it up, I'm ...
0
votes
1answer
116 views

Set Sampler states: Linear, Bilinear, Trilinear Filtering/Interpolation

How do you set each of these sampler states in the hlsl Linear filtering Bilinear filtering Trilinear filtering
1
vote
1answer
152 views

How to create and populate a 2D Texture Arrays in DirectX11

I have generated a bunch of ID3D11ShaderResourceView that are a 2D textures that have a depth map screen shot for my lights shadows. I would like to take all of these textures and put them into a ...
3
votes
1answer
176 views

Multiple pixel shader passes

I currently have a pixel shader that calculates the texture and I have another that calculates the light. I want another shader that does both. What I would ideally like to do is instead of creating a ...
0
votes
2answers
263 views

how to detect same keyboard key press only once

I am designing a keyboard class that can detect the keyboard key press only one time but I still cannot figure out the way to do it. My goal is just check and perform the action only once when the ...
0
votes
1answer
90 views

Just 2 images on a window loaded using DirectX10…But how?

I am a beginner to DX and I have tried looking everywhere for something very similar to this concept but can't find anything. I just want two rectangles on a window. Rectangle 1 : on some x,y with ...
3
votes
1answer
255 views

Finding Pixels within UV Coordinates

I am building lightmaps for 3D models. My lightmap algorithm needs to determine which pixels( lumels ) within the lightmap texture fall within the boundary of a mesh face( triangle )...this process ...
0
votes
0answers
102 views

Making a texture bank, pointer in vector killing me

I'm trying to make a texture bank. I'm not 100% as to whether I'm doing 2D or 3D but whatever, it's a basic texture bank. The goal is to use texture objects that I can use a pointer to so as to load ...
2
votes
1answer
132 views

Development with multiple libraries

I'm almost fresh to the game development and I have one question about libraries. If I choose one library, such as SFML, to develop the menu of my game, is it possible to merge with, for example, ...
2
votes
3answers
537 views

How to check if user has integrated graphics card?

I'm almost done with my Direct3D game. When user starts game first time it will adjust settings (and maximum settings) based on DirectX feature level starting from 9_1 up to 11_1. I have different ...
2
votes
1answer
363 views

The View-Matrix and Alternative Calculations

I'm working on a radiosity processor in DirectX 9. The process requires that the camera be placed at the center of a mesh face and a 'screenshot' be taken facing 5 different ...
0
votes
0answers
49 views

C++, Direct3D - Creating mesh from texture [duplicate]

I am making a game similar to Minecraft. I want to create the mesh for the tool held in the players hand (e.g. a pickaxe). I have a texture for the tool which is 32x32 pixels and I want to be able to ...
3
votes
1answer
194 views

Adding false if statement to pixel shader produces a lag

One of lines in pixel shader produces a lag (lower fps). I can't understand why. if (TextureEnabled) color *= texDiffuse.Sample(texDiffuseSam, input.UV); Interesting fact is: TextureEnabled is ...
4
votes
4answers
730 views

Face-Click Detection ( like in Minecraft )

I am working on a box-based game engine like minecraft and I was wondering how to detect the "clicked face" when placing blocks. I have created this engine in C++ ( DirectX / D3D ), C# ( XNA ) and ...
0
votes
3answers
428 views

XNAMath: Question on types XMFLOAT3/4, XMVECTOR (D3D 11)

I don't want to use XMVECTOR which i currently use in my DirectX 11 C++ game code. Because it is too much for me in memory. I want to use XMFLOAT3 or 4, but the problem is there is no matrix/vector ...
0
votes
2answers
389 views

First person camera: problem

I have created a simple camera class, moved it from my C# (XNA) source to C++ for d3d. Commonly it is okay, but something is wrong with rotation. If i increase its pitch/yaw values, according to ...
0
votes
1answer
411 views

Direct3D11 + Assimp imported model corrupted/failed

I use Assimp library to import vertex and index data from model file. I don't know how to correctly create index buffer from mFaces array of aiMesh. Or something wrong, because i my model is ...
1
vote
2answers
187 views

How can I use D3DXLoadMeshFromX with Direct3D 11?

I'm trying to write some class for loading meshes from X files. But I can't use the function D3DXLoadMeshFromX because its third parameter is LPDirect3DDevice9. In my D3D initialization code I ...
0
votes
1answer
43 views

DirectX D3DXVec3Normalize unresolved external symbol

I have simple DirectX project: #include <d3dx10.h> #include <d3dx10math.h> #pragma comment(lib, "d3d10.lib") #pragma comment(lib, "d3dx10.lib") int main() { D3DXVECTOR3 u(1.0f, ...
1
vote
2answers
266 views

how to set image resource path for D3DXCreateTextureFromFileEx method?

I try to merge all the image resources to a folder called resource. So, set image path as "resource/" but my directX framework only works if I compile at VS 2010. If I run from the debug folder it ...
2
votes
1answer
101 views

Any possibility to render XNA scene via POV-Ray

We are creating special purpose application. Its not game but its 3d Application that functions like game. We require app to have different places and we want to allow user to roam inside such places ...
1
vote
0answers
211 views

2D Camera transformation sidescroller

i am currently trying to dive into 2D programming with DirectX, especially bulding a tile based sidescroller. I have worked with some chapters from a book (Advanced 2D Game Development) but always ...
1
vote
0answers
95 views

How to correctly synchronize a shared surface?

I am trying to share a direct3d9 surface between two processes. One process (let's call it A) writes to the surface, and the other (B) displays it on screen. Currently, process A does a StretchRect of ...
2
votes
0answers
66 views

Creating a d3d surface from pre-allocated system memory?

I thought I read somewhere that one could create a OffscreenPlainSurface from an existing system memory buffer, but I cannot seem to find the reference anymore. My use case is copying a frame from ...
1
vote
0answers
81 views

3D Model Loading in DirectX 11 [duplicate]

At the moment I am trying to implement fbx model loading in my DirectX 11 code. This is old code I had create for use with DirectX 9 and I'm simply trying to bring it back up to date. Since I first ...