1
Feature requests / A little more exposure... and smart pointers too.
« on: May 19, 2010, 10:47:33 pm »
I am using SFML for a rather non-traditional application. I am using it to animate a slide show. In doing so I have had to expose a few protected class members.
Reading large images fails because of texture size limitations. In order to load a large image, I have had to expose the ImageLoader. By doing so, I am able to read a large JPEG image and decimate it before creating a sf::Image using the LoadFromPixels function.
In animating the slide show, I often interpolate between transformation states. It would be easier to work directly with the transformation matrix. I see no reason not to expose GetMatrix as well as create a SetMatrix function.
I would also recommend some changes regarding images. Since images rarely change size, the overhead of STL vectors is not really justified. However, moving images around would be much easier if smart pointers were used to handle the allocation/deallocation of memory. In addition, if an image container also contained pointers to the start of every line, and appropriate operator[] functions were provided, then pixels could be accessed using doubly indexed notation such as: myImage[row][column].
Thanks for your consideration.
Reading large images fails because of texture size limitations. In order to load a large image, I have had to expose the ImageLoader. By doing so, I am able to read a large JPEG image and decimate it before creating a sf::Image using the LoadFromPixels function.
In animating the slide show, I often interpolate between transformation states. It would be easier to work directly with the transformation matrix. I see no reason not to expose GetMatrix as well as create a SetMatrix function.
I would also recommend some changes regarding images. Since images rarely change size, the overhead of STL vectors is not really justified. However, moving images around would be much easier if smart pointers were used to handle the allocation/deallocation of memory. In addition, if an image container also contained pointers to the start of every line, and appropriate operator[] functions were provided, then pixels could be accessed using doubly indexed notation such as: myImage[row][column].
Thanks for your consideration.