Hi Robert,
I fount it! I'm so sorry for my carelessness.
Thank you s much!!
Qingjie.
robertosfield wrote:
> Hi Qingjie,
>
>
> This is no longer about the OSG, it's about C++. Your mistake is straight
> forward C++ issue of not matching the base classes parameters when overidding
> a
Hi Qingjie,
This is no longer about the OSG, it's about C++. Your mistake is straight
forward C++ issue of not matching the base classes parameters when
overidding a method: The Camera::DrawCallback base class is:
/** Draw callback for custom operations.*/
struct OSG_EXPORT
Hi Robert,
Do you mean the DrawCallback in the Camera class, which contains
virtual void operator () (osg::RenderInfo& renderInfo) ? And here I can use the
RenderInfo right?
As I know, the following code can get a contextID:
camera->getGraphicsContext()->getState()->getContextID();
Is this
Hi Qingjie,
On 9 September 2015 at 09:27, Qingjie Zhang <305479...@qq.com> wrote:
> Do you mean the DrawCallback in the Camera class, which contains
> virtual void operator () (osg::RenderInfo& renderInfo) ? And here I can
> use the RenderInfo right?
>
Yes. You can attach draw callbacks to
Hi Qingjie,
The RenderInfo is managed by the my the rendering back end, it's passed to
all draw callbacks and Drawables.
Robert
On 9 September 2015 at 04:29, Qingjie Zhang <305479...@qq.com> wrote:
> Hi Robert,
> I'm knowing that the RenderInfo->getContextID() can give me the contextID
> to
Hi Robert,
To get the handle of opengl texture, I attached a DrawCallback to the main
camera, doing like these codes:
struct MyCameraPostDrawCallback : public osg::Camera::DrawCallback
{
virtual void operator()(const osg::RenderInfo )
{
int contextID =
Hi,
I generated a texture2d with osg, to use the texture in CUDA, I have to get the
corresponding "opengl texture" handle(GLuint), and then access to the texture
by the handle in CUDA.
Now I don't know how to get the handle.
Many thanks for your reply!!!
...
Thank you!
Cheers,
Qingjie
Thank you Robert,
well, I've checked the source code of OSG, and found what you said, but I still
don't know about the contextID, what value of the parameter should I give to
the function?
Thanks so much!
Qingjie.
robertosfield wrote:
> Hi Qingjie,
>
>
> The osgTexture::TextureObject*
Hi Robert,
I'm knowing that the RenderInfo->getContextID() can give me the contextID to
use in the getTextureObject(uint contextID), but where can I get the
RenderInfo? I searched the source code of Texture but did not find that..
Many thanks.
Qingjie
robertosfield wrote:
> Hi Qingjie,
>
>
Hi Qingjie,
The osgTexture::TextureObject* osg::Texture::getTextureObject(uint
contextID) method can be used to get the OSG's wrapper for the OpenGL
texture object. The TextureObject::id() method returns the OpenGL texture
object id.
Robert.
On 8 September 2015 at 15:20, Qingjie Zhang
10 matches
Mail list logo