Sign in to follow this  
Adil nazir

[.net] Please help me

Recommended Posts

Adil nazir    122
I want to access vram in c# but i have no idea how to do this. Setpixel and getpixel functions are very slow i and to show my frams direct in video ram so please help me...........waiting

Share this post


Link to post
Share on other sites
Gage64    1235
What API/library are you using? Most will allow you to draw an image quickly without the need to draw each pixel individually.

Share this post


Link to post
Share on other sites
gharen2    520
Always tell people what API you're using when asking a question.

Assuming you're using GDI+/System.Drawing, GetPixel and SetPixel are indeed slow. Use LockBits instead. That way you're writing the data in one shot instead of per pixel.

I have no idea if GDI+ uses video ram, it's not my forte. You could always use OpenGL, SlimDX, or Xna instead.

Share this post


Link to post
Share on other sites
jpetrie    13161
Even with those you don't get 'direct access' to VRAM. Although presumably the OP wants to render quickly (which all of the APIs listed, even GDI in some cases) can do rather than actually poke bits in video memory.

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