Alphablending ... ?
Posted: Fri May 29, 2009 10:01 pm
Because I'm more familiar with DirectX gfx than the OpenGL platform I thought I'd ask whether it's relatively easy to alphablend in OpenGL and whether there are commands that easily implement this in Oolite?
My reason for asking is that it struck me that no-one has as yet, as far as I can see, implemented any planetary rings of the sort that in our Sol system one sees around i.e. Saturn. An easy if rather simplistic way to produce such a graphical effect might be to texture a plane object (with backface culling off) with a bitmap or .png with a ring graphic on it, then alpha-blend it into its immediate background (to give a sort of ghosting or semi-transparent effect). Then you'd have to scale the plane so that it is larger than the planet and position the plane at the centre of the planet.
I guess this leads onto another question which I haven't yet looked at the source about: does OpenGL have hard coded into it the standard primitives or is this kind of thing for the programmer to implement. DirectX comes with the usual cube, sphere, cone, torus and, of course, the famous teapot!!
My reason for asking is that it struck me that no-one has as yet, as far as I can see, implemented any planetary rings of the sort that in our Sol system one sees around i.e. Saturn. An easy if rather simplistic way to produce such a graphical effect might be to texture a plane object (with backface culling off) with a bitmap or .png with a ring graphic on it, then alpha-blend it into its immediate background (to give a sort of ghosting or semi-transparent effect). Then you'd have to scale the plane so that it is larger than the planet and position the plane at the centre of the planet.
I guess this leads onto another question which I haven't yet looked at the source about: does OpenGL have hard coded into it the standard primitives or is this kind of thing for the programmer to implement. DirectX comes with the usual cube, sphere, cone, torus and, of course, the famous teapot!!