SF.net SVN: avogadro: trunk/libavogadro/src

On May 5, 2007, at 7:49 AM, benoitjacob@users.sourceforge.net wrote:

following: in Engine, we could have renderOpaque, renderTransparent
and
renderText. What do you think? Tools would inform the GLWidget that
they
are moving the view using callbacks GLWidget::beginMoveCamera() and
GLWidget::endMoveCamera().

I think this is a good idea. Also in some programs, there’s a “quick
rotate” system, where the engine switches to displaying a wireframe
while the camera is moved. This helps on slow computers.

Cheers,
-Geoff

On Sat, 5 May 2007, Geoffrey Hutchison wrote:

I think this is a good idea. Also in some programs, there’s a “quick
rotate” system, where the engine switches to displaying a wireframe
while the camera is moved. This helps on slow computers.

Good idea; this could be done when the global quality setting (that I’m
implementing in the Painter class to come) is set at the lowest level.

BTW: the callbacks could be unified in a setMoveCamera(bool). I’ve seen
that Qt uses that trick to unclutter its API, see e.g. QFont.

Benoit

I believe this is better done by making movement an attribute of the
GLWidget… My suggestion:

bool GLWidget::isMousePressed / GLWidget::setMousePressed(bool)

This way eventually we can make it a part of the settings for each
engine. I am against adding a function ::renderText, just not
necissary.

But this brings to my attention how much we need to get the
configuration dialogs in for the engines. I’ll see what i can do today.

(Sat, May 05, 2007 at 03:49:55PM +0200) Benoit Jacob jacob@math.jussieu.fr:

On Sat, 5 May 2007, Geoffrey Hutchison wrote:

I think this is a good idea. Also in some programs, there’s a “quick
rotate” system, where the engine switches to displaying a wireframe
while the camera is moved. This helps on slow computers.

Good idea; this could be done when the global quality setting (that I’m
implementing in the Painter class to come) is set at the lowest level.

BTW: the callbacks could be unified in a setMoveCamera(bool). I’ve seen
that Qt uses that trick to unclutter its API, see e.g. QFont.

Benoit


This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
avogadro-devel List Signup and Options

On Saturday 05 May 2007 21:33:25 you wrote:

I believe this is better done by making movement an attribute of the
GLWidget…

this is exactly what I meant when I proposed setMoveCamera(bool) !

My suggestion:

bool GLWidget::isMousePressed / GLWidget::setMousePressed(bool)

I would suggest s/MousePressed/CameraMoving/g or something similar. The
rationale is that what matters here is not really whether the mouse buttons
are pressed, but whether the camera is moving.

This way eventually we can make it a part of the settings for each
engine. I am against adding a function ::renderText, just not
necissary.

Adding a separate renderText() allows us to control whether the text should be
drawn above or below the other translucent objects. With only
renderTransparent() and no renderText(), what will happen is that some text
will be drawn above and some will be drawn below (think multiple engines),
without letting us any opportunity of controlling that.

Cheers,
Benoit

But this brings to my attention how much we need to get the
configuration dialogs in for the engines. I’ll see what i can do today.

(Sat, May 05, 2007 at 03:49:55PM +0200) Benoit Jacob
jacob@math.jussieu.fr:

On Sat, 5 May 2007, Geoffrey Hutchison wrote:

I think this is a good idea. Also in some programs, there’s a “quick
rotate” system, where the engine switches to displaying a wireframe
while the camera is moved. This helps on slow computers.

Good idea; this could be done when the global quality setting (that I’m
implementing in the Painter class to come) is set at the lowest level.

BTW: the callbacks could be unified in a setMoveCamera(bool). I’ve seen
that Qt uses that trick to unclutter its API, see e.g. QFont.

Benoit


This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
avogadro-devel List Signup and Options

Adding a separate renderText() allows us to control whether the text should be
drawn above or below the other translucent objects. With only
renderTransparent() and no renderText(), what will happen is that some text
will be drawn above and some will be drawn below (think multiple engines),
without letting us any opportunity of controlling that.

This isn’t a problem. I don’t remember if you heard me mention it but
even if we do add renderTransparent, we will need a way to choose what
transparent engines get rendered before other transparent engines, so to
do this we add a “::zDepth()” function to engines that says “hey i’m a
5, i need to be rendered before anything higher than that.” So for text
engines we just set the zDepth() to max_unsigned_int and voila!


Donald

(Sun, May 06, 2007 at 07:18:07PM +0200) Benoît Jacob jacob@math.jussieu.fr:

On Sunday 06 May 2007 20:15:40 you wrote:

Adding a separate renderText() allows us to control whether the text
should be drawn above or below the other translucent objects. With only
renderTransparent() and no renderText(), what will happen is that some
text will be drawn above and some will be drawn below (think multiple
engines), without letting us any opportunity of controlling that.

This isn’t a problem. I don’t remember if you heard me mention it but
even if we do add renderTransparent, we will need a way to choose what
transparent engines get rendered before other transparent engines, so to
do this we add a “::zDepth()” function to engines that says “hey i’m a
5, i need to be rendered before anything higher than that.” So for text
engines we just set the zDepth() to max_unsigned_int and voila!

That’s fine with me :slight_smile:

Also, eventually we’re probably going to want to optimize based on
features that the engine has, for example, we’re not going to want to
call ::renderTransparent on all engines, we we could very easily have an
enum Engine::Type that is some sort of flag we can define what features
and engine has.

Benoit