Re: [eigen] OpenGL support |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] OpenGL support
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Wed, 6 Oct 2010 13:31:18 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=6YjjwHFK08RcfiDrdVUKDSq1j+zZZH1ccgVJHywBPNw=; b=UlTIPDXYmbuCnBOMzABZ8HRNuBFVMrJ9Nob/XQDJUKgvUZZNwfR9enF3gQ9XSbB9AO SmUATqRgyRrwjvfD1ICc7Ifa0Uq2rP8dN6zf5uPab/Q+zQGtZa4YXYJd9IrLkZvWCgpl UF3OdgI/Q8qPK9+Ku2s8ZMjsOtNwiQ2LF844E=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=x1bhdZRNwmhjrLnc75hEHC3y856hycKuMh6WiaJZW28+tMSJtUY8WI3JWqDCuHWXBs uYjrqn7r+hi9wGWvziY8MUVN0PIhhLtJH9wOm6I2JK5oUXIld3BupTFGkO8xOpuf1vTB ojN4LNLJTP2N/AQnvVL9+l+VaFHfVdaXiL/gk=
For the record I've just updated this module with support for:
class Transform (3D, Affine, AffineCompact, Projective via
glLoadMatrix, glMultMatrix)
class Translation (2D and 3D, via glTranslate)
class UniformScaling (3D, via glScale)
glGet(GLenum pname, DenseBase<Derived>) to read vector and matrices from OpenGL.
and more importantly I've implemented true unit tests, so now it
should be reliable :)
gael
On Thu, Jul 22, 2010 at 4:45 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> Hi,
>
> I've just adapted and pushed some old code I had to pass Eigen's
> objects to OpenGL, like:
>
> Vector3f a, b;
>
> glVertex(0.5*(a + b));
>
> without having to bother about the dimension, scalar type, whether I
> should evaluate the expression or not, degree versus radian, row major
> versus column major, etc., etc.
>
> Currently supported functions:
>
> glVertex, glNormal, glColor, glTexCoord (for 2D, 3D, 4D and int,
> short, float and double)
>
> glTranslate( a 2D or 3D vector expression )
> glScale( a 2D or 3D vector expression )
>
> glRotate( Rotation2D or AngleAxis or Quaternion )
>
> glLoadMatrix( 4x4 expression of float or double which can be row or
> column major )
> glMultMatrix( 4x4 expression of float or double which can be row or
> column major )
>
> Feel free to improve it and send patch ;) (e.g., it would be welcome
> to support Eigen::Translation, Eigen::Transform,
> Eigen::UniformScaling, 2x2 and 3x3 rotation matrix via glRotate, etc.)
>
> cheers,
>
> gael
>