Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: To Texture Or Not To Texture?

  1. #1
    Newbie Newbie
    Join Date
    Oct 2012
    Posts
    2

    To Texture Or Not To Texture?

    Hi All,

    I have a repeatable texture which looks like (this is just naff copy)...



    I need to fill an area of the screen with this pattern but before I implement this using the texture I wanted to find out peoples opinions on drawing this manually and whether it is worth it?

    E.g. draw the yellow quad base, then 4 triangles in corners and one rotated quad centrally.

    If manually drawing the above pattern means a smaller overhead + faster rendering then I think I will go the manual route. I'm just not sure what is best practice?

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    790
    Is that really the performance bottleneck of your application, is it worth optimizing? FWIW my guess would be the texture is faster, but that is just a guess and since GPU performance is a complicated beast that depends on many factors (memory bandwidth, shader/computation complexity, state changes, driver calls, etc.) the only way to be sure is to test it. That kind of effort is normally only justified for the stuff that provably (i.e. through profiling) is the bottleneck of the application.

    One advantage (unrelated to performance) of drawing this "by hand" is that it will magnify properly, with the texture you will start to see texels at some point. Of course that only matters if you ever move the camera closer to this pattern.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •