Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 27 Nov 2007
Offline Last Active Feb 23 2015 01:16 AM

Posts I've Made

In Topic: Odd texture filtering issue

25 September 2011 - 12:20 PM

Unbind the texture after you are done creating it to make sure you are not accidentally changing its properties later.

glBindTexture( GL_TEXTURE_2D, 0 );

L. Spiro

Sorry, I forgot to include that line. I already was / am doing that.

In Topic: Odd texture filtering issue

25 September 2011 - 12:40 AM

You only need to set it once for each texture.

So why is it not working unless I re-set it during rendering?

In Topic: Quick confirmation on Triangle Strips / Degenerate Triangles

13 August 2011 - 12:49 AM

You made one based off the link I gave?

Be warned: the code he provides, while very helpful for getting a result and understanding all the gotchas, is not particularly fast (and there is a leak of memory when it fails in some cases).
My rewrite of his code is over 4 times faster, so if you did use his as a reference, be aware that there is tons of room for improvement. Your 1 second would go below to 0.25 seconds.

Suggestions for improving upon his code: Use a faster sort (I use a bottom-up merge sort) and make fewer allocations. Pass buffers down to be reused when you are searching the 3 directions of the triangle strips.

L. Spiro

I read over the article before in the past, and re-read it again but wrote my stripper on my own. I'm not doing much sorting and the results are written as binary data to files which are loaded at the appropriate time when the game is running. So the actual performance of the code is not a huge importance since the binary files are loaded extremely quickly.

The actual logic for the stripper is rather simple. It essentially just generates all possible strips for a given mesh and selects the longest strip and keeps repeating until no more free faces are left.

In Topic: Quick confirmation on Triangle Strips / Degenerate Triangles

12 August 2011 - 02:07 PM

I love it when a plan comes together! After writing my Triangle Stripper program over the course of a few hours, I tested it today and it worked completely in the first try! It runs amazingly quick (about 1 second to strip a model composed of 2400+ vertices) and produces some very large strips. Unfortunately it produces quite a few short strips as well. But most importantly is, the strips that it does generate render 100% perfectly.

Compared to the htgen program I was using before, it produces roughly 17% more strips :angry:.

Now that it works, I can tinker with it and try and eliminating those rogue strips of 1 or 2 faces.

And just an additional small update. My game's performance has now jumped over 26% from using indexed triangles in VBOs. Now I just need to perform some basic frustum culling and I should be set!

In Topic: Quick confirmation on Triangle Strips / Degenerate Triangles

11 August 2011 - 08:34 PM

Thanks a lot mhagain for your detailed explanation. In the end it's essentially functions like indexed triangles correct? If so I'm not sure it'll provide any performance improvements over what I'm doing already. It's recommended that on the iPhone that actual triangle strips are to be used for optimal performance.