PresentParameters PresentParams = new PresentParameters();
PresentParams.Windowed = true;
PresentParams.SwapEffect =
Microsoft.DirectX.Direct3D.SwapEffect.Discard;
DXDevice = new Microsoft.DirectX.Direct3D.Device(0,DeviceType.Hardware, this,CreateFlags.SoftwareVertexProcessing, PresentParams);
Surface buff =
DXDevice.CreateOffscreenPlainSurface(Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height, Format.A8R8G8B8, Pool.SystemMemory);
DXDevice.GetFrontBufferData(0, buff);
SurfaceLoader.Save(@"D:\test.bmp", ImageFileFormat.Bmp, buff);
directx screenshots
Hello.
I have problem when my game is in opengl mode it takes black screenshots what should be the problem?
Here is the screenshot code.
So when your game uses OpenGL for rendering, you're still using Direct3D to capture screenshots? I doubt that will work...
Thanks for your quick answers.
But can u point me a direction where can i see informtion about C# opengl.
Opengl im pretty dum :D
But can u point me a direction where can i see informtion about C# opengl.
Opengl im pretty dum :D
Doing a search for "OpenGL screenshot" returns many results (like this one). It's not in C#, but converting it should be easy (because the OpenGL calls are the same).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement