Immediate-Mode-UI/Nuklear

DX9 demo/d3d9nuklear_d3d9.h handle incorrectly resolution/window size

開放

#22 建立於 2019年12月10日

 (1 則留言) (0 個反應) (0 位負責人)C (487 個分叉)batch import
help wanted

倉庫指標

星標
 (8,044 顆星)
PR 合併指標
 (平均合併 2小時 53分鐘) (30 天內合併 1 個 PR)

描述

When the window size is different that the screen resolution and the window is maximixed this demo (DX9) handle incorrectly the resolution, for example the mouse hover is too far from where it should be, meaning you need to move the mouse to the left several centimeters or to the right to move the scroll bar. To replicate this compile the demo adding ShowWindow(wnd, SW_MAXIMIZE); in the main function and be sure the window width and height is different that the current screen resolution. My guessing is that the function nk_d3d9_get_projection_matrix () is wrong, so the projection matrix is calculated incorrectly. Actually that function calculate the matrix in a no standard way, at least not in the normal way of normal D3D9 applications. Or is coded in a John Carmack's style, meaning hacking style. I can't test D3d11 but I tested the gdi demo and it work correctly.

貢獻者指南