-
Автор темы
- #1
I'm using imgui for my internal cheat.
My problem is, it's rendering RGB( 77 79 83 ) instead of RGB( 19 20 22 ).
Any idea why?
C++:
D3D_FEATURE_LEVEL FeatureLevel;
const D3D_FEATURE_LEVEL FeatureLevels[] = { D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_11_0 };
DXGI_RATIONAL RefreshRate;
RefreshRate.Numerator = 60;
RefreshRate.Denominator = 1;
DXGI_MODE_DESC BufferDesc;
BufferDesc.Width = 100;
BufferDesc.Height = 100;
BufferDesc.RefreshRate = RefreshRate;
BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
DXGI_SAMPLE_DESC SampleDesc;
SampleDesc.Count = 1;
SampleDesc.Quality = 0;
DXGI_SWAP_CHAIN_DESC SwapChainDesc;
SwapChainDesc.BufferDesc = BufferDesc;
SwapChainDesc.SampleDesc = SampleDesc;
SwapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
SwapChainDesc.BufferCount = 1;
SwapChainDesc.OutputWindow = WindowHwnd;
SwapChainDesc.Windowed = 1;
SwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
SwapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
IDXGISwapChain* SwapChain;
ID3D11Device* Device;
ID3D11DeviceContext*Context;
if (D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, FeatureLevels, 1, D3D11_SDK_VERSION, &SwapChainDesc, &SwapChain, &Device, &FeatureLevel, &Context) < 0)
{
DeleteWindow();
return FALSE;
}
C++:
ImGui_ImplDX11_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::NewFrame();
ImGui::GetIO().MouseDrawCursor = g_GameVariables->m_ShowMenu;
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(px - 10, py + 65), ImVec2(px + 65, py + 450), ImColor(19, 20, 22);
ImGui::EndFrame();
ImGui::Render();
m_DeviceContext->OMSetRenderTargets(1, &m_RenderTargetView, NULL);
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
My problem is, it's rendering RGB( 77 79 83 ) instead of RGB( 19 20 22 ).
Any idea why?
Последнее редактирование: