简体   繁体   English

我应该使用什么类型的工具来制作C或C ++中的简单模拟器

[英]What type of a tool should I use to make a simple simulator in C or C++

I'm a Rails/web developer with little experience with C++, so I'm not totally sure what direction to head in: I'm looking to build a simple simulator that I can use to test an algorithm I'm building that converts standard images to radial coordinates, and all I really need to be able to do is to plot points (which will represent LEDs) on a blank window and continuously refresh them (the LEDs blink). 我是一个Rails / web开发人员,对C ++没什么经验,所以我不完全确定要进入的方向:我正在构建一个简单的模拟器,我可以用来测试我正在构建的算法标准图像到径向坐标,我真正需要做的就是在空白窗口上绘制点(代表LED)并连续刷新它们(LED闪烁)。 I don't want to build a gui; 我不想建立一个gui; command line is fine, as I'll be the only person using the tool. 命令行很好,因为我将是唯一使用该工具的人。

I'm not sure whether this is even possible or not... I did some Java programming years ago and I remember being able to pretty easily open a window and render images in it. 我不确定这是否可能......几年前我做了一些Java编程,我记得能够很容易地打开一个窗口并在其中渲染图像。 Is there a C++ equivalent? 是否有C ++等价物?

Thanks in advance! 提前致谢!

What you are describing is a perfect fit for a GUI application, rather than command line, as far as I understand. 根据我的理解,您所描述的内容非常适合GUI应用程序,而不是命令行。

But if you want something really simple, and not spend some time learning a GUI development framework (MFC, Qt, WxWidgets, etc), you should check the following resources: 但是如果你想要一些非常简单的东西,而不是花一些时间学习GUI开发框架(MFC,Qt,WxWidgets等),你应该检查以下资源:

It's not that easy in C++, because there is no standard way in doing this. 在C ++中并不容易,因为没有标准的方法可以做到这一点。 It's not part of the language. 它不是语言的一部分。 There are a lot of frameworks though, some lightweight and some bloating. 虽然有很多框架,有些是轻量级的,有些是膨胀的。 It also depends your platform. 它还取决于您的平台。 Anyhow, I think I would use OpenGL and do that calculation thing in a shader. 无论如何,我想我会使用OpenGL并在着色器中进行计算。 That way you don't have to recompile and rerun all the C++ code. 这样您就不必重新编译并重新运行所有C ++代码。 You can even do it in way that updates the GPU shader whenever you save your shader file giving you immediate results. 您甚至可以在保存着色器文件时更新GPU着色器,以便立即获得结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C ++我应该在这个dll脚本中使用什么类型? - c++ what type should I use in this dll script? 我应该使用什么SDK? C ++ - What SDK should I use? c++ C++ 如果我知道几个可能的确切类型,我应该使用什么类型? - C++ what type should I use if I know the exact type from a few possible? 创建一个Timer类,应使用哪种数据类型保存值? (C / C ++) - Creating a Timer class, what data type should I use to hold values? (C/C++) 我应该在 C++ 中使用什么样的工具来创建一个简单的 RISC-V 反汇编程序? - What sort of tools should I use in C++ to create a simple RISC-V disassembler? 我应该在 C++ 中创建一个返回退出状态的函数 - What type should I make a function that returns an exit state in C++ 我应该在这里使用什么样的设计模式来充分利用现代C ++? - What sort of design pattern should I be using here to make full use of modern C++? C++ 我应该使用什么类型的指针来存储 output `algorithm` `remove` function 的地址? - C++ What type of pointer should I use to store output address of `algorithm` `remove` function? C ++中调用图的简单工具 - Simple tool for callgraph in C++ c + +我应该使用const作为参数值类型的方法吗? - c++ should I use const to method of parameter value type?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM