什么是 C++ 中的简单图形库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20352143/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is an easy graphics library in C++?
提问by Lara
In C++, what is an easy-to-use graphics library? It doesn't have to be advanced, just drawing 2D shapes is enough.
在 C++ 中,什么是易于使用的图形库?它不必高级,只需绘制 2D 形状就足够了。
If possible, something comparable to the paint-paintcomponent-repaint stuff in Java would be awesome.
如果可能的话,与 Java 中的paint-paintcomponent-repaint 类似的东西会很棒。
The only thing I want to use it for is to draw small circles on a white screen, which refreshes every time, like:
我唯一想用它的就是在白屏上画小圆圈,每次都会刷新,比如:
calculate positions
loop:
move
recalculate
refresh and draw circles at the new positions
That's all.
就这样。
采纳答案by Unknown Soldier
You should take a look at SFML. http://www.sfml-dev.org/tutorials/2.1/graphics-draw.php
你应该看看SFML。http://www.sfml-dev.org/tutorials/2.1/graphics-draw.php
回答by John Bandela
Especially with Visual C++, I think you would be interested in Cinder. The link is http://libcinder.org/
特别是对于 Visual C++,我想你会对 Cinder 感兴趣。链接是http://libcinder.org/
Here is a video presentation about using Cinder with Visual C++ 2013 http://www.youtube.com/watch?v=hwHYJM2GV1U
这是一个关于在 Visual C++ 2013 中使用 Cinder 的视频演示 http://www.youtube.com/watch?v=hwHYJM2GV1U
回答by Claudio
Qtis a powerful, easy-to-use and cross-platform C++ library.
Qt是一个功能强大、易于使用且跨平台的 C++ 库。
There is also a very good book for beginners.
还有一本非常适合初学者的书。
回答by JBL
If you're not afraid to delve in something relatively new, you could try Cinderwhich was notably advocated by Herb Sutter during Going Native 2013, as something accessible and powerful.
如果你不害怕钻研一些相对较新的东西,你可以试试Cinder,这是Herb Sutter 在 Going Native 2013 期间特别提倡的,因为它易于使用且功能强大。