Hi, how about this code here:
ImagePtr img1 = Image::create(); beginEditCP(img1); img1->set(Image::OSG_RGBA_PF, 512, 512); endEditCP(img1); beginEditCP(m_pCopyTexture2); m_pCopyTexture2->setMinFilter(GL_LINEAR); m_pCopyTexture2->setMagFilter(GL_LINEAR); m_pCopyTexture2->setTarget(GL_TEXTURE_2D); m_pCopyTexture2->setInternalFormat(GL_RGBA8); m_pCopyTexture2->setImage(img1); endEditCP(m_pCopyTexture2); When am I supposed to delete img1? Is the destructor of the texture taking care? If I use subRefCP of the image immediately, the system crashes. If I apply the OpenGL metaphor on this sample, I would expect that I can delete the image. But obviously the image is uploaded to texture memory later.... Cheers, Toni -- Ing. Antonio Bleile Seac02 S.r.l. via Avogadro 4 10121 Torino Italia Tel. +39.011.197.006.52 Fax +39.011.197.006.53 E-mail [EMAIL PROTECTED] Sito www.seac02.it ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
