Answer Questions
Taurus101 Problem with ComputeBoundingSphere
I'm trying to use the Geometry.ComputeBoundingSphere method to get the radius of the bounding sphere of a simple mesh. The code is as follows: using (VertexBuffer buffer = this.mesh.VertexBuffer) { GraphicsStream graphicsBuffer = buffer.Lock(0, 0, LockFlags.None); Vector3 center; boundingSphere = Geometry.ComputeBoundingSphere(graphicsBuffer, this.mesh.NumberVertices, this.mesh.VertexFormat, out ...Show All
DMartin HLSL pixel shader: problem with tex coord computation/texture lookup
I'm sitting on a strange problem for half a day now and can't figure out why things are happening as they happen. :) What I'm trying to do is to look up a texture with entries of size 3*3 texels each ( g_samCurvatureTex : this is a magnified part of it, the whole tex is repeated like this - I am only interested in the blue channel right now). At first I need to compute the centre index of the entry: #define CURV_TEX_ENTRIES 42 ...Show All
GaryWH Performance problem with Texture.FromBitmap
I reduced program boot time (when running from within the IDE) from 12 seconds to less than 1 second by re-writing Texture.FromBitmap using unsafe code. For me it was easy because I'm only using 32 bit textures and 32 bit bitmaps. It would be nice to see this function optimized in future releases of the SDK. BTW, Texture.FromStream has the same problem. -Jeremy I am also having the same prob ...Show All
sllxnbierwl Are there any drawbacks to this?
Hi again! I had this freaky idea earlier today where I decided to render my entire GUI to a texture and render this texture to the screen. This way, I don't have to go through my entire GUI rendering process every frame, which seems to double my framerate in GUI intensive situations. I only update this texture when when the GUI needs updating. I can't shake off this dodgy feeling that this can't be a good way to do things though. Is there ...Show All
greenwire question about framework camera
how can you use the camera.FrameMove(elapsedTime) with out a effects file, im using for all my view, world and projection matrix just the basic setup for it device.Transform.World = Matrix....ect.... but I would really like to have the option of using the FrameMove function that the ModelViewerCamera has. anyone have any ideas on how I can use this... after messing with this for a few hours this is what I came ...Show All
eduard.gruber converting mouse 2d to 3d space problem
hello guys , sorry for reposting the same question . iam unable to get 3d co - ordinates here is my code case WM_LBUTTONDOWN : GetMousepos(&point); Device->GetTransform(D3DTS_VIEW ,&viewM); Device->GetTransform(D3DTS_PROJECTION,&projM); D3DXMatrixInverse(&InverseProjM , NULL,&projM); D3DXMatrixInverse(&InverseViewM,NULL,&viewM); later i dont know ...Show All
Peter Gubanov Creating custom data structures for HID devices via DirectInput
Hi all, I'm working on accessing generic HID devices on Win32 via DirectInput. It's generally going well, but I've hit a snag. The devices I want to send and receive data to are non-standard devices - that is, they are not keyboards, mice or joysticks. So, I think I need to use SetDataFormat with a custom DIDATAFORMAT structure to define a custom structure for these non-standard devices. I'd expect to itera ...Show All
gordonhogenson OSD Please Help
Hy guys! First of all: My English is bad. I want to write an OSD that overlapps everything i mean really everything. I want it for helpful use in Games so it have to overlap an active DirectX9 Application everything is there Keyboard shortcuts works but i realy don't know how to overlapp an Fullscreen Running Game... so please help me thx I'd suggest the DX forums would be the best place to ask about this. I'll move it there. ...Show All
Steve Jackson Unmanaged DirectX with Managed C++
I have been reading about the .NET framework for quite some time, and I found that Managed C++ allows mixing unmanaged and managed code. I've got a few questions about that. Is it possible to use an unmanaged API (like unmanaged DirectShow or DirectX) in a managed application If so, are there any steps that need to be done to do this Are managed API's like DirectX.NET also availible for Managed C++ If so, how do I know if I'm using the managed o ...Show All
MohitGupta Early Out
Hi. I tried at the "regular" DirectX forums but since there was no answers or even faint ideas I am gonna post my question here. I have a fairly simple shader which loops over a numer of calculations. With ps_3_0 can we exit an loop and the fragment program early on if a certain condition is obtained for( ... ){ if( b > constant ) return Output; } } return Output; To clarify, the &quo ...Show All
LucasM D3D background picture
Hi folks, What I need to do is fill the background of my window with a particular bitmap. Bitmap can be of any size... 200x100, 640x480, 1920x1080, etc. and it should stretch to fill the window. Much like your desktop's background picture. This is in a D3D windowed app written in VB.NET using Feb2006 MDX. All 3D and sprite rendering is done on top of the background image. How do I do this My current knowledge tells me I have to load a tex ...Show All
aswini_kayal Run time error when attempting to toggle Wireframe mode.
I'm trying to design a simple button that toggles wireframe mode on a Mesh. So I tried the following code. (I am using the DXUT framework) private void OnWireClicked( object sender, EventArgs e) { if (( int )(sampleFramework.Device.RenderState.FillMode) != 3 ) sampleFramework.Device.RenderState.FillMode = FillMode .Solid; else sampleFramework.Device.RenderState.FillMode = FillMode .WireFrame; } I don't ...Show All
HG71 about install XNA
I use winxp and vs2003 and after i install xna, i can't find " XNA Build Project" from my vs2003' Project Types, so i can't follow the Tutorial 1: Creating a Basic XNA Build Project How can i do, or how to install xna corrently.. Thanks Have you installed XNA Build yet When you install XNA Build we will install the Visual Studio 2005 Premier Partner Edition (PPE). This is the Visual St ...Show All
Wommat I can't display a textured model.
Hi! I have written a simple application using Directx9 with VB.Net 2003. All I want to do is to display a very simple model (rectangle) with a texture added to it. Unfortunately I can not do this properly. I can only get a black rectangle as a result (it is displayed at correct coordinates). Can anybody help me What is wrong Below you can find a sample of my code. I think, a bug is somewhere there. Dim BuforWierzcholkow As Ve ...Show All
Julius Paraiso What the heck has happened to utility.timer and directxtimer?
I've been working through an introductory Managed DirectX book and there is some code that refers to a thing called "utility.timer" and a call to "DirectXTimer.GetElapsedTime". Neither of these things compile for me in VS.NET 2003 with DirectX 9. I can't seem to find anything at all on the utility function, and damn little on DirectXTimer. Obviously these things have become defunct, but what has taken their place Where should I be looking ...Show All
