Answer Questions
Dmitry N. Oleshko How to use View and Projection matrix?
Hi. I'm trying to draw a vertex buffer (using PositionColored vertex) but I can't see anything. So, reading about it on the web, I've found that I need to set two matrix: Projection and View. I've donet it! Take a look: // Create the vertex buffer private void OnVertexBufferCreate(object sender, EventArgs e) { VertexBuffer buffer = (VertexBuffer)sender; CustomVertex.PositionColored[] verts = new CustomVertex.PositionColored[3]; verts[0] = new CustomVertex.PositionColored(0.0f, 1.0f, 1.0f, Color.Aqua.ToArgb()); verts[1] = new CustomVertex.PositionColored(-1.0f, -1.0f, 1.0f, Color.Black.ToArgb()); verts[2] = new CustomVertex.PositionColored(1.0f, -1.0f, 1.0f, Color.Purple.ToArgb()); buffer.SetD ...Show All
joeycalisay Windows competes for framerate?
Hello all, I am running a windowed D3D scene for easier debugging so I have set the scene to pause when the window loses focus. This works fine when switching between windows but there is one flaw left. When my application has the focus and my mouse moves over any item on the taskbar, a helper popup appears that describes the item below the mouse cursor. Using Winspector to monitor whats going on, this popup comes from the SysShadow class and its like competing for framerate with my application, because it wants to fade in and fade out. When it starts to fade in, the framerate drops to 2-5FPS, just like when the application loses focus. When it fades out, the framerate goes back to normal. The D3D window recieves no window messages what ...Show All
Vijay_kar Vista allows What versions of DirectX?
(split from http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1221168 to make a new question) It is interesting that you say that because I am testing a VB6 app that was working fine on XP and below but now fails on Vista when it tries to create a DirectX8 object, specifically Set oDX = new DirectX8 throws Error 429, ActiveX failed to create component. Running in XP SP2 compatibility mode does not work either. I would be really grateful if anyone has any ideas on this. I also tried running the latest DX9 redistributable because I heard that was providing backward compatibility, but to no avail. Thanks. After some research I've come to the conclusion that this file s ...Show All
HowardRichards Show mouse cursor?
The mouse cursor is automaticly hidden in a standard XNA application. Is there some simple way to allow the application to show it instead (without having to fuss with Win32 calls etc) Here you go: this.IsMouseVisable = true; ...Show All
bkizzy Rotating triangles without using the world matrix
Hi, I've only been using XNA for say, a week now Trying little things and whatnot, anywho, I was going to make a little asteroid game. Everyone knows how the game works so it's pretty much a great place to start, but unfortunately for me, I don't like using other peoples code. I always prefer to read it, re-code it and start from scratch. The problem I faced was I ran out of coffee, and couldn't figure out how to rotate a triangle, hopefully you guys will be able to help me! Just so you know, I don't want to use sprites, I want this to be 100% lines and whatnot. What I want to be able to do is independantly rotate the triangle either clockwise or anti-clockwise, without any of the other "world" changing. Forgive me for s ...Show All
sagittarian Install XNA beta1 express
I have visual studio 2005 team suite and i want to install XNA, i downloaded the XNA beta 1 express and when i install it it says i need visual C# express,,, does visual studio 2005 team suite not good enough or is there anothe version for this visual studio. some 1 know how can i make it work mig16 Hello, XNA Game Studio Express only works with C# Express. You can have Team Suite and C# Express installed side by side with no problems. For more information please see this post on our team blog: http://blogs.msdn.com/xna/archive/2006/10/10/XNA-Game-Studio-Express_2C00_-C_2300_-and-Visual-C_2300_-2005-Express-Edition.aspx Thanks! ...Show All
WingingIT Capturing the mouse
Hi, I control my model with mouse. The problem is that when the mouse reaches the bottom of the screen, the model stops moving. How can I capture the mouse to make the rotation infinite (while I move the mouse to one direction, the model keeps rotating) Here is the code of the current mouse control: MouseState mouseState = Mouse.GetState(); x = mouseState.X; y = mouseState.Y; if (y > previous_y) { modelRotationPitch += 0.01f; previous_y = y; &n ...Show All
Alexey Kuk DDS : 360, PC
Will DDS files that are created for PC work with the 360 is there not some subtle difference between the two or is this something that will be patched up via the XNA runtimes on the 360 upon asset loading If you build a DDS texture with the PassThroughProcessor ("No Processing Required" in the IDE) in a Windows XNA game then the resulting .xnb is almost exactly the same as the source DDS. This makes sense because DDS files are pretty much a binary dump of a DirectX structure. If you build the same DDS in an Xbox 360 XNA game then there are many differences but the file size is the same, this is probably because of the block swizzling that Nikster has already mentioned. So, in answer to the or ...Show All
drscape Rocket Commander XNA Game
Hi everyone. I ported my famous Rocket Commander game (first .NET 2.0 game, free game with source code) to XNA and thanks to some multi-threaded optimizations it runs very good on the Xbox 360 too now. More information, the download links, screenshots and some notes about the porting process from MDX to XNA can be found on my blog: http://abi.exdream.com Rocket Commander XNA Screenshot: nice game the games dos not compile missing XnaGraphicsEngineContentProcessor.dll keep up the work its missing the XNAGraphicEngineContentProcessors project can not compile the source... its missing the XNAGraphicEngineContentProcessors.dll Great game =D ...Show All
jwrodriguez XNA on Original Xbox?
Back when XNA was first announced at GDC 2004 it was said that XNA would be a unifying environment for both original Xbox(and future versions), PC and mobile devices. With the XNA framework now available for the Xbox 360 are there any plans for supporting the original Xbox I know there are about to be 10 million Xbox 360 consoles shipped by the end of this year, but as of last May Microsoft said they had shipped at least 24 million Xbox consoles worldwide. It seems like it would be a good idea to also target that larger audience that has the original Xbox console, no BTW, I did read the FAQ and found the following entries: Q: Is the XNA Framework available on non-Microsoft platforms A: At this time, the XNA Framework is only avai ...Show All
sRi rAM lasers for my ship
Hello, I want to make the lasers for a space shooter game and I didn't found a way to make them to look good. I tried to do them using 2 sprites that intersects at the middle, and looked good but not always, when it looked like an X. I also tried to use a cilinder like mesh but this also looked bad because I couldn't make it glow. Does someone has any ideea on how to make this look good Thanks. Point Sprites Yes 2 point sprites, and that is why it looked like an X when i rotate the camera to see the laser from the front view. Someone sugested to place another sprite in the middle which is perpendicular to the other sprites. But this looks bad from another point of view. ...Show All
Matt354245 Problem with custom vertex format
Hi I am trying to create a new vertex format for billboards and particles Can someone help me out with this naste compilation error. I am guessing this is because I am a new C# user. The class below is used like this. vpct = new BB_VERTEX[6 * myNumParticles]; BB_VERTEX.VertexElements = vpct[0].Create(); vpct[i*6] = new BB_VERTEX(topLeft, new Vector2(0, 0), new Vector2(myParticles .mySize, myParticles .mySize), myParticles .mycolor); VertexDeclaration decl = new VertexDeclaration(myGD, BB_VERTEX.VertexElements); myGD.VertexDeclaration = decl; myGD.RenderState.CullMode = CullMode.None; //This line fails compilation myGD.DrawUserPrimitives<BB_VERTEX>(PrimitiveType.TriangleList, myNumParticles* 2, vpct); /* Error 1 The type ' ...Show All
Nitin Khurana VertexBuffer.SetData
When I overwrite a portion of a static VertexBuffer can I overwrite just a portion in the middle of the buffer or do I have to overwrite from the starting point all the way to the end of the buffer Looking at the documentation. SetData is overloaded with parameters to allow an offset when setting the buffer. I haven't tried it myself - Run a few experiments. You'll soon find out the issues. ms-help://MS.VSExpressCC.v80/MS.VSIPCC.v80/MS.XNAFX.1033/XNA/SetData_VertexBuffer_Graphics_Framework_Xna_Microsoft_M_O.htm VertexBuffer.SetData (Int32, T[], Int32, Int32, Int32, SetDataOptions) Sets the vertex buffer data, specifying the start index, staring offset, number of elements, and size ...Show All
satishpkumarin Is XNA a Game Engine or Middleware ?
Hello I'm sorry about this thread but I did not found any concrete informations on what's exactly XNA Game Studio Express is... I know it's a framework like XNA about game making which support Xbox360 etc. but : 0) Is XNA GSE is a Game engine 1) Is there features like : collisions, physics, tilemaps, particles, scripts, network libraries 2) In what way concretly XNA GSE will help me to achieve games better than others middlewares like BlitzMax, Torque Game Builder, Haaf Game Engine, ... 3) I'm intend to write 2D games and have some experiences with those Middlewares but often fall into engines limitations, it is why i seek C# 2D full featured Game Engine without any result at this time :( Thanks for your help :) ...Show All
Hypercoder Might it be a BUG within DXUT?
The CGrowableArray template(dxutmisc.h, line 24) may exist with a slight BUG. This copy constructor not initialize three data members, so if you use this copy constructor, your program will crash! Solve it very simple! Modify it as follow: CGrowableArray( const CGrowableArray<TYPE>& a ) : m_pData (0), m_nSize(0), m_nMaxSize(0) { for( int i=0; i < a.m_nSize; i++ ) Add( a.m_pData ); } I wish next edition of DirectX SDK has solved it. My home language is chinese, my Englist is not too very good, and honestly hope you understand what I said. Hi! Hm, ...Show All
