Answer Questions
FlashFan Poor XNA performance or my poor code... or normal?
I've have created a simple scene that renders 8000 identical cubes. I know thats a lot of cubes, but I only get 4 FPS on a 2.0ghz dual core with a 7300 mobile graphics card at 640x480 with simply vertex shading and one directional light. This pc can run doom3 at 60FPS at that resolution and a program i wrote in MDX that draws about 1000 detailed spheres with specular lighting runs at over 100FPS Here is the code I'm using: using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; namespace WindowsGame1 { public class Game1 : Mic ...Show All
wencey Convert LPDIRECTDRAWSURFACE to LPDIRECT3DSURFACE9 ?
I’m writing a Camera Image Grabbing application using the Matrox Imaging Library (MIL) and DirectX. The MIL camera image buffer can be forced to be a DirectX surface with a creation flag. From the camera image buffer it’s possible to acquire a LPDIRECTDRAWSURFACE pointer. I want to display the camera buffer using Direct3D. My solution was to set the camera buffer as the render target of my D3D-device and Present(). This is not possible because the Device::SetRenderTarget()-Function does not take a LPDIRECTDRAWSURFACE pointer but only a LPDIRECT3DSURFACE9 pointer. So I’m asking if it is possible to convert (or cast) the DDraw surface to a D3D surface And on the same topic, as I will need this later: Is it possible to convert (or cast) the ...Show All
spiritowner Vertex Animation help
Hi, I'd like to do some simple vertex animation on a model using a vertex shader, but I'm having an extremely difficult and frustrating time figuring this out. I've been looking at the content pipeline documentation, I've found the tutorial about the BBox processor and done that a couple times, I've written a C# converter for a custom mesh format I have to X and still I can't work out how to accomplish this. I guess conceptually I understand how the content pipeline works. I ran the X processor DLL that ships with XNA through reflector and just about had a nervous breakdown looking at all the classes in there. I write geometry exporters, importers, and deformers for Maya at my day job, so I like to think I should be able to do this, ...Show All
David Kaiser Tricky Question
I have two objects namely Object A which is Transparent Object B which is also Transparent Object B rotates around Object A around the Y axis, and the camera is somewhere on the XZ plane. Transparency is implemented with blending, and the objects are drawn in the sequence above. Result : When Object B is in front of Object A, the scene is drawn normally. When it makes half a rotation and goes behind Object A, it disappears. The reason Because Object A is blended with the background before object B is drawn, so when Object B moves behind Object A, it is not drawn because of the z-buffer test, and is also not visible because it was not blended with Object A. Whats a workaround to this From m ...Show All
Nallasivan Camera track bend
Perhaps a bit of a tricky math question here... My camera has a current position and target, and a destination position and target. I have a "process" method, which moves the position a little closer to the destination every time it's run. This produces a smooth camera movement from point a to b... However, I want to give the user more of the scenery - as sometimes it's just looking at a wall. I plan to do this by keeping the camera target path the same, but bending the camera position path outward. Sort of like zooming out, away from the target, then back in again once the destination is reached. I have had several attempts at this, which include adding delta values to the Z and X axis' up to 50% of the way, then subtra ...Show All
@nt Finding out what shader constants are used by a technique
Hi! For DX9 I created a data driven model, where I in code would run through the variables in the shader to figure out which were used by a technique. This worked fine. However, I'm having a hard time finding out how this is achieved in DX10. In DX9 I used the method IsParameterUsed, but I see no similair function. The closest I can come is to create a shader reflection (one for vs, gs and ps) and from that run through the resource binding descriptors and get the names of the constant buffers - but I really would like the individual members of the constant buffer instead. What to do Henning I have not tested this yet by my own but it should work. Enumerate over all variables in the constant buffer with ID3D10ShaderReflect ...Show All
sawer Moving the view in 2D games
Hello, I'm not sure if this will make sense but hopefully it will. Essentially I working on a 2D platformer as a way to develop a small 2D engine I'm working on that will hopefully help me when creating games in the future with XNA. The game is much like Mario, and like in Mario I need the view to follow the main character while moving non-player characters/enemies off the screen. I was wondering if anyone has developed a view-handling class or other code that would allow for a view to follow my main character on the X axis atleast while moving other objects off the screen while still allowing them to move relative their location. So while my character is running to the right of the screen, all objects are being pushed to the left until ...Show All
azzyford Release of XNA Game Studio Express
Could we have more information about the releashe time In witch time zone I will wait until midnight GMT -5. Should a go sleep before and wait until tomorow We'll be sending a email to everyone who signed up at the connect website as soon as it goes live. It will be sometime tomorrow (hopefully morning) I know everyone's really excited and we want to get it out to you. We are in the Pacific Time Zone here. Sniff, sniff... So I go to sleep now :(. I'm very exited to try it. So if you releashe it tomorow morning, we will have it 3 hours laters in eastern time.I feel a little bit sad but tomorow, when I will receive this e-mail, I will siffer of amnesia . If yo ...Show All
Le Saint Full planet terrain rendering
So I've downloaded and ran the various terrain code samples and they work fine for a square area with a skybox. Here's the kicker: how would I go about extending this to render an entire planet full of terrain My goal is to recreate, as much as possible, the features of the Frontier (wikipedia.org) game we all enjoyed back in the day. To be clear, I'm just looking for the concept of how to go about this, or perhaps a pointer to an existing project. I'm having trouble wrapping my brain around the kind of LOD you'd need for something so grand (the ability to fly from space down to a planet and land on it). Anything is appreciated! I would love that, easlern, please. Perlin noise generators keep popping up ...Show All
c-breeze How do I make a certain ModelMesh invisible at runtime?
Is there a way that I can change the visibility of a particular modelmesh or modelmeshpart at runtime My art assets have collision walls in them added by the artist. I can remove them during the build processors, but I'd like to leave them in so I could optionally draw them for debugging. Is there any way that I can do this Yes; you can loop over all the pieces of the model, and draw then individually, instead of drawing the entire model with a single call to Draw(). You will have to bind the appropriate effects to do this, though, but that's pretty simple. You can even take it one step further, and draw only specific subsets of each each mesh. How you figure out what pieces to draw, and what pieces not to, is up to you, but it ...Show All
rahulsk1947 Where are these "assets", "samples" and "starter kits" etc?
I bought my annual subscription to the XNA Creator's Club yesterday. I've just read this on the Creator's Club description: "Both subscriptions provide aspiring game developers with access to thousands of game assets from Microsoft and key partners such as Turbo Squid Inc., as well as white papers, specialized starter kits, samples and technical product support to help turn Your World, Your Game into a reality." Can anyone tell me where I can find these "assets", "white papers" and "starter kits" etc AlfonsAberg wrote: Is there any big changes from the GSE beta 2 to GSE v1.0 No extra starter kits All I can see so far is that it allows you to run your ...Show All
PublicError Will the XNA Software Be Available On Mac's Some Time
Will the XNA Software Be Available On Mac's Some Time Well considering Apple finally decided Windows was the way to go, and you can now Run WinXP on a Mac, I don't see why you would not be able to run XNA dev kits on a Mac. I would not count on this. Maybe the Mono project or any other alternative implementation will include there on versions of the necessary XNA assemblies. But as they are based on DirectX that is not available for Mac’s it would be harder to do. David, What about Cider XNA Game Studio Express will only be available on Windows. aL XNA currently supports Windows and, later this year, Xbox 360. We have no announcements regar ...Show All
PCSQL66 How does one resize a texture in memory?
That’s it, I just want to know how to change the size of a texture in memory StretchRect wont work because the source and dest have to be RTs and I cant use RTs with GetFrontBufferData. UpdateSurface can’t change the size of the image. How should I do this The method GetFrontBufferData() copies data from the video card's memory to the CPU's memory. It's also very, very slow, and only intended to be used to generate screen shots. Depending on what exactly it is you're trying to do, a better idea might be to use StretchRect() to copy the back buffer to a render target texture. ...Show All
Samaritan Fullscreen mode doesn't seem to work for me...
Hi, I was wondering if anyone had any insight into this. I have my app, and it runs fine in windowed mode, but when I switch it to fullscreen mode, the display seems to clear the screen to grey every frame. I initialize my gfx component like so: gfx = new GraphicsDeviceManager ( this ) ; gfx.PreferredBackBufferWidth = preferredWindowWidth; gfx.PreferredBackBufferHeight = preferredWindowHeight; gfx.PreferredBackBufferFormat = SurfaceFormat .Bgr32; //I tried this thinking maybe it wasn't in a well supported mode that the graphics card knows. This doesn't work. gfx.ToggleFullScreen(); gfx.SynchronizeWithVerticalRetrace = true ; Even if I reduce my draw code to somethin ...Show All
saabdude 3d audio using xact
hi i want a sample program how to achieve 3d sound using xact iam little bit confused with the parameter xact require i need a c++ program It's not a sample, but I found this doc (with sample code) useful: http://msdn2.microsoft.com/en-us/library/bb172327.aspx ...Show All
