Can't begin drawing to surface

I'm trying to do a simple draw to a surface. I used InitializeAll() on the setup object and it seems to be using OpenGL for the display driver.

When I try the following:

  1.             surface = new Surface(640, 480);
  2.            
  3.             Display.RenderTarget = surface;
  4.             Display.BeginFrame();

I get the following error on the Display.BeginFrame(); line:

"Could not complete framebuffer object."

I'm not sure if I'm not setting something up properly. Also, when I tried to use the Managed DirectX driver, the program hangs on the initialization. I have the latest DirectX installed.

I'm on Windows Vista 32 bit, Visual C# Express 2010, .NET 4.

What is the surface format?

What is the surface format? It shouldn't be slow as crap. Can you post a more complete code sample?

I changed the surface format

I changed the surface format and it seems to be working now but it's going slow as crap. I was using SdlDotNet before and it was fast but the lack of scaling without creating a new surface was killing me. Also, I was getting errors saying it was trying to access protected memory randomly when new scaled surfaces were created.

Anyway, I need to figure a bunch of things out because it's not drawing to the window at the right scale or location either.

NVidia GeForce 7300 LE

NVidia GeForce 7300 LE

What kind of video card do

What kind of video card do you have? Some video card drivers (mainly Intel) don't support the frame buffers extension for OpenGL.