Recent update: 2008-3-21
Hello, I have a texture and I'll draw it in 2D view, I try to make some texels of it fully transparent and the other is some transparent. Unfortunately I don't know how to do that. I started with DirectX plugin for Photoshop I designed the texture as fully transparent at some texels and semi ...
1557 byte By
Guaw at 2008-3-6
Hi, Working on a basic 3D engine I actually have a problem using my application with some graphic cards. The engine is very basic : Using a Form to select a "game", I create a new Control, then I use it creating my D3Ddevice. I load mesh and textures from .X files. When the "game" end, I ...
Hi,I was recently experimenting with the rendering of 2D sprites using David Weller's 2D Sprite sample, from his blog entry a while ago: http://www.inkblog.com/CommentView,guid,93ecebcb-7ca6-43ab-97ae-6c09bfeb8c95.aspxSource Code: ...
852 byte By
RobD at 2008-3-3
Hi,This thread is really to spark a discussion on the approaches everyone is taking for the deployment of (specifically) managed DirectX clients.As ISPs deliver more available bandwidth to consumers nowadays, web delivery of thicker clients are now more of a possibility allowing more richer ...
The function D3DXComputeTangent computes normal mapping gradients (tangents and binormals) for each vertex in a D3DXMesh. This function has a parameter which sets Wrapping to true or false. How does this parameter affect the gradient calculations?
hi, Is there a version of the MS .x exporter that supports Max's Skin modifyer for wieghted meshes used in animations. If not, is support for this planned? The Skin modifyer has many advantages over Physique. Just out of curiosity, what is the main difference between the two that makes Skin ...
I started using the "ShadowVolume.fx" shader from the ShadowVolume c++ sample in the SDK and it works great in my program. Now I want to extend that shader to add specular highlighting, and possibly environment mapping. I am at a loss on how to do that though. I have found some examples on how ...
151 byte By
dxfoo at 2008-2-26
I learned how to make a triangle with a custom vertex of TransformedColored. Is it possible to make a rectangle (or any other shape) in a similar way?
587 byte By
GSXP at 2008-2-25
Hi,DrawText() in DX9 does not work the same way as DrawText() in GDI does when used with the DT_WORDBREAK flag. Punctuation marks in DX9 are wrapped incorrectly:This is a small text. The full stop iswrapped onto the new line.Parenthesis are also wrapped although there is no whitespace between ...
I have been looking at various approaches at developing an effective CAD system. One of the features would be that it can handle multiple selections etc in a 2D plan view.I have looked at GDI+ quite extensively and was hoping that it might be the right approach to take, however if I want to ...
428 byte By
Skyser at 2008-2-23
I'm very interested in learning how to use the new UVAtlas class on the most basic level. The DX documentation talks about all the steps of usage on an abstract level, but I need an explicit step-by-step example (I am very dense).Can anyone help out? Any examples would be appreciated. But ...
I'd like to draw a line with GDI+ like a line on a paper created with a pencil. Can anybody point me to an example or an article that explain the technique? Thank you, Andrea
100 byte By
CruS at 2008-2-22
Hi again =) So I made myself an "intro" movie... now.. how do I use it in directx? c++
hi I want to deform the mesh like if I have a mesh, I want to move its vertices. The vertices can move in and out of the mesh and the mesh changes its shape. I am using managed DirectX. Can anyone suggest me the technique for this thnx
I know that the number DrawIndexedPrimitive calls should be minimized. But what to do if you've a large number of different moderate sized objects (like Quake3 brushes). Is it better to use a static indexbuffer and to call DrawIndexedPrimitive for every object or to use a dynamic indexbuffer ...
Sorry if this is the wrong place for this question but it it related to 3D games programming... I have noticed that Graphics.DrawImage(img, pts) accepts an array of 3 Point objects in the second argument. In the spirit of adventure I passed in an array of 4 to see what would happen (I was ...
Watch Mike Burrows as he gives an impromptu demonstration to the Channel 9 team of the Performance Investigator for DirectX (PIX) at Meltdown 2005. This tool is used with Direct3D applications, allowing you gather and fully analyze Direct3D calls on a frame-by-frame ...
404 byte By
CruS at 2008-2-17
Ok, so I figured out how to move the camera with the keyboard.Now I wanna know how I can move it with the mouse!I want to be able to change the camera's Target using the mouse, and position using the keyboard (FPS style).I read some of the samples in which comes with SDK, but I could not ...
654 byte By
NicoRi at 2008-2-16
I have a problem setting the attribute table of a mesh. The original mesh has only one attribute range. I like to change it and to add another one like this: D3DXATTRIBUTERANGE ar[2]; ar[0].AttribId = 0; ar[0].FaceCount = 2; ar[0].FaceStart = 0; ar[0].VertexCount = 6; ar[0].VertexStart = 0; ...
I'm new to MDX though old to OGL. I'm wondering is there a facility in MDX like the matrix stack in OGL? Say, in OGL we can simply push and pop matrix which is extremely convinient. I haven't see anything clear about that. Did notice there are a lot of world matrices in device, are they used ...
287 byte By
CruS at 2008-2-15
Ok, So I wanna do a 3d version of Pong ( for entertainment and practise ) going quite well ^^ Have rendered 5 white objects in a black area. (walls + paddles + ball) Is there any move function? like D3DXMatrixRotY ( something like that ) so I can move the ball =D please help
I'm currently using occlusion queries to increase performance in a simulation engine that I am writing in managed DirectX. I have the occlusion query infrastructure built into my engine, but I do not know how to check to see if the device actually supports hardware occlusion queries or not. In ...
I'm drawing several sprites at different zvalues. I can set them when loading just fine, and they all work out in the proper zorder. However, if i change my zvalue in game, say on a button press, then the sprite disapears completely. I've debugged the code, and checked the zvalue of the ...
317 byte By
NicoRi at 2008-2-15
Is it possible to somehow not set the output color in a HLSL pixel shader without getting an error message? It is possible with a CG shader. The effect is a transparent surface at pixels where the output color is not set/computed. Nico ...
876 byte By
NicoRi at 2008-2-14
Hi there, does somebody know if (how) it is possible to use a for loop in a HLSL pixel shader with a dynamic count? For example: int count = 5 / a; for (int i = 0; i < count; i++) ... I didn't manage, whatever I tried the effect creation fails. Even with shader model 3. Nico Suddenly it ...
387 byte By
qrli at 2008-2-14
I was told to ask this question here to get an answer:struct Caps 304 bytes struct Material 68 bytes ... These big structures are used as properties and passed here and there. Isn't this a big performance penalty? I checked the generated asm code, and it seems these's no optimization to ...
I've made a model in Maya 6.5 that is a simple temple with a texture applied to it. I have the .X exporter installed however I can't get the mesh to show up correctly in the Mesh Viewer. The mesh shows up pitch black and I can't see any texture applied to it. Is there a way to export a ...
Hello, First, We can I use pixel shaders with sprites? Second, Is Sprites fast enough to not drawing with a conventional way (Holding the vertices in vertex buffer and then apply a texture to them and use the pixel shader as regular)? I want to know which one is faster?Thanks,Mustafa ELBanna ...
Hello, There is a problem which I suffers from a lot. When I draw a sprite with scaling 1:1 in a windowed mode it draws perfect with the same size as it's power of 2. When I resize the window I found all the sprites sizes changes and I can't get it's new size for purposes such picking it and ...
228 byte By
Hanchy at 2008-2-11
I am a new comer to the D3D, and I try to use the Sample Framework. But it is not easy to use it for the lack of the docs about the framework! So, I come here to look for some help. I will be grateful for your help!
I just start to trun from OpenGL to DirectX. I'm writing a program that requires user to select 3D objects by mouse clicking. In OpenGL this is easily done by Selection mechanism. So what is the best way to achieve the similar effect in DirectX 9?
Hi, Is it possible to change the ColorKey of a Texture after it has been created, or can it only be set at load time? I primarly want it to provide the good ol' "top-left pixel is ColorKey" functionality to my users. Thanks, Jonas
303 byte By
Aksi- at 2008-2-8
I want to hear the answer from Microsoft representatives: does the "DX extensions for VS" (the most important for me is HLSL debugger) compatible with VS2005beta2? And if it is - what SDK version i should have to use it (now i only have June2005)? ...
HI I want to project 2d flat image cylindrically on mesh object. E.g., on cat or Dog face. I am using managed directX Can anyone help me on this manner? thnx
Thanks for replying,I really do this but it doesn't works: struct CUSTOMVERTEX { FLOAT x, y, z; D3DCOLOR color; }; D3DVERTEXELEMENT9 decl[] = { { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 }, { 0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, ...
Hi I'm trying to get a basic effect running in my engine, but I am having difficulties getting the parameters from my code into the effect. They seem to be sticking at the initial value. For instance I have added time to the glow EffectEdit sample and added a sin(time) term to make the glow ...
546 byte By
S. at 2008-2-7
In the SDK, theres a ShadowVolume example and on line 1057 theres a function called 'ComputeMeshScaling'. This is used to create a matrix, which is then used to shrink the objects down during rendering. If you make the scaling 1x then the shadow is rendered all over the place. Ive put the ...
3766 byte By
Amitoj at 2008-2-7
Hi,I'm writing this demo DirectX app using VC++ .NET 2005. And my applictionis crashing without any error messages. I managed to figure out the line whereit's failing using MessageBox::Show(); commands. Prints only "Mark 1" & Line is marked red.Code - bool ...
660 byte By
NoteMe at 2008-2-6
Here at work I had DX SDK summer 2004 installed. And I got a problem with something, so I figured I would try to upgrade to August 2005 to see if that would solve it. But now when I am going to add the DLL files, I started to wonder a bit...take a look at this picture: http://noteme.com/dll.jpg ...
im using version 8 so i can still use direct draw and was woundering if anyone would have the time and effort to help me make a simple game so i can understand how game programming works im not a complete noob ive been programming for about a year an half and know alot of win32 but just ...
554 byte By
NicoRi at 2008-2-5
Is it possible to store the state of the CModelViewerCamera (DXSDK) to later reload it? I didn't manage it. I like to store the rotations that were made around the model using the mouse. Interestingly the Eye Point doesn't change when rotating, so it seems the object is rotated rather than ...
Hey, Ive been trying to add a vertex shader to my engine(right now its just running a pixel shader). Currentlly if I activate the vertex shader the world gets drawn distorted(a small random red box with a triangle going out to infinity). Heres the simple vertex shader im using. struct VS_INPUT ...
is there a sample out about loading multiple mesh objects, and how to place them on the screen? thanks
Ok I am using Tom Miller's Managed DirectX 9 Graphics and Game Programming Book. I am doing the example for Checking Device Capabilies and I am getting a Null Reference Exception on the ToString() method of Manager.GetDeviceCaps. From my understanding of extencive debugging this is being ...
I'm writing an application in C# with Managed DirectX and I noticed that if I run this (simplified) line:angle = Math.Atan(0) + Math.PI; I get a result that is not Math.PI. It's off in the 7th decimal place. Even if I further break it down like so:double temp = Math.Atan(0)angle = temp + ...
276 byte By
xaka at 2008-2-4
If i create only one static vertex buffer in my program and i do: Lock/Unlock....Lock/Unlock....Lock/Unlock....etc - all this calls return me same start memory address for vertex buffer data if this buffer not been recreated or not? P.S. sorry for my english pls :)
202 byte By
NicoRi at 2008-2-3
Hi there, the shader debugger from the latest dx sdk (August 05) doesn't start in my VS 05 beta 2. In VS 2003 the debugger works fine. Does somebody know what's the problem? Nico
Hey guys, I am an indi. developer and I am working on a big project that needs some assistance. I have tested my application that I have built and the engine I am writing for it and came across a nasty error. My engine works off of different elements that are displayed in my SceneManager ...
653 byte By
Alexuo at 2008-2-2
First thing - does MS(r) D3D(r) REFerence rasterizer provides pixel shader support? Second - I've launched D3D(r) Pixel Shader example of MS(r) DX(r) 8 SDK (r) and on my GPU (Intel 82588 GM/GME or something like this, if it will be neccessary I'll write full naturally name, VGA not ...
526 byte By
KPbIC at 2008-2-2
I have Cube Texture and i use it for env mapping, and i wanna draw cube object (env) with this texture.i use IDirect3DCubeTexture9::GetCubeMapSurface but i cant set this surfaceto render ( IDirect3DDevice9::SetTexture or ID3DXEffect::SetTexture ) because it need IDirect3DBaseTexture9 ...