I'm following some tutorials of directx 11,and i was able to draw a quad, but my problem began when i was applying transforms , for some reason, my quad at position 0,0, start at bottom left of my screen, but i want to it starts at Top Left , i don't figure out why

this happend when i used XMMatrixOrthographicOffCenterLH , but if i use XMMatrixOrthographicLH , it start at the center of the screen, im doing something wrong?

Lucky guess: If don't set a rasterizer state explicitly the default is used, which culls backfacing triangles (with the new projection they got flipped). Use one with D3D11_CULL_FRONT (or D3D11_CULL_NONE) or flip your triangles.

Your l_spriteWVP matrix is wrong. The multiplication order should be scale * rotation * translation, not the other way around.

Also, I'm a bit confused by your matrix names and usages. You are including sprite position (translation) in your l_spriteWVP matrix, then multiplying that by another matrix (worldMatrix (which is really view * projection)) and setting that result on your shader as the world matrix. Then in your shader, you are multiplying the sprite position by the world matrix again. I'm pretty sure that's going to give strange results.

I would strongly recommend using the DirectX Tool Kit for sprite drawing. It's an official MS tool kit and takes care of all this for you. If you want to learn how to do it yourself, all the source code for the tool kit is available for your perusal.

Lucky guess: If don't set a rasterizer state explicitly the default is used, which culls backfacing triangles (with the new projection they got flipped). Use one with D3D11_CULL_FRONT (or D3D11_CULL_NONE) or flip your triangles.

@unbird , indeep change the culling to D3D11_CULL_NONE, is showing the QUAD but now i have this error http://screencast.com/t/S2ZsYcqQdkAG , i create the rasterizer after i create the Render Target

just tried but nothing showing on the window, all black, i change the position of the sprite, but nothing

@davehunt after i change the culling settings, is showing at the TOP LEFT using the XMMatrixOrthographicOffCenterLH you gave me

Your l_spriteWVP matrix is wrong. The multiplication order should be scale * rotation * translation, not the other way around.

Also, I'm a bit confused by your matrix names and usages. You are including sprite position (translation) in your l_spriteWVP matrix, then multiplying that by another matrix (worldMatrix (which is really view * projection)) and setting that result on your shader as the world matrix. Then in your shader, you are multiplying the sprite position by the world matrix again. I'm pretty sure that's going to give strange results.

I would strongly recommend using the DirectX Tool Kit for sprite drawing. It's an official MS tool kit and takes care of all this for you. If you want to learn how to do it yourself, all the source code for the tool kit is available for your perusal.

spriteWVP multiplication was in deep wrong, i change to scale * rotation * translation, and is also positioning the sprite where they should

i create a worldMatrix that is the global matrix of the world, in this case is the screen coords , viewMatrix is XMMatrixIdentity because i don't new a Look Up view that is normaly used for 3d,

then i need the actual matrix from the sprite, that needs to be multiply by the Screen coords, that is why is multiply with the "worldmatrix"

the last one you mention is the shader , that position is not the sprite position, is the position of each vertex , that need to be multiply with the entire worldmatrix to be converted to world coordinates, in this case, screen coords

the last one you mention is the shader , that position is not the sprite position, is the position of each vertex , that need to be multiply with the entire worldmatrix to be converted to world coordinates, in this case, screen coords