Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 FTGL OpenGL 中更改 RGB 格式的颜色?
FTGLPixmapFont font("arial.ttf"); FTPoint coord(100, 100, 0); font.FaceSize(20); font.Render("abc", -1 , coord);
标准颜色更改不起作用。
glColor4f(1, 0, 0, 1);
利用
FTGLPixmapFont font("arial.ttf"); FTPoint coord(100, 100, 0); glPushAttrib(GL_ALL_ATTRIB_BITS); glDisable(GL_LIGHTING); glDisable(GL_DEPTH_TEST); glColor4f(1, 0, 0, 1); font.FaceSize(20); font.Render("abc", -1 , coord); glPopAttrib();