glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); //GL_LINE 对
glPolygonStipple
不起作用
glFrontFace(GL_CW);// clock wise
glCullFace(GL_FRONT_AND_BACK);// back face
glEnable(GL_POLYGON_STIPPLE); // GL_POLYGON_SMOOTH 对
glPolygonStipple
不起作用
glPolygonStipple (fly);
多边形的抗锯齿,建议用多重纹理采样,相比用平滑顶点形状大小和插值,可以更快更高效些。
使用显示列表,可以使点画模式绘制多边形效率最大化。
绘制凹多边形需要拆分为三角形来绘制,三角形不能用绘制多边形的共享边剔除,因此需要glEdgeFlay(GL_FALSE)来指定顶点; // GL_TRUE来指定后面的顶点是否为边界点,GL_FALSE是共享点。
/*
* Copyright (c) 1993-2003, Silicon Graphics, Inc.
* All Rights Reserved
*
* Permission to use, copy, modify, and distribute this software for any
* purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright
* notice and this permission notice appear in supporting documentation,
* and that the name of Silicon Graphics, Inc. not be used in
* advertising or publicity pertaining to distribution of the software
* without specific, written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" AND
* WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
* GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, </