Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is required to remove the front buffer limit of 256x256 pixels. #125

Open
Jr13San opened this issue Dec 11, 2022 · 0 comments
Open

It is required to remove the front buffer limit of 256x256 pixels. #125

Jr13San opened this issue Dec 11, 2022 · 0 comments

Comments

@Jr13San
Copy link

Jr13San commented Dec 11, 2022

Describe the bug
Using the Union API, I can't get a screenshot larger than 256x256 pixels, using front buffer copy.

To Reproduce

  1. Create a plugin with the following code:
// Plugin.cpp
void Game_Loop()
{
	// when pressing the "0" key
	if (zinput->KeyToggled(KEY_0))
	{
		// create new texture convert manager
		zCTextureConvert* texconv = zrenderer->CreateTextureConvert();

		// get buffer from screen
		zrenderer->Vid_GetFrontBufferCopy(*texconv);

		// get source format
		zCTextureInfo texInfo = texconv->GetTextureInfo();

		// Test on screen resolution 1920x1080 (windowed mode).
		// With DX11 Return: 256x256, format = 2.
		// Without DX11 Return: 1920x1080, format = 3.
		Say::Box(string::Combine("%ix%i, format = %i", texInfo.sizeX, texInfo.sizeY, texInfo.texFormat));
		
		// remove manager
		delete texconv;
	}
}
  1. Launch the Game in resolution 1920 x 1080 x 32bit
  2. Press key 0.
  3. See message box with results.

Screenshots
Original ZenGin Test:
ZENGIN_DEFAULT_GAME

ZenGin+DX11 Test:
DX11_TEST_GAME

As a result, the buffer contains an image of too low quality, which, when stretched to full screen, looks like this:
DX11_TEST2

Test front buffer texture image (without DX11):
DX11_TEST3

Expected behavior
I expected that the buffer of the convert-manager would receive an image with the same size as the screen resolution.
Expected: 1920x1080, format = 3.
Received: 256x256, format = 2.

Information:

  • OS: Win 10
  • Graphics card: Nvidia GTX 660
  • Gothic version: G2 NotR
  • Using DX Render version: GD3D11-v17.8-dev4

Other:
You may need to look at the functions:

void D3D11GraphicsEngine::GetBackbufferData( byte** data, int& pixelsize )
HRESULT MyDirectDrawSurface7::Lock( LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant