Boost logo

Boost Users :

From: Malte Clasen (news_at_[hidden])
Date: 2005-04-13 12:47:54


Hi,

is the uBLAS library memory compatible to OpenGL vector and matrix
operations? I'd like to use a single representation for both internal
maths and the rendering interface of my application. OpenGL expects a
pointer to a float or double C-array. For example 4x4 matrices are
stored linearly as 16 values. When using std::vector<T> or
bounded_array<T> as storage, is there a guarantee that m(0,0) is a
reference to the first element of an array of (at least) 16 values that
equal the linearized matrix elements? Or is there another way to get
access to the low-level storage if it has a compatible memory layout? If
there isn't, is it possible customize the uBLAS library by an additional
"storage organization" or "adapted array" class?

best regards,
Malte


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net