Sign in to follow this  
blackpenny15

[.net] help, nothing changed, why repaint?

Recommended Posts

Hi guys, i'm new to c#.net development and DirectX, i just experience my first issue with memory leaks, 100MB every 10 seconds, nice! anyway fixed that and finished writing a basic portable DirextX 2D engine. I'm just looking at how to optimise things here, i ran the app thorugh ANTS profiler, wicked stuff and i can see my sprite is being called 12411 times and my text method is being called double that because i have two bits of text being painted, suddenly im thinking, ok, the sprite and two bits of DX text arnt chnageing, so why should they be repainted everytime a frame renders, isnt this the same principle as not rendering triangles that you can't see. So how can i achive this, any pointers, also as i'm starting off i am using the DoEvents() method, obiously i think its no good for comercial stuff, but i can't find any, "This is how it should be done" examples in c#.net, thanks for any pointers recived guys. Si

Share this post


Link to post
Share on other sites
If you're using C# you might want to take a look at XNA. What do you mean by "portable"? "DirectX" and "portable" usually aren't used together. [grin]

Share this post


Link to post
Share on other sites
XNA seemed super unfinished to me and more Xbox'ey than comercial application, also, i need to run Direct3D on one screen and a video using DirectShow on the other, i'm having all sorts of issues at the moment and can't find any good Multi-Monitor Managed DirectX code.

this is my current problem:
http://www.gamedev.net/community/forums/topic.asp?topic_id=423240

aswell has figureing out how to full screen direct3d on two monitors and set the focus onto the right one.

i ment portable like...i nice class library so it just plugs in a goes

Share this post


Link to post
Share on other sites
Well XNA is still in beta. Beta 2 though is pretty solid. It's perfectly suited for commercial applications. If you're new to C# and DX you might want to aim for something a bit less complicated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this