Also witout font smothing and Dx filtering
Few question about DirectX 11
Also how can I display those quads in the same size even if I resize the window on change the resolution ?
Assuming I dont care about about window resizing. A monitor with a native resolution of 1024x768 will display a quad in the same ratio as I see it on my native resolution of 1920x1200 ?
Assuming I dont care about about window resizing. A monitor with a native resolution of 1024x768 will display a quad in the same ratio as I see it on my native resolution of 1920x1200 ?
Looks the same with any filter in the sample.
D3D11_SAMPLER_DESC samplerDesc;
samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
samplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.MipLODBias = 0.0f;
samplerDesc.MaxAnisotropy = 0;
samplerDesc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
samplerDesc.BorderColor[0] = 0;
samplerDesc.BorderColor[1] = 0;
samplerDesc.BorderColor[2] = 0;
samplerDesc.BorderColor[3] = 0;
samplerDesc.MinLOD = 0;
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;
Ok, stupid question, but do you SET the sampler state? Almost sounds as if you do not.
Also how can I display those quads in the same size even if I resize the window on change the resolution ?
Assuming I dont care about about window resizing. A monitor with a native resolution of 1024x768 will display a quad in the same ratio as I see it on my native resolution of 1920x1200 ?
You can, but you would have to do the calculations in your program.
Yes, actually I didnt set the sampler state. Thank you for pointing that.
Another questions:
If I have a class and I want to debug to a file or to a messagebox etc is ok to do that with a define ?
For exemple:
I know that are many logical ways to do that but I wonder wich one is better and used by a programmer.
Thanks.
Another questions:
If I have a class and I want to debug to a file or to a messagebox etc is ok to do that with a define ?
For exemple:
#define DEBUG 0
//some code that makes something
//..
#if DEBUG == 1
//write debug information about the code above to a file
#endif
// other lines of code
// ....
#if DEBUG == 1
//write debug information about the code
#endif
I know that are many logical ways to do that but I wonder wich one is better and used by a programmer.
Thanks.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement