I haven't really seen any issues posted about this... however there is always a possibility of me misreading something.
In any event, I started working with vertex buffers and am now having a problem. When I click and drag on the screen I am creating rectangles (this is intended) then I record the position, relative to the client window and make sure these coordinates are passed to the vertex buffers. Then I finally render the rectangle on the screen, however with the transformed verticies (passing these to a customvertex struct I picked up from someone's code)...
I have found that the rectangle being drawn is usually offset as I go further in the y direction. I have added 2x2 rectangles to represent the position in the window according to windows GDI, but I notice they are off. At the top of the window they are almost dead on, but as I got further +y it gets worse.Code:
FLOAT x, y, z, rhw; // The transformed position for the vertex
DWORD color; // The vertex color
// Our custom FVF, which describes our custom vertex structure
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW|D3DFVF_DIFFUSE)
Kinda looks like this at the bottom of the window.
instead its here -> ----------------
topleft should be->x
bottom right should be here -->x
Any ideas? Lemme know if you need a better explanation, thanks.