Answer Questions
freestar Numeric performance on 360
A question for the framework/VM guys... I have ported one of my simpler benchmarks to the 360, and find that the numeric performance is running 5x slower than my 2.8GHz P4 desktop. Now I was expecting a drop in performance on the 360, allowing for the difference in CPU implementation (in order execution / branch prediction etc), but nothing like this magnitude! The benchmark simply transforms a source array of Vector4s to a destination array of Vector4s, using a 4x4 matrix. Have you guys done any benchmarking of pure numeric perf, and if so is this in line with what you get Andy. You might want to read this in order to get some ideas about why numeric performance is lower than desktop, it's a ...Show All
Dottj Where is Torque X?
I readed on Garage Games site that Torque X should have been released today (November 11). Where is Torque X Someone know what's going on Nice! That wasn't there earlier. I know it has been finished, they just haven't uploaded it yet. Give them some time. I think you'll have to ask the GG guys. I checked their site today and didn't see anything and nothing in the quick scan of the forums there either. Finally... I will download now! Speak of the devil, http://www.garagegames.com/products/torque/x/ ...Show All
Pocketmnky XNA and Winforms - 2 questions/problems.
Here is a basic app (sample code from larger app) to highlight my problem(s): public Form1() { InitializeComponent(); pp = new PresentationParameters(); pp.AutoDepthStencilFormat = DepthFormat.Depth16; pp.BackBufferFormat = SurfaceFormat.Bgr32; pp.BackBufferHeight = 600; pp.BackBufferWidth = 800; pp.EnableAutoDepthStencil = true; pp.PresentationInterval = PresentInterval.Immediate; device = new GraphicsDevice(GraphicsAdapter.DefaultAdapter, DeviceType.Hardware, this.Handle, CreateOptions.SoftwareVertexProcessing, pp); device.DeviceReset += new EventHandler(device_DeviceReset); device.DeviceResetting += new EventHandler(device_DeviceResetting); device.Device ...Show All
poita Extracting the transformation matrix for a subobject in a mesh
I have an x-file containing some objects objects. I would like to load this as a mesh and then extract the transformation matrix for some of these subobjects. If I have designed a model (in 3ds max) with a box located at 0,0,0 and another located at 1,2,3 and neither one is rotated or scaled, then the xfile consists of the two boxes and each has a transformation matrix. The first has the identity matrix as its transformation and the second one has a translation to 1,2,3 as its matrix. How can I extract those two matrices without writing code to parse the xfile I need this to build a mechanical model onto which I plcae a number of connector pads. Later I want to design other objects and mount them on those connectors. For example i ...Show All
sl0140 Please Add Non-Generic DrawUserPrimitives and DrawIndexedUserPrimitives methods.
I posted this request in the Suggestion tool as well. Btw- where is the link to actually view the contents of the Bug reports, and Suggestions You'd think that would be handy from the connect.microsoft.com site, but I can't find it. Add the method: Device.DrawUserPrimitives(Type vertexType, PrimitiveType type, int count, Array vertexData); and a similar non-generic method for Indexed primitives. I have a rendering system that captures rendering calls, and retains the call information. Later on, it sorts all of the calls in order to minimize state changes before execution. This is a very commen scenario. IT IS VERY DIFFICULT to call generic methods (in a generic fashion) when you only know the vertex type, and have a un-typed array. For ...Show All
Brian Kramer XNA's use of Collections
XNA uses Collections for a lot of things: ModelMeshCollection, ModelEffectCollection, EffectPassCollection, ModelMeshPartCollection, etc. which results in a lot of foreach iteration in code. I recently discovered the CLR Profiler and started poking around. It appears that using foreach on these Collections results in creation of SZArrayHelper and Enumerator helper objects. Most other systems are doing pretty well to avoid any constant object "leakage", and I'd rather keep it that way if possible (I come from the "No Dynamic Allocations at Runtime" school of console development). I'm still pretty new to C#, so what I'm wondering is if there are there ways to avoid this constant pressure on the GC -beyond hand unrolling t ...Show All
Bachi TEX2D 2nd overload: HLSL Bug or erroneous usage?
Greetings to all Forum Members and an amazing 2007 to everyone! DESCRIPTION: I'm doing a shader that uses the seccond overload of Tex2D to do a Texture lookup (source rect) before stretchs it with the Texcoord. So I did declare the float2 to store the source rectX and rectY in the parameters as follows: // My Shader texture Mytexture < string myfile = "TexFilename" ; // It's a 256X256 Bitmap >; float2 Xorigin = {0.0, 64} ; float2 Yorigin = {0.0, 64} ; After I did sample it... // My Sampler sampler2D MySampler = sampler_state { Texture = <MyTexture>; MinFilter = Linear; MagFilter = Linear; MipFilter = Linear; }; Pass it trough Pixel Shader after the VS, to do the cut I did use t ...Show All
Duncan Woods Present.DoNotWait
I thought I would post this code in case it might be useful to someone. This is a modification of the Draw function from the "Your First XNA Game" section of the XNA documentation. An earlier thread about input polling with a low frame rate got me thinking about using the Present.DoNotWait flag to allow more Update calls to happen while the device is still drawing. This way you don't have to create a separate thread to get more resolution on the input polling. On my machine, the Update function was called about 11000 times per second with 85 frames drawn per second. This is with vsync and fullscreen on (this doesn't work in windowed mode). Also, if anyone can think of a problem with this scheme, I'd love to hear about it. ...Show All
zhihao Absolute and relative mouse movement
Usually when dealing with mouse input you want the data from the mouse in two forms, one is absolute that you might use to draw a cursor or know which part of the window/screen a user has clicked on, and the other is relative where you are only interested in how much the mouse has moved. Currently, the MouseState only seems to report the mouse movement in the absolute form. This means anyone using the mouse to control, for example, a first person camera would find their movement limited by the size of their window/screen. I have tried playing around with the Mouse.IsCaptured property but it doesn't seem to make much difference, quite possibly because I don't know how to use it. Am I correct in thinking that getting relative mouse input dat ...Show All
Kosmo007 [XNA] Number of AudioEngine instances
I was wondering if there was any ill effect to creating multiple instances of AudioEngine (each pointing to different XACT projects), or if it is highly preferred to put all sounds in one XACT project and do everything that way. Sound design aesthetics aside ... I just want to know how to structure and organize things :-) Thanks. Answered by the ever so helpful Shawn Hargreaves http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1150632&SiteID=1 ...Show All
Jithendrian Math Help
I'm Trying to calculate an angel then convert it into float. Here Is my code so far Double MyY; Double MyX; Double MyAngel; Double Myangel; Double myangel; public void Anglr() { MyY = (dest.y - origin.y); MyX = (dest.y - origin.x); MyAngel = Math.Tan^(-1)(MyY / MyX); Myangel = Math.Round(MyAngel); float.Parse(myangel); } This has th problem can't convert from double to string. And I can't get the value in the first place. Math.Tan^(-1) is meant to be tan to the power of -1 this also gives me an error. any suggestions Also, it's spelled angle. Angels are the spiritural beings from god. To convert a double to a string just use ToString on the double value, for ex ...Show All
redhanz What's difference between Express and Professional?
I've installed the Express edition beta 1, but I have interesting to the Professional edition. I thought the Professional edition should have more classes than Express edition, but I've never seen any documentation to compare the class library of each edition. Could you tell me the differences of them, particularly about class library Or I'd be happy if I could find the reference manual of XNA Game Studio Professional on the net. Thanks, Hayashida Fine. Play a wav file in your game using XNA without creating an XACT project for it... It can't be done. You CAN do this in DirectX... It looks to me like they intentionally removed useful functionality that was in Dire ...Show All
Adamus Turner XInput Common controller 32 bit wont install
Hi I need to use XInput for a program I am writing in VB.NET 2005 (to use the xbox 360 controller). However I am not sure what software I need to download. I thought I needed the Microsft Common Controller 32bit but when I tried to install it, it says "Installation did not complete" Please help me! Thanks Yeah Im running SP2 and the .Net Framework and i cant find anything wrong with my computer. Maby the file is corrupt I had the same problem, although I've used those drivers before and they've worked correctly. When I couldn't get them to work, I just plugged in my gamepad and let windows update find the drivers, and that worked correctly. ...Show All
tovarish Losing Device in Vista...
I am working on a small game project and one of the systems we're dev'ing on is Windows Vista, obviously. I understand the focus of DX 10 and even DX 9.0Ex, but we need to have full backwards compatibility, so not looking at DX 10 yet. the problem we're having is that at any certain point while playing (happens fairly quickly), the game stops rendering (in windowed or fullscreen) but it hasn't locked up. If I alt-tab from and back to it, then it starts up rendering again (device reset)... I ran it thru PIX and did some looking over draw calls.. and Present returns Unknown Result.. then a bit later it is doing DeviceLost result... then it gets the Reset and works fine. :( I'm a bit stuck right now trying to narrow down what needs to be chan ...Show All
someone_ch Sample Framework
first iam beginner,iam using sample framework to try create primitive mesh, after i initialize the mesh like this int OnCreateDevice: _mesh = Mesh.Box(_device,2.0f,2.0f,2.0f); then i render it on OnFrameRender like this; device.Transform.World = Matrix.Translation(0,0,0); Material mtrl = new Material(); mtrl.Diffuse = Color.White; mtrl.Ambient = Color.Green; device.Material = mtrl; _mesh.DrawSubSet(0); iam finished my code.. but i see nothing.. iam wonder what is the OnFrameMove i have to write code on OnFrameMove to see my mesh Box or i missed something .. thanks, ivanik About the sample I pointed you to. It will ONLY get you started - namely - you will get to a ...Show All
