[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GSoC project: new graphics backend
From: |
Arseniy Lartsev |
Subject: |
Re: GSoC project: new graphics backend |
Date: |
Sun, 29 Mar 2009 10:10:25 +0300 |
User-agent: |
KMail/1.10.3 (Linux/2.6.27.19-3.2-default; KDE/4.1.3; i686; ; ) |
> Am I mistaken, or what you mean is taking the current "draw()" interface of
> opengl_renderer class and put it into an abstract class, and make
> opengl_renderer
> inherit from it?
Yes. It would look like this:
class abstract_renderer {
...
void abstract_renderer::draw (const line::properties& props);
virtual void draw_line(const Matrix &x, const Matrix &y, const Matrix &z)=0;
...
};
class opengl_renderer: public abstract_renderer {
...
virtual void draw_line(const Matrix &x, const Matrix &y, const Matrix &z);
...
};
void abstract_renderer::draw (const line::properties& props)
{
Matrix x = xform.xscale (props.get_xdata ().matrix_value ());
Matrix y = xform.yscale (props.get_ydata ().matrix_value ());
Matrix z = xform.zscale (props.get_zdata ().matrix_value ());
draw_line(x, y, z);
}
void opengl_renderer::draw_line(const Matrix &x, const Matrix &y,
const Matrix &z)
{
glFoo();
glBar();
...
}
Of course, there should also be line width, color, style, etc.
signature.asc
Description: This is a digitally signed message part.
- Re: GSoC project: new graphics backend, (continued)
- Re: GSoC project: new graphics backend, Arseniy Lartsev, 2009/03/28
- Re: GSoC project: new graphics backend, Shai Ayal, 2009/03/28
- Re: GSoC project: new graphics backend, Arseniy Lartsev, 2009/03/28
- Re: GSoC project: new graphics backend, John W. Eaton, 2009/03/28
- Re: GSoC project: new graphics backend, Arseniy Lartsev, 2009/03/28
- Re: GSoC project: new graphics backend, John W. Eaton, 2009/03/28
- Re: GSoC project: new graphics backend, Arseniy Lartsev, 2009/03/28
- Re: GSoC project: new graphics backend, John W. Eaton, 2009/03/28
- Re: GSoC project: new graphics backend, Arseniy Lartsev, 2009/03/28
- Re: GSoC project: new graphics backend, Michael Goffioul, 2009/03/28
- Re: GSoC project: new graphics backend,
Arseniy Lartsev <=
- Re: GSoC project: new graphics backend, Michael Goffioul, 2009/03/29
- Re: GSoC project: new graphics backend, Arseniy Lartsev, 2009/03/29
- Re: GSoC project: new graphics backend, Michael Goffioul, 2009/03/29
- Re: GSoC project: new graphics backend, Arseniy Lartsev, 2009/03/30
- Re: GSoC project: new graphics backend, Przemek Klosowski, 2009/03/30
Re: GSoC project: new graphics backend, Arseniy Lartsev, 2009/03/22
Re: GSoC project: new graphics backend, Jonathan Stickel, 2009/03/26