View Full Version : OpenGL simplifying polygons
02-17-2011, 07:56 PM
I am looking at a way to simplify polygons (i.e. two 16x16 polygons are size-by-side, and have the same 16x16 texture. We can turn those two polygons into one 32x16 polygon, and tile the texture twixe across the polygon.) Is there any easy way to do this? I have heard people mention tessellation, but that seems to do the opposite to me.
02-18-2011, 02:04 AM
Look for vertices with identical or near identical attributes (position, color, texcoord). If they are all equal or close enough, you can merge the vertices. If you are using vertex and index buffers, remove the duplicate vertex and replace its index with the one you keep.
02-18-2011, 05:00 PM
That would still draw 2 seperate polygons, won't it?
And how would I merge the vertices?
I have read about GLU tessellation, with the GLU_TESS_BOUNDARY_ONLY option thrown in there somewhere. Would this achieve what I want to do?
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.