Hello,
I'm sure this is a case of 'wrong thinking' on my part, and a general
lack of understanding of C++ STL:
bool getContext(eq::Config* eqConfig, AGLContext eqAGL_CTX, int node,
int pipe, int window)
{
//return specified
const eq::NodeVector& nv = eqConfig->getNodes();
const eq::PipeVector& pv = nv[node]->getPipes();
const eq::WindowVector& wv = pv[pipe]->getWindows();
eqAGL_CTX = ((eq::AGLWindow *)(wv[window]->getOSWindow()))-
>getAGLContext();
return true;
}
But the above code returns an error on the "nv[node]->getPipes();"
line in the vector.h STL file.
/**
* Returns a read-only (constant) iterator that points to the
* first element in the %vector. Iteration is done in ordinary
* element order.
*/
const_iterator
begin() const
{ return const_iterator (this->_M_impl._M_start); }
and gives me a EXC_BAD_ACCESS which I think is an incorrect pointer to
memory... I've tried turning on NSZombieEnabled but it gives me
pretty much the same thing.
(gdb) print this
(const __gnu_norm::vector<eq::Node*,std::allocator<eq::Node*> > *
const) 0x194
(gdb) print this->_M_impl
Cannot access memory at address 0x194
Is there a better way of getting the AGLContext object out of
Equalizer? I'm working with how eqHello creates things, and I noticed
that configVisitor goes about it a bit differently.
-Stephen
_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com