图形库用于C ++ [英] Graphics Library for C++

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

问题描述

我工作的一个仿真项目C ++和我图形需要输出一些信息。我搜索一下,发现了一些图书馆,但他们大多只是密谋什么的。也有像EasyBMP库,其可用于创建位图图像或类似的图像格式。也有一些库,比如OpenGL,DirectX和SDL允许硬件加速的实时图像。 我的问题是我需要实时,硬件加速图形库。作为这一领域的新手,我不能让头部或类似OpenGL或DirectX的尾巴。我只需要做2D图形的工作,所以我不认为有必要把时间花在学习OpenGL或什么的。它最好是跨平台的,但是这不是必须的。 如果您知道有关SDL或OpenGL或DirectX信息的一些很好的来源,我会很高兴地知道这一点。

I am working on a simulation project in C++ and I need to output some information graphically. I searched about it and found some libraries, but most of them just do plotting or something. There are also libraries like EasyBMP, which can be used to create bitmap images or similar image formats. There are also some libraries like OpenGL, DirectX and SDL which allow hardware-accelerated real time graphics. My problem is that I need a library for real time, hardware accelerated graphics. As a newbie in this field, I can't make head or tail of something like OpenGL or DirectX. I only need to do 2D graphics work, so I don't think it's necessary to spend my time for learning OpenGL or something. It'd better be cross-platform, but that's not a necessity. If you know some good source of information on SDL or OpenGL or DirectX, I'd be glad to know about it.

PS:我的目标平台是Windows

PS: My target platform is windows.

推荐答案

,学会了OpenGL的基础知识在10周所大学的课程,主要是集中在建模的统计数据,我肯定会觉得OpenGL的将是一个合理的选择简单易学的二维实时模拟图形包。

Having learned the basics of OpenGL in a 10 week university course that was primarily focused on modeling statistical data, I would definitely think OpenGL would be a reasonable option for an easy to learn graphics package for 2D real time modeling.

虽然有一定的复杂性提供OpenGL的你不需要环绕所有这些功能,您不需要,做一个图形画面的基本项目的负责人几乎是你穿上所有的样板code'吨需要吃透,你几乎可以从一个示例项目复制和粘贴。例如,有一些示例程序与OpenGL的教科书去。配置全库是项目的一部分,是将一对夫妇.lib文件到一定点的配置设置的只是一个问题,它并不需要很多,使之做什么,然后你只需要以熟悉的功能的一小部分,对我来说几乎似乎比说更容​​易,在Java中绘制2D的东西。

Although there's certainly complexity available to OpenGL you don't need to wrap your head around all these features you don't need, to make a basic project with a graphics screen is almost all boilerplate code that you don't need to understand well, you could practically copy and paste from a sample project. For example, here are some sample programs that go with a textbook on OpenGL. Configuring the whole library to be part of your project is just a matter of adding a couple .lib files to a certain spot in the configuration settings, it doesn't take a lot to make it "do something" and then you will only need to familiarize yourself with a small subset of the features, to me it almost seemed easier than, say, drawing 2D stuff in Java.

我真的不知道任何与其他建模工具不好,只是觉得我会扔在那里,我不会写一关的速度太快为太复杂,这将会是合理的考虑,即使没有一个巨大的背景,C ++或图形等。

I don't really know any of those other modeling tools well, just thought I'd throw out there that I wouldn't write that one off too quickly as being "too complex", it'd be reasonable to consider, even without a huge background in C++ or graphics, etc.

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

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