抗锯齿功能在 Windows 上不起作用

发布于 2024-11-01 20:46:27 字数 739 浏览 6 评论 0原文

我正在开发一个基于 GLUT 的应用程序,需要在 Windows XP 上运行,但由于我在 Mac 上,我在 Xcode 中完成大部分编码,然后每隔一段时间切换到 Visual C++ 2008重新编译。它一直工作得很好,但我刚刚意识到抗锯齿功能在 Windows 版本上不起作用。

以下是一些屏幕截图:

在 OS X 上很棒 Awesome on OS X

在 Win XP 上蹩脚 Crappy on Win XP

我正在使用 GLUT 显示字符串“rgb alpha 双样本深度”。

这些形状不是真正的 3D,它们只是三角形:

glBegin(GL_TRIANGLES);
{
    ofSetColor(edgeColorFar1.r, edgeColorFar1.g, edgeColorFar1.b);
    glVertex2f(CENTER_X, CENTER_Y);
    ofSetColor(edgeColorNear1.r, edgeColorNear1.g, edgeColorNear1.b);
    glVertex2f(x - _dim, y - _dim);
    glVertex2f(x + _dim, y - _dim);
}
glEnd();

有什么想法吗?谢谢!

I'm working on a GLUT based app that needs to run on Windows XP, but as I'm on a Mac, I'm doing most of the coding in Xcode, then switching over to Visual C++ 2008 every once in a while to recompile. It's been working fine, but I just realized that anti-aliasing isn't working on the Windows version.

Here are some screenshots:

Awesome on OS X
Awesome on OS X

Crappy on Win XP
Crappy on Win XP

I'm using the GLUT display string "rgb alpha double samples depth".

The shapes aren't actual 3D, they are just triangles:

glBegin(GL_TRIANGLES);
{
    ofSetColor(edgeColorFar1.r, edgeColorFar1.g, edgeColorFar1.b);
    glVertex2f(CENTER_X, CENTER_Y);
    ofSetColor(edgeColorNear1.r, edgeColorNear1.g, edgeColorNear1.b);
    glVertex2f(x - _dim, y - _dim);
    glVertex2f(x + _dim, y - _dim);
}
glEnd();

Any ideas? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

安静 2024-11-08 20:46:27

您是否尝试过放入

ofEnableSmoothing();

setup() 函数?

have you tried putting

ofEnableSmoothing();

in your setup() function?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文