Answer Questions
Alquimista09 Drawing points
Hi - new to C# and XNA, but an experienced C/C++ coder. Maybe I'm being an idiot, but having gone through the XNA Game Studio Express (beta) docs I can't see any convenient way to draw 2D primitives such as rectangles, lines or points (ie. things other than sprites). Is there any equivalent in XNA for a Direct3D point list for example I just want to plot some raw pixels in 2D, and right now the only way I can see to do that is to create a big Surface or Texture2D and then use the setData method, which seems a little wasteful to me. Is there a better practise for this kind of thing, a more efficient way to just set pixel values ShawnKY wrote: I know this topic is rather old and dated, but, it ...Show All
Jay_Vora_b4843e SWM Model Component
Hi all! I just finished a simplified version of a swm loader component based on the classes in SpaceWars. I used X-Tatic's converter to transform the tiny.x model into swm http://astaroth.beatbuggy.net:8080/Downloads/x2swm_1_0_0_1.zip I sent the sources to www.xnaspot.com , hopefuly, they will put it online soon. P.S. the smaple also includes components for a grid, and for FPS (which can be set to be displayed in the titlebar, screen or both) Have Fun! Catalin Zima P.S. I also wait for XNAspot to post my sample of VertexTextureFetch in XNA ;) hi, email is Thnaks, I wiil luv to convert it to vb.net..... que ...Show All
VernonRhoda Custom Rotation
Hello all, I'm having a bit of a problem with rotating. I'm rendering a triangle by defining its coordinated to the vertexbuffer. Now, i want to rotate it around when of the points. rotating the world around the X, Y or Z axis won't do the job. I'll try to draw it. This is the triangle i render. /\ / \ /___ \ Now i want to rotate it by 90 degrees, so it would look like the next draw: /| / | / | \ | \ | \| I dont want the size to change (don't let my great drawings to mislead you). Is there an easy possibility to do it by changing the World Transformation, or i have to change the coordinates of the vertex and to what values Thanks. Derek Nedelman wrote: D3D ...Show All
Rakesh Jha Official List of Features and Limitations of the various Pixel Shader versions?
Does anyone know of an official list of features and limitations for the different Vertex Shader and Pixel Shader versions (1.1, 2.0, 3.0, etc) I couldn't find anything on the Microsoft or nVidia web sites or on the web. I don't even know for sure who governs these standards. Cool, I'll continue to pray to the XNA Gods for geometry shaders then. Is there any documentation on this I almost gave up geometry instancing on PC, since I've read somewhere on nvidia's site that the gain isn't that high when passing a certain number of batches / frame. I'll soon get an xbox, so I want to be prepared to use as much of it's power as I can :) ...Show All
Steve from adzac set resolution
How do you set the screen resolution (and full screen options) in beta2 If you are using the app model, you can set a preferred Backbuffer size on your GraphicsManager component. Before you call ToggleFullScreen() you can set a preferred full screen resolution seprately and vice versa when you switch back to windowed. The same as you would in Beta 1. The GraphicsDeviceManager is what used to be called the GraphicsComponent. The properties were renamed a bit to better indicate that they are the "preferred" values, but depending on the hardware you are running on, may not be valid, so we'll fall back to a mode that is as close to your preferred settings. Look in the spacewar sample - ...Show All
RamyaP Speech SDK is a recommended XNA download? :D
Speech SDK works with XNA :P Why is this marked as answered No one has answered this! UNANSWERED Hi this is Brandon Tyler of GotSpeech.net. Where do you see that Speech SDK works with XNA I looked at Related Resources and see: Related Resources XNA Developer Forums XNA Game Studio Express Beta Readme XNA Developer Center Microsoft Visual C# Express 2005 I am very interested in finding out more about XNA and it's connection with the Speech Application SDK Or is it this SAPI stuff I too would like an answer to this question. Given the high level of headset usage amongst Xbox 360 users (by virtue of the fact the premium kit comes with one) having some sor ...Show All
Pawnder A question regarding content not explicity included in the project
My apologies if this has already been asked, but I seek guidance on a conceptual problem I am having. I am attempting to write an engine that would exist as a stand alone executable and then read in a script file which would direct it's actions. However the problem as I understand it is that all assets must be included in the XNA project. Is there a way to set things up so that an XNA executable can access files using a relative path I thank you for your time. DreemerNJ wrote: A texture loader in a loop would look like this: currentCharacter.currentFrame.texture = Texture2D .FromFile(graphics.GraphicsDevice, "content\\graphics\\"+Directory+" \\"+Filename ); Be aware that Texture.FromFile ...Show All
LazyGenius Does LPD3DXMESH have built in values I can adjust manually?
I have my CUBE.x loaded into LPD3DXMESH object. Are there specific flags I can set for the entire object Like I want to translate/rotate/scale just this object in the view of my camera. I don't want these changes to affect any of my other loaded models. Are there local axises that I can alter Ok so I have my device. LPDIRECT3DDEVICE9 pDevice; I also have my Mesh object: LPD3DXMESH oglla; THen my matrix . D3DXMATRIX pTheWorld; 1st: I load my mesh into the device. if FAILED(D3DXLoadMeshFromX( "MYCUBE.x" , D3DXMESH_SYSTEMMEM, pDevice , NULL, &mymodel1, NULL, &dnumofMats, &oglla )) { MessageBox(hWnd, "D3DXLoadMeshFromX" , ...Show All
Jeff Walsh How can i obtain extra information from a File using Content importer?
How can i obtain extra information from a File using Content importer Now i already have made a content importer for my ownfile format, that is ok because i se the importer to extract the texture Infromation from my file... But the problem Is that i have very valuable information in my file format in addition to the texture infromation, This is the code that i use to import the texture content from my files (jki Files): /// <summary> /// Importador de archivos JKI al XNA Content pipeline /// </summary> [ ContentImporter ( ".jki" , DisplayName = "Imagen De Multiples Frames JKI" , DefaultProcessor = "Procesador para arc ...Show All
as004 standalone content pipeline
Hellow guys! I need to create a ContentPipeline object away from xna framework class Game. Do you know a way to make this thanks! Shinji Microsoft Student Partner Cool!! I downloaded code and I will see the source at night, after I'll back here! thaks! I believe this is what you are looking for: http://www.codeplex.com/xnadevru/Wiki/View.aspx title=XNA%20Content%20Builder%20%28XCB%29 Thanks I wrote a control with xna graphics device and I want to load content pipeline files, but I don't use the main class Game... Thanks! Joel Martinez wrote: I'm not entirely sure what you're asking. 1. are you asking about how to remove dependencies on the Game class what functio ...Show All
Vikaskumar_09 Sprite is not transparent
Ok I finally got the game to work but I have a new problem...my texture which I made transparent in DirectX, doesn't have the transparent background when I run it. Is this due to my graphics card & me adding that line of code to make the program work Sorry I can't remember the exact line but it's been floating around the forums, I think we all know what it is. OrpheusTheBard, That did the trick! Thanks a bunch! -Mokda This is how I got transparent textures to work... Use the DirectX Texture tool and create a new texture the same size as your sprite. Now import your sprite into that layer. Now create a new sprite that is black and white. White is what is visible and black is transparent. a ...Show All
Johanvh manual texture access
I wisth to fill in floating point values in a texture, I have tried to outline the idea below. I have however not really understood the way you can access texture data, the texture is of the format D3DFMT_A32B32G32R32F, kinda miss glTexImage2D D3DLOCKED_RECT LockedRect; md_pTexture->LockRect(0,&LockedRect,NULL,0); FLOAT *pbits = (FLOAT *) LockedRect.pBits; for(int x = 0; x < md_nWidth; x++) { for(int y = 0; y < md_nHeight; y++) { pbits[x+y*LockedRect.Pitch+0] = 1.0f; pbits[x+y*LockedRect.Pitch+1] = 0.0f; pbits[x+y*LockedRect.Pitch+2] = 0.0f; pbits[x+y*LockedRect.Pitch+3] = 0.0f; } } md_pTexture->UnlockRect(0); >> The code does like "ok" bu ...Show All
JIM.H. Can't compile 3D code example
I'm having trouble compiling the tuturial code sample for GSE beta 2. The first 3d tutorial code as cut and pasted from microsoft (as modifed by me to reference my namespace) looks like what you see below. When I compile I get that a valid vertex or pixel shader needs to go on the device before it can be drawn, which make sense, except that the tutorial doesn't say how to do this. Can anyone help #region Using Statements 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; #endregion namespace WindowsGame2 { /// <summar ...Show All
&#91;MSP&#93;Daniel Oliveira Error Loading XML data
An unhandled exception of type 'System.InvalidOperationException' occurred in System.Xml.dll Additional information: There is an error in XML document (27, 16). Anyone know how to fix this Not without seeing the XML. I think I fixed it. I was under the impression you needed to call BeginShowStorageDeviceGuide every time you wanted to transfer data on the Xbox360. Apparently, you only need to call it once to establish the storage device and calling it again, in my case, seemed to mess things up. I had to call File.Delete(filename) to remove the file. ...Show All
jschroeder Problem with DirectX and Visual Studio 2k5
Hey, I've noticed something very wierd. I am using Visual Studio 2k5 for sometime but I've never tried to complile my previous Direct3D relelated projects on this release of Visual Studio, maybe because it never occured because the machine that I was developing them had 2k3. Now for the Problem if you create a Win32 default application with MFC support (or not) that you try to write the following stuff you get linker errors and sometimes complier errors. I've never had them before and I don't know why they are occur. I checked for the Project Properties, altered some stuff (such the use of precompiled headers etc with no luck :S). The DirectX samples compile fine but I don't know the cause of the pr ...Show All
