Alpha blending with simple lines and shapes
BlitzMax Forums/BlitzMax Programming/Alpha blending with simple lines and shapes
| ||
[SOLVED] When I enable alpha blending and then draw a line with the built in functions, the line doesn't appear to be alpha blended (it's jaggy). What gives? It says in the help that lines are affected by the current blend mode. How can I fix this? I expected the following program to draw "blended" lines with no aliasing: Graphics 640,480 SetBlend ALPHABLEND While Not AppTerminate() Cls DrawLine 10,10, MouseX()-5,MouseY()-5 Flip EndWhile |
| ||
Alpha blending is to do with transparency, rather than anti-aliasing. As far as I know, DX7 doesn't do line anti-aliasing, but you cen enable it in OpenGL with "glEnable GL_LINE_SMOOTH". |
| ||
I've forgotten what one must do to make native DirectX or OpenGL calls; how would I make this glEnable call within my little example program? |
| ||
Assuming you are using the OpenGL driver...glEnable GL_LINE_SMOOTH ;-) |
| ||
Yeah alpha blend has nothing to do with altialiasing. |
| ||
Thanks for all the help guys, works great. And, thanks for the speedy replies! |
| ||
Um, use my glowing lines stuff and remove the glow? |