使用Visual C ++ 2010的控制台模式图形 [英] Console mode graphics using Visual C++ 2010

查看:153
本文介绍了使用Visual C ++ 2010的控制台模式图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想从矩阵中用C ++绘制图形.我想在Win32控制台应用程序中执行此操作.欢迎任何想法或指点.谢谢.

Hi,

I would like to draw a graph in C++ from a matrix. And I would like to do this in a Win32 console application. Any ideas or pointers are welcome. Thanks.

推荐答案

您不能在控制台应用程序中绘制图形.
You can''t draw a graph in a console application.


在旧的Borland和Turbo C ++中在DOS时代,使用控制台图形模式非常容易. VC ++传统上不支持这些模式.尽管人们四处寻找内联汇编和直接视频缓冲区写入的功能,以通过VC ++进行控制台模式的图形处理.

当今的VC ++版本在控制台应用程序中不支持任何类型的图形模式.但是,一切都不会丢失,如果您真的很愿意这样做,则可以使用似乎支持控制台模式图形的OpenGL.也就是说,编写Windows模式应用程序,然后使用GDI +甚至DirectX/XNA/WPF之类的东西来渲染高性能图形可能是一个更加实用的想法.那是你的电话.

OpenGL论坛上的相关主题:

http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat& Number = 101398 [ ^ ]
In the old Borland and Turbo C++ for DOS days, it was quite easy to use console-graphics modes. VC++ has traditionally not supported these modes. Although people have hacked around with inline assembly and direct video buffer writes to do console mode graphics from VC++ too.

Modern day VC++ editions do not support any kind of graphics modes in console applications. But all''s not lost, and if you are really keen on doing this, you can use OpenGL which does seem to support console-mode graphics. That said, it would probably be a far more practical idea to write a windows mode application and then use something like GDI+ or even DirectX/XNA/WPF to render high performant graphics. That''s your call though.

Related thread on the OpenGL forums:

http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=101398[^]


自从Nishant Sivakumar提到了DOS的美好时光", Turbo Vision [ ^ ]是您想要开发的直观"控制台/文本模式应用程序.

现在,它可以在DOS,FreeBSD,Linux,QNX,Solaris和Win32上运行:)

玩得开心:)

问候
Espen Harlinn
Since Nishant Sivakumar mentioned the "good old days" of DOS, Turbo Vision[^] is an option if you want to develop an "intuitive" console/text mode application.

It now works on DOS, FreeBSD, Linux, QNX, Solaris and Win32 :)

Have fun :)

Regards
Espen Harlinn


这篇关于使用Visual C ++ 2010的控制台模式图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆