Search Forums
-
It shouldn't be 2 orders of magnitude, so unless you're exaggerating by 1 order of magnitude then something is rather wrong. Back when I had a single core AMD 3500+ my figure said it was (naively) about 7 times slower, when I upgraded to a Q6600 it was more like 10-12. If you're really seeing code running 100 times slower on the 360 ...
-
If you know how to do it with models then it's even easier to do for textures. You've got System.IO to load the texture file, construct a Texture2D, and call SetData with the data that came from the file...
-
I ran that game with vsync off and IsFixedTimeStep set to false and it was running at somewhere between 3000 and 4000 fps. It quickly became clear it isn't use time-based updates as it was unplayably fast, but no sign of low FPS to me. (60hz with vsync on btw).
-
I posted a Connect issue re EnableAutoDepthStencil not working on 360, I'm sure it always used to as I had a 2D game running at 1920x1080 and it used to run better without an auto DepthStencil as it didn't trigger Predicated Tiling, this doesn't seem to be the case any more. I can't think of any reason why one would always need to ...
-
You don't appear to have read the documentation for that version of GetData as it reads:
Parameters
data: The array to receive texture data.
startIndex: The index of the element in the array at which to start copying.
elementCount: The number of elements to copy.
So your second argument can't possibly be ...
-
How many megabytes are we talking about? I probably shouldn't quote any drive speed figure unless I can also go find them in a public presentation, but unless you're saving well over 10MB it's hard to imagine it taking more than 3 seconds.
-
Although you might think that calling Dispose before 'new'ing another Texture wouldn't increase memory consumption, it's likely that the either the GC isn't keeping up or that the resources on the GPU aren't being cleared immediately. Either way, there's no need to do what you're doing, create the Texture once, ...
-
You need to explain what you mean by lag... Is this a brief one-time stutter that occurs when the SoundEffect is loaded, or does it stutter (low frame-rate) for the entire duration the sound is playing?
-
You need : "GraphicsDevice.Textures[0] = null;" before you SetData(foregroundColors) in Draw to unset the texture from the device.
-
You need to move it to LoadContent where you originally had the loading of the pixel texture (that's no longer needed). I literally just cut and paste the line:
spriteTexture = new Texture2D(graphics.GraphicsDevice, screenWidth, screenHeight, 0, TextureUsage.None, SurfaceFormat.Color);
from Draw() into LoadContent().
As for FPS, I just used ...