Re: [osg-users] Image release question

2009-08-16 Thread Ulrich Hertlein
Hi, On 14/08/09 9:56 PM, Rabbi Robinson wrote: I compile the code in debug mode. Well, the image is good either on the screen or saved as file, which likely rules out the dimension problems. Its the delete that is causing the problem Thank you! You're saying 'code' but does that imply your

Re: [osg-users] Image release question

2009-08-14 Thread J.P. Delport
Hi, the USE_NEW_DELETE and USE_MALLOC_FREE are hints to the osg::Image class that _it_ does the memory deallocation. If the image data is allocated by you and you want to delete it yourself, use NO_DELETE. See Image.cpp void Image::deallocateData() { if (_data) { if

Re: [osg-users] Image release question

2009-08-14 Thread Rabbi Robinson
Hi, Well, I see the code and the reason why I am posting here is because even I match the allocation type properly, it still crashes. In VC, it complains that there is something wrong the heap. Thank you! Cheers, Rabbi -- Read this topic online here:

Re: [osg-users] Image release question

2009-08-14 Thread Jason Daly
Rabbi Robinson wrote: Hi, Well, I see the code and the reason why I am posting here is because even I match the allocation type properly, it still crashes. In VC, it complains that there is something wrong the heap. Are you compiling your application in Debug or Release mode? Does it

Re: [osg-users] Image release question

2009-08-14 Thread Jason Daly
Rabbi Robinson wrote: Hi, Well, I see the code and the reason why I am posting here is because even I match the allocation type properly, it still crashes. In VC, it complains that there is something wrong the heap. It's also conceivable that you are munging memory (it's easy to run off

Re: [osg-users] Image release question

2009-08-14 Thread Rabbi Robinson
Hi, I compile the code in debug mode. Well, the image is good either on the screen or saved as file, which likely rules out the dimension problems. Its the delete that is causing the problem Thank you! Cheers, Rabbi -- Read this topic online here:

[osg-users] Image release question

2009-08-13 Thread Rabbi Robinson
Hi, I am trying to create an image out of a memory block: unsigned char * data= new unsigned char[1024]; image-setImage (int s, int t, int r, GLint internalTextureformat, GLenum pixelFormat, GLenum type, unsigned char *data, AllocationMode mode, int packing=1) For Allocation mode, there are