Jump to content
  • Advertisement
Sign in to follow this  
s0uuuL

Screen Capturing of a DirectX Game with Anti Aliasing OM

This topic is 2572 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys,

i have a problem with a directX10/11 game. i will make ingame screenshot with c#. its works with anti aliasing off. but if i make anti aliasing on i have only blackscreen. i dont know solution of this problem, i hope anybody from u can help.

here is my c# code:


GetWindowRect(new HandleRef(this, pID), out rc);

int width = rc.Right - rc.Left;
int height = rc.Bottom - rc.Top;

if (width == 0 || height == 0)
{
// game not started
}
else
{
if (width < 200)
{
// game not started or in the taskbar
}
else
{
size = new System.Drawing.Size(width, height);

Bitmap bitmap = new Bitmap(width, height);
using (Graphics graphics = Graphics.FromImage(bitmap))
{
graphics.CopyFromScreen(new Point(rc.Top, rc.Left), new Point(0, 0), size);
}

int timeStamp = getTimeStamp();
m_savePath = m_selfFilePath + m_toolpath + m_matchID;
String holeFilePath = m_savePath + "\\" + m_matchID + "" + timeStamp + ".jpeg";
m_imageList.Add(m_matchID + "" + timeStamp + ".jpeg", holeFilePath);
DirectoryInfo directoy = new DirectoryInfo(m_savePath);
directoy.Create();

savejpeg(bitmap, 50, holeFilePath);
}
}


i have read many about Direct3D Hooking, but im beginner i dont know hooking.

kind regards

michael

Share this post


Link to post
Share on other sites
Advertisement
If the game is using MSAA (hardware anti-aliasing) on the back buffer, you cannot access the data. If the game uses FXAA, SSAA, etc.. you can.

Share this post


Link to post
Share on other sites
okay, i think it use [color=#333333][font=Arial]SGSSAA , so i can access. but i dont know how i can access with c#[/font]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!