Ecere SDK/eC Forums https://ec-lang.org/community/ Print view |
|
Glass https://ec-lang.org/community/viewtopic.php?f=7&t=21 |
Page 1 of 1 |
Author: | sacrebleu [ Thu Jan 21, 2010 6:29 pm ] |
Post subject: | Glass |
How to draw glass? Is this handled by the engine? |
Author: | jerome [ Mon Apr 05, 2010 9:34 pm ] |
Post subject: | Re: Glass |
Take a look at this FAQ at openGL.org. When you set a material to be translucent and call ApplyTranslucency() on a Mesh (as indicated in the thread about materials), primitives are broken up and get rendered from back to front Z order. There is also a Display::DrawTranslucency() method which lets you control when the translucent primitives are drawn, otherwise it is drawn when you reset the camera to 'null' on the display (usually at the end of an OnRedraw() method). You can try using this to draw your glass objects in 2 passes following the OpenGL.org's advice above. You can use both translucent textures and translucent material color attributes to achieve the glass effect you're looking for. So far not so many nice glass effects have been achieved with Ecere yet, and you're most welcome to share with us your findings or screenshots . Here are some screenshots from the 3D samples: Hoping this inspires you to render some great looking glass Cheers, Jerome |
All times are UTC-05:00 | Page 1 of 1 |
Powered by phpBB® Forum Software © phpBB Limited |