Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualTolito

Posted 29 January 2013 - 07:25 PM

I have decided to go with OpenGL rendering for a project of mine that was originally using SDL. It is still using SDL, but it is going to be depending on OpenGL for some graphical operations. One of my sprite sheets happens to have the dimensions, 1892x66. Here are my questions:

  1. Are the dimensions all wrong for an OpenGL texture, considering the power-of-two rule? If so, what is the best thing I can do?
  2. Does storing a sprite sheet as a surface in SDL use less memory than storing it as an OpenGL texture?
  3. Am I better off using separate graphics in the sheet for left and right and using a surface in SDL than using OpenGL, given the dimensions? I wrote a function to copy a sprite from a sheet to a separate surface and mirrored the surface, but this was slow when called multiple times in one frame.
  4. Will someone please link me to a document or post some code that provides an example of this?

Thank you! smile.png


#1Tolito

Posted 29 January 2013 - 07:13 PM

I have decided to go with OpenGL rendering for a project of mine that was originally using SDL. It is still using SDL, but it is going to be depending on OpenGL for some graphical operations. One of my sprite sheets happens to have the dimensions, 1892x66. Here are my questions:

  1. Are the dimensions all wrong for an OpenGL texture, considering the power-of-two rule? If so, what is the best thing I can do?
  2. Does storing a sprite sheet as a surface in SDL use less memory than storing it as an OpenGL texture?
  3. Am I better off using separate graphics in the sheet for left and right and using a surface in SDL than using OpenGL, given the dimensions? I wrote a function to copy a sprite from a sheet to a separate surface and mirrored the surface, but this was slow when called multiple times in one frame.

Thank you! :)


PARTNERS