Jump to content
Posted 20 December 2012 - 07:40 AM
Posted 20 December 2012 - 07:52 AM
Posted 22 December 2012 - 06:49 AM
Posted 25 December 2012 - 01:08 PM
Posted 26 December 2012 - 07:55 AM
That's only a fraction of the code needed to get something onto the screen, and most of it is not really relevant. For example, how about coordinate transformations such as matrices; do you use any and how do you define them? The matrices define the precise coordinates of your vertices on the screen and are probably the most important information along with the actual values of the vertices.
But as I stated, transformations and sub-imaging doesn't play very well together in the first place, and everything depends on the exact details about the coordinates along the edges of the sub-images.
Posted 26 December 2012 - 09:31 AM
Thanks for your answers!
I just pass integer values to my clips->x clips->y clips->w clips->h (despite their being GLfloats).
As for matrices tranformation nothing more than a simple glScalef with arbitrary float arguments
The enviroment is set up just like this
Posted 26 December 2012 - 11:47 AM
The right way depends on what you are willing to do. Adding a transparent border around each sub-image is one way. Not using sub-images, but separate images, is another.
A note on the border-method though. How exactly you approach this border depends on what accuracy you want. Since you're getting unwanted pixels, there is some difference between what you want and what you're doing.
The border-method has other limitations as well. For example, it doesn't play well at all with mip-mapping. Or, to be correct, sub-imaging as a whole doesn't play well with mip-mapping either, not just the border. Mipmapping is for down-scaling only though, so if you only do up-scaling then mip-mapping serves no purpose and the issues with mip-mapping are eliminated.
If you're willing to add a border, then consider the points above and choose the correct type of border, and it may be sufficient for you. However, if not using sub-images at all is also fine, then I would recommend that over the border.
Posted 26 December 2012 - 12:22 PM