Hi,
I'm working on a markerless tracking project.
Right now, I render into a FBO, calculate the edges on the resulting texture
and compare those with another texture.
As I need to sum the pixels in order to get a weight of the result, the texture
must be transfered to the CPU again.
Due to the use of floating point textures, I can't use "grabForeground". In
addition a proposal working entirely on GPU through Nvidia CUDA framework is
considered.
Therefore I need the OpenGL texture ID anyway.
I'd appreciate it very much, if someone could point me to the right direction,
as I'm a bloody beginner in OpenSG
so far i tried following:
void display (void)
{
// get the RenderAction from SimpleSceneManager
RenderAction *rAct = static_cast<RenderAction*>( mgr->getAction() );
// render fbo scene
fboViewport->render(rAct);
// render main scene
mgr->redraw();
// readback
float* buf= new float ( imageWidth * imageHeight *4 );
glBindTexture( GL_TEXTURE_RECTANGLE_ARB,
fboViewport->getTextures(0)->getGLId() );
glGetTexImage( GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA,GL_FLOAT,
(GLvoid*)buf );
}
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
-------------------------------------------------------------------------
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/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users