我一直在为一个游戏(学校项目)的GUI菜单工作,我们有一个引擎模板准备就绪,我们只需要制作一个GUI菜单。我和我的朋友和老师的帮助已经设法使这里充满箱非的功能是:OpenGL,C++角色框
void BoxTest(float x, float y, float width, float height, float Width, Color color)
{
glLineWidth(3);
glBegin(GL_LINE_LOOP);
glColor4f(0, 0, 0, 1);
glVertex2f(x, y);
glVertex2f(x, y + height);
glVertex2f(x + width, y + height);
glVertex2f(x + width, y);
glEnd();
glLineWidth(1);
glBegin(GL_LINE_LOOP);
glColor4f(color.r, color.g, color.b, color.a);
glVertex2f(x, y);
glVertex2f(x, y + height);
glVertex2f(x + width, y + height);
glVertex2f(x + width, y);
glEnd();
}
这是怎么看起来像现在: http://gyazo.com/c9859e9a8e044e1981b3fe678f4fc9ab
问题是我希望它看起来像这个: http://gyazo.com/0499dd8324d24d63a54225bd3f28463d
打扰它看起来好多了,但我和我的朋友一直坐在这里几天没有线索如何实现这一点。
谢谢,意外链接错误的图片修复了! – StreY