I load a shader with the following:
ID3DXBuffer* errors = 0; ID3DXEffect
*effect = 0;
HR(D3DXCreateEffectFromFile(
gd3dDevice, L"Shader.fx", 0, 0,
D3DXSHADER_DEBUG|D3DXSHADER_SKIPOPTIMIZATION,
0, &effect, &errors) );
for(int i = 0; i < 3; i++) {
if(errors) { errors->Release();
if(effect)
ef...
Looking through some directx examples, I'm often seeing the structure for a vertex to be defined as such:
struct Vertex
{
vector position;
vector normal;
int textureMappingu;
int textureMappingv;
}
Under this type of vertex, what are textureMappingu/v for?
...
Hi all.
I'm currently working on a project using C++ and DirectX9 and I'm looking into creating a light source which varies in colour as time goes on.
I know C++ has a timeGetTime() function, but was wondering if anyone knows of a function in HLSL that will allow me to do this?
Regards.
Mike.
...
i want to play an avi file using c++ and direct X with a mfc interface
...
I'm lead to believe that function pointers are going to be needed to assign functions to the images that will be used as buttons somehow, but I can't find any decent resources on this.
How can you set up a button menu in C++? For example, having buttons for save, load, exit, new.
edit: I am not worried about portability for this exa...
I have the following C++ matrix class:
transform.h transform.cpp
I am using this coupled with a renderer, for which there is an opengl and a directx implementation.
I have a test example where the coordinates of the mouse within the window are used to position a graphic under the cursor. This works as expected under OpenGL.
Because d...
I have a windows program with directx/opengl renderers, and a custom mouse rendered as a quad. The program currently runs windowed.
The problem is the standard windows mouse is overlaid ontop of my custom cursor. How do I hide it when its inside my window?
...
Let's say I have a texture which is one file with separate 20 px by 20 px blocks. Within each of these blocks is a new character and I'd like to render different characters on screen as textures using these blocks. How can I use directx to render separate pieces of a texture file?
...
I'm wondering if it's an issue with I3D3XFont::DrawTextW, I pass it a string with \t in it, which it expands. However, it doesn't always do it correctly. If I print the same string that I pass to it, the tabs are expanded correctly. For example,
dxfont->DrawTextW(NULL, msg, wcslen(msg), &textbox,
DT_LEFT | DT_TOP | DT_EXPANDTAB...
Hello,
I've got a DirectX transform working perfectly on XP, Vista and Windows 7 32 bit. Like most DirectX transforms it compiles against part of the DirectX6 media SDK, with DirectShow headers from Microsoft DirectX SDK Extras from 2006
My application now needs to be ported to 64 bit, to handle the large memory requirements of HD. I w...
I have been checking around MSDN and Microsoft.com but i can only find Archived forums. Are there any microsoft run forums for DirectX anymore?
...
If I have developed a user control as mentioned in the tile and I use this http://www.ikvm.net/ to convert my .dll to a Jar file, Can I then embed that control on my JFrame? If so can you give an example please.
...
If I have a matrix which is a combination of World*View*Projection and I multiply it by the inverse of the projection does it yield the World*View matrix or something else? If not then how can I extract the World*View matrix from a World*View*Projection matrix?
Thanks for any help :)
...
How can I get the x,y coordinate of a mouse click, to see if it is over my menu button drawn by directx? Currently, my codebase has the following mouse-related class that doesn't seem to be able to give me this..I'm not sure how this might work.
InputMouse::InputMouse() :
m_LastX(-1),
m_LastY(-1)
{
m_MouseActionEvent.clear(...
Writing a game, and I'd like some cutscenes in the middle. In windowed mode, the DirectShow classes work perfectly and are easy to use. But when the game is fullscreen, I can't get DirectShow to show a fullscreen cutscene.
Basically, when I have a D3D Device initialized, I can't get the video to display, even with IVideoWindow.put_Fulls...
CUSTOMVERTEX* pVertexArray;
if( FAILED( m_pVB->Lock( 0, 0, (void**)&pVertexArray, 0 ) ) ) {
return E_FAIL;
}
pVertexArray[0].position = D3DXVECTOR3(-1.0, -1.0, 1.0);
pVertexArray[1].position = D3DXVECTOR3(-1.0, 1.0, 1.0);
pVertexArray[2].position = D3DXVECTOR3( 1.0, -1.0, 1.0);
...
I've not touched C++ for a while - hence th...
Hi,
I want to get the adpater RAM or graphics RAM which you can see in Display settings or Device manager using API. I am in C++ application.
I have tried seraching on net and as per my RnD I have come to conclusion that we can get the graphics memory info from
1. DirectX SDK structure called DXGI_ADAPTER_DESC. But what if I dont want...
Hi, this is my question...
There is a way to check when the application has gone fullscreen in DXGI (DX10/11).
For going Fullscreen I mean that the system has COMPLETED the mode change.
Cause i need it for my application to prevent deadlock and to adjust timing. (I have a multithreaded engine and the Present is not on the message pump ...
Hello, I have this little snippet of code with IDirectDraw::GetCaps returning DDERR_INVALIDPARAMS (a.k.a. E_INVALIDARG, a.k.a. 0x80070057).
The loaded dll is ddraw.dll 5.03.2600.5512 (xpsp.080413-0845)
I need to check whether the display hardware has 3D acceleration (DDCAPS_3D).
I have no idea to solve the problem, the snippet is so s...
I'm trying to make a basic model of the solar system in Direct X. I want to have the planets orbit the sun and the moon orbit the planets. So I have the planet/star/moon which takes a pointer to it's parent position vector. From that, how would I be able to make the object orbit at a set speed?
So for example the moon would have a point...