Well you can force DirectX to not multisample the scene by using D3DMULTISAMPLE_NONE instead of D3DMULTISAMPLE_N_SAMPLES which would get you back to the point at which we started
The DirectX AA commands control how your polygons are rasterised from the vertex buffer to the surface/texture/window. The windows system doesnt really have much of a say in what DirectX does with the graphics card, are you thinking about GDI programming i.e. fonts or overlays here?
Once you have a DirectX device you control it directly via the presentation parameters, the scene would look they same whether you rendered it to a window, or to a bitmap file, its separate from any windowsy system level antialiasing that may apply.
So I guess the answer is, yes if you are using DirectX you have full control over how the graphics card multisamples your 3D scene, so you can turn AA on and off at will if your card supports it.
Hope this answers your question and i havent disappeared down a rabbit hole.
Chips wrote:The windows system doesnt really have much of a say in what DirectX does with the graphics card
Yea, what I meant was the grafics card settings, not windows (like I stated in my first post). Because there you can turn on antialiasing globally.
Chips wrote:are you thinking about GDI programming i.e. fonts or overlays here?
Mh, a while ago I had the problem with fonts drawn with irrlicht. When antialiasing was turned on in the graphics card settings, the fonts would be messed up and not readable anymore. Thats why I was interested in turning it off. Though I might look for a better solution like using a font that looks ok with aa turned on.
Chips wrote:Hope this answers your question and i havent disappeared down a rabbit hole.
yes, thank you!
jox
It is like it is. And because it is like it is, things are like they are.
Thanks very much for getting me started on this. I've setup the code as follows so it detects what the card can do and then gives the user a choice. (You can use this to turn of AA too!)
When I get around to building a configuration file/program for the user I will have it read in from the text file at this point.
Currently you have to input your option during startup at the command prompt.
Should I post the code? Would you find that useful?
At the start of CVideoDirectX9.cpp inside the namespace video I put static variables. You can add as many as you want to correspond with the avaliable AA Settings with DirectX. I have an ATI All-In-Wonder 9600 and I only get a maximum of 6x AA.
Now just recompile the DLL and move put that in the project directory. Be aware since you are not reading in from a file you may have to hit alt-tab to get to the appropriate window to input your decision. I would change the the code so you wouldn't have to do this. (And I will eventually)
I hope that helps. And yes, I know that global static variables in a Game Engine is very bad style. You should chanage this to a more refined method. It's quick and dirty but it does work.
Thanks a lot bfschuil !
Your code to choose multisampling level is really great...
Do you think it is easy to modify it to be able to select multisampling level in a project based on the techdemo (exemples) with the first little Irrlicht window to select driver, realtime shadows...
I would like to add a combobox with multisampling quality here and not in the console DOS window...
Do you see a way to do that ???
Thanks
Eviral
I don't know how to set your choice variable directly from my project and to send it to the irrlicht dll...
I made changes exactly like the post say to get Antialias rendering i can compile without problems but when i execute my aplication and select directx9
for rendering... the aplication doesn't start and console say:
Microsoft Windows XP Professional Se
DirectX9 Renderer
ATI MOBILITY RADEON 9000/9100 IGP at
Was not able to create Direct3D9 dev
Was not able to create DirectX9 devi
Could not create DirectX9 Driver.
Error: Could not load built-in Font.
Yes, I forsee being able to make this code so you can choose it graphically eventually. If you want to email me at the_unknown007@msn.com (don't care about getting all sorts of junk mail here) with something that I will notice in the subject line I will pass on that code to you. I probally won't be able to get around to that for at few months thought as I'm quite busy right now.
Sorry that doesn't work for you. I'm running an ATI AIW 9600 and I'm having no problems. You may want to double check your code to see if you missed something - if you placed the code in the wrong section in the file it will totally mess up your renderer
Hi people,
Take a look at this http://nehe.gamedev.net/data/lessons/le ... ?lesson=46.
Sory that it is not for DirectX put it is about AA and it is very helpful to implement AA in Irrlicht(for bouth drivers not only for DirectX).
Of cource there must be a test to see if the video card suports AA or not and if True than initialize AA( like a Pro C++ graphical programmer ).