Wierd Framerate Problem
Ok I''m currently putting together a Breakout style game. I''m using DirectX in a window, as in not exclusive mode.
This is what the drawing routine does:
1) Blit backgound to an offscreen surface.
2) Blit the sprites to the off screen surface.
3) Blit the offscreen surface to the primary.
The sprites are all drawn using an overloaded virtual function contained in the base class.
The problem is that it''s slow. Now before you scream at me for saying its your inefficient code that at fault, the program kicks into overdrive if I run 2 instances of the program at the same time.
This has me perplexed to say the least.
Any ideas suggestions or help would be most appreciated.
Thanks in advance.
Make sure all the surfaces (sprites, offscreen, back and primary) are in the same memory location (all video memory or system memory)..
My guess is some surfaces fits in the video , while some fits in system and it has to read back from video memory (very slow)
when two version is started, then they all fit into system memory so it kicks into full gear..
..
My guess is some surfaces fits in the video , while some fits in system and it has to read back from video memory (very slow)
when two version is started, then they all fit into system memory so it kicks into full gear..
..
How do I specificly specify where to store a surface? On the sam subject how can I find out where a surface is being stored as in System or Video Memory?
GetSurfaceDesc(0; returns a DDSURFACEDESC structure with information like that, and when you create the surface you can specify whether you want it created in System or Video Memory. It all about structures. Fill ''em right .
=======================================
A man with no head is still a man.
A head with no man is plain freaky.
=======================================
A man with no head is still a man.
A head with no man is plain freaky.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement