robot icon indicating copy to clipboard operation
robot copied to clipboard

Improve interoperability with other third-party libraries

Open dkrutsko opened this issue 9 years ago • 1 comments

Some classes in Robot would benefit from having improved interoperability with other third-party libraries. One example would be the Image class. The image class should allow any arbitrary pixel buffer to be assigned in either managed or unmanaged mode. When setting the pixel buffer in managed mode, the Image class instantly assumes full control of the buffer while in unmanaged mode, the Image class will not, thus not attempting to free the memory upon destruction.

Another example would be the process class. While this scenario mainly applies to Windows, it would be useful to allow assignment of any arbitrary handles in either managed or unamanged mode. This could be useful in situations where a handle has already been acquired but ownership needs to be transferred to and from the Process class.

dkrutsko avatar Jun 15 '16 02:06 dkrutsko

Notes to self: Review the old Texture code from Velocity. Implement the concept of "management" to classes which need it. That is, SetManaged, IsManaged, which directly affects the functionality at destruction. This allows letting people use API's like Image::SetData without worrying about data ownership.

dkrutsko avatar Jun 15 '16 02:06 dkrutsko