Request for Max2D: Antialiasing
BlitzMax Forums/BlitzMax Module Tweaks/Request for Max2D: Antialiasing
| ||
Hi, it would be nice if there would be the possibility to define and activate antialiasing. This would be wonderful if you're doing a vector-like-game with lines, rects,... Greetings, taumel |
| ||
I think it should also be possible to draw scaled and rotated vector representations of fonts, with antialiasing. They could easily be composed from polygons. |
| ||
Max already has these, it's just a simple task of working out how to turn them on :D |
| ||
If you have found out how... let me know... :) |
| ||
I dont know that it does. I assumed the freetype library rendered the glyphs to a bitmap/pixmap and then blitz uploaded the pixmaps as textures - not the same thing. |
| ||
I was talking about Antialiasing which is the subject of this post. |
| ||
OpenGL Lines :- GlEnable GL_LINE_SMOOTH GlEnable GL_BLEND glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA glHint GL_LINE_SMOOTH_HINT, GL_NICEST Polys :- GlEnable GL_POLYGON_SMOOTH GlEnable GL_BLEND glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA glHint GL_LINE_SMOOTH_HINT, GL_NICEST DIRECTX:- Lines:- primarydevice.device.SetRenderState D3DRS_ANTIALIASEDLINEENABLE,True Polys:- Const D3DRS_ANTIALIAS = 2 primarydevice.device.SetRenderState D3DRS_MULTISAMPLEANTIALIAS,True primarydevice.device.SetRenderState D3DRS_ANTIALIAS,True |
| ||
Hi Tim, yes but wouldn't it be nice just to have a basic command for it? Hmm with your settings (glBlendFunc) you will get some problems drawing ovals and rects...but thanks for the DirectX-Settings! :O) Greetings, taumel |
| ||
Hmmn the polys stuff don't work properly. Try changing the D3DRS_ANTIALIAS setting to 1 or 2.Const D3DANTIALIAS_SORTDEPENDENT = 1 Const D3DANTIALIAS_SORTINDEPENDENT = 2 |
| ||
Hi Tim, i just tried your directX example and it doesn't work...still jaggies... Greetings, taumel |
| ||
Works great for me :) |
| ||
Probably a similar problem to Blitz3D antialiasing. Works for some, not for others. |
| ||
Yepp is the same: DX7 does not support todays card antialias just the old antialias that is not supported anymore. Due to that: You can't with DX7 and thus shouldn't use it in OpenGL as well if you allow the user to choose their driver. |
| ||
I wonder, if after the 3D module will be there, there will be a updated Max2D which is built on openGL2 and DirectX9 when there is time... Greetings, taumel |
| ||
If you use 2D, why not use the alpha channel and add a smooth edge to your sprites? |
| ||
... because it's for lines, rects, ovals and polys. |
| ||
So? Texture them with an alpha texture (I sincerely hope that's possible :) |
| ||
You could use access OGL and DX drivers but couldn't do it with 'native' commands. Indiepath did a drawtexturedpoly code which will work for polys and rects but ovals and lines???? |
| ||
Ovals and lines are Polys :D |
| ||
Does your code texture them? I've never thought to try. |