As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking to do some programming on the GPU but don't need any sort of 3D or high level graphics capability. Essentially all I need to do is call functions that loop through thousands of iterations very quickly. I started looking into OpenCL but it seems that support for that is much, much lower that OpenGL as I can use OpenGL ES even on mobile and WebGL on web. Web isn't that big of an importance to me at this point, but is there a viable alternative that has the wide support that OpenGL has but more used for calculation? I want something that will be able to run on as many computers and devices out there.
EDIT: I'm also looking for the best support of various graphics cards from AMD, Nvidia, etc.
OpenCL is supported by both main GPU manufacturers and is by far your best bet. The other alternative is CUDA. I think you would be better off asking a question along the lines of "How do I solve this problem using OpenCL?" than simply stating that it is not suited for the work you need done, as it is very hard to make recommendations based solely on the description above.
Please also note that OpenCL supports an embedded profile, which means it has some support on mobile devices. However the iPhone does not currently support this. It was rumored that it would be coming to iOS 6 but this seems not to have happened yet.
Also see this question which explains how android and OpenCL function together.
I guess for NVIDIA cards the best model to use is CUDA. It's pretty mature by now and very well supported. You can find many guides on the main site and they're well written so you should be able to pick it up quickly imo.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking to start a new project to work on in my free time that covers a lot of areas of Computer Science and I've decided on a game (most likely flight simulator or simple 2D side-scroller). Anyway, I do a lot of C#/Java development at work writing business applications so I'm looking to do a game in C++ (I have used C#/XNA for games previously).
However, I'm trying to find a good framework for C++ game development. I have used Qt before but don't believe this is suitable for what I am trying to achieve. Is Win32 and OpenGL still the best for C++ game development?
Also, I want to keep this pretty OO, any recommendations for wrapping the Win32 for game development? Or does OpenGL provide abstractions to help?
From what I've experienced, the Win API is a complete mess. I'd recommend using something like SDL and save yourself the trouble. As a bonus, this will also make it cross platform. You can also use OpenGL with SDL.
SDL is still a bit low level and has a C style API, so you'll need to write your own OO wrappers. I've heard that SFML and Allegro are popular alternatives but I have less experience with them.
SFML is probably the closest you can get. Most people using 2D rendering roll their own, and most using 3D go with either something like Irrlicht, or roll their own.
As for OGL, the OGL API is horrific- it's even worse than the Windows API. At least that is OO, C-style, instead of just plain old global-variables-up-wazoo.
Check out GLFW. It looks to be minimalistic (in a good way).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am currently developing an rpg type game in C++. I have developed a few games in the past but have used heavily inclusive APIs. For this game I am looking into developing it more myself. I still want the graphic and animation functions to be (mainly) implemented using the library. Here is a break down of the game:
It will be a top down tile-based game when not in battle where the character is free to walk around and speed will be determined by a speed stat
Once in battle it will be a turn-based battle system with (not completely final) 3 man team on each side
Some information will be stored online and will be used in the game but that will not need to be checked often
What I am asking is; what would most likely by the best library or API for me to use for this purpose? I have searched and have been able to find a few that I believe may suit my needs but none that have been popular. Perhaps I am looking for something too specific but any help or recommendation would be greatly appreciated.
P.S. Along with a recommendation, a link for a decent tutorial or documentation would be most appreciated.
There is always the popular libsdl. There are many tutorials for this library online inluding the dedicated
http://www.sdltutorials.com/
You can always use as much or as little of a library's functionality as you like.
Have you had a look at this?
http://irrlicht.sourceforge.net/
If you look in the forums, people have written their own compatible libraries for AI, Physics etc etc that they seem to be happy to share. Also there are lots of compatible tools like this http://www.ambiera.com/coppercube/ and lots of language wrappers.
As an addendum to Caustic's answer, I suggest looking into Ogre3D. Like Irrlicht, it is primarily a rendering engine, leaving much of the work to be done by yourself. From personal experience, I cannot recommend one over the other.
I am sorry to swear. I believe you should use SFML because it is an all-around nice library for graphics development.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I saw the articles that were going on about OpenGL being better than DirectX and that Microsoft are really just trying to get everyone to use DirectX even though it's inferior so that gaming is almost exclusively for Windows and XBox, but since the article was written in 2006 is it still relevant today?
Also I know plenty of games are written in DirectX but does anyone have any examples of popular games written in OpenGL?
Look at the facts. For the last decade or so, nearly every PC game has used DirectX primarily. Early versions of DirectX (think DirectX 4.0) were pretty awful, but it's been a long time since DirectX has been "inferior". Do you think Microsoft bribes game developers to use their API? Or could it simply be that their API was a better choice?
In fact, you could make a good argument that the opposite is true, because DirectX improved. Until around two years ago, OpenGL didn't. OpenGL was stuck with a ridiculously obsolete core feature set, and a million extensions that a developer has to navigate, some of which are available on one GPU, others are available on another, and sometimes they're compatible, sometimes they're not.
OpenGL has moved quickly to catch up since then, but that's exactly it. OpenGL has been catching up, not speeding ahead.
Then there's the tools argument. DirectX has amazing tools available for developers. PIX can do really impressive things for debugging, and it was available for free. And PIX was just one of the many tools made available for free by Microsoft.
OpenGL had, uh..... gDebugger. Which could inspect a few textures and the state of various gl objects, and it cost money.
I won't say one API is, or was better than the other. But there are very valid reasons why so many PC developers have flocked to DirectX for the last decade or so.
At least all games by Id software (and all games using their engine) use OpenGL, if I've understood correctly.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to build a little software rendering library, because I like the idea of voxels, and the possible other alternative methods of rendering. Call me naive.
Using vanilla c++, with codeblocks, on a win7 system but with cross-platform intent. Using glfw for window management.
My plan is to use the gpgpu for opencl (parallel) calcs, then using OpenGL (in 2D view) for cross-platform context management and frame display.
Thus using the gpgpu for accelerated calcs, but leaving it up to me to define what those calcs are for. And asking OpenGL to just draw my results on screen.
Is there any easier cross platform way of putting my own renderings to screen?
Is this proposed method awesome, or not?
glfw3, which is under development has access to native opengl contexts. you can use that to create an interop opengl context. I haven't tried it yet myself though.
Is there any easier way?
Maybe, but none that I'm aware of.
OpenCL supports OpenGL interop, which makes what you're trying to do very fast.
(i've used it myself, and it was fast, but maybe not as fast as I would have liked, but I used it in a inefficient way)
Is this awesome? Maybe, but remember that opencl can't use all the hardware that opengl can, so if possible, use opengl for graphics.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
i like to make very simple 3d/2d game for pc/mac/linux
what is the best free 3d/2d engine for this ?
i have no experience in game programming so i guess it have to be easy to learn
please in c++
thanks
While 'best' can very much depend on your situation, one I have used in the past to great success is OGRE 3D.
It's cross-platform, very nicely written (C++), and runs well. However the one thing that set it apart for me was the great community - you can always get help no matter how simple your question, and there are plenty of guides/tutorials around on their forum/wiki. The documentation is also very good.
It's well worth checking out.
Hrmm, upon reading that it almost sounds like I have a vested interest - I don't! I just really like it from past experience!
Try searching DevMaster's Game and Graphics Engines Database for 3D engines. This question has also been asked and answered MANY MANY times in their forums.
C4 Engine, irrLicht and Torque are often recommended for 3D in C++, but it really depends on your individual requirements or if you really need an engine at all.
I recommend Irrlicht. It's simple, lightweight but fast and powerful. It's not as featureful as Ogre3D, but I've found it more simple to use.
If you're looking for more of a simple API rather than a full-blown game engine, you should try SDL. That will give you a platform-independent way to render with OpenGL, handle input, do basic audio, etc. It's especially handy if you're looking for a way to do a simple 2D game project.
Panda3D is quite easy:
You can use it with C++ (or Python.)
It is well documented and offers many good samples.
It's mostly 3d oriented, so be aware although any 3d engine will involve a learning curve, Panda3D will have one of the shortest.