The most efficent ways for drawing lines all day long with OpenGL
Posted
by
nkint
on Game Development
See other posts from Game Development
or by nkint
Published on 2013-06-26T11:57:23Z
Indexed on
2013/06/26
16:30 UTC
Read the original article
Hit count: 250
I'd like to put a computer screen that is running an OpenGL programs in a room. It has to run all day long (not in the night).
I'd like to draw lines that are slowly fading in the background. The setting is simple: a uniform color background (say, black) and colored lines (say, white) that are slowly fading out.
With slowly I mean.. hours. Say that the first line I draw is with alpha 255 (fully visible), after one hours is 240. After 10 hours is 105.
One line could have 250 points and there will be like 300 line in one day.
For now I have done a prototype with very rudimentary method like:
glBegin( GL_LINE_STRIP );
iterator = point_list.begin();
for (++iterator, end = point_list.end(); iterator != end; ++iterator) {
const Vec3D &v = *iterator;
glVertex2f(v.x(), v.y());
}
glEnd();
More efficient method?
© Game Development or respective owner