Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm just working myself into the boost libraries and there's one question that stucks in my head :D
Is multithreading, especially the boost one and for game development, still used? I understand the pros of threading but I'm not sure if it's not obsolete. If not, where does it get used in game development?
RenX
Yes, you're still need it. No, it is not obsolete. Moreover, multi-thread support is the one of the most progressive and integral parts of the modern game development. Almost every modern game engine has multi-thread support. Why? Because animation and the physics; rendering and resource loading could performs simultaneously, and even physics itself may be parallellized, this also applies to the paging. What about boost, Ogre3D uses boost::threads for multi-threaded purposes (if you're an enthusiast, you should be familliar with Ogre3D, aren't you?). Unreal Engine 3 uses the rendering thread and the game-logic thread, separated from the main application's thread, moreover, UE 3.5 has Unreal Swarm as the job distribution system and Gemini as ultra-fast HDR rendering pipeline. So yes, it has sense.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I’m developing an iOS app and solved the interoperability Swift-C++ in the CPU side wrapping the C++ classes in Objective-C. But on the GPU side, I don’t Know if exists any way of call and retrieve data from a pure C++ class (not MSL). Since MSL is C++ based my intuition says that yes but I didn’t find any information in that way…
I’m trying to use libraries like CGAL or FastNoise to update a massive number of particles.
Welcome!
I'm afraid you can't just access any data from any class in your GPU code. Programming for the GPU requires a very different paradigm. You have to explicitly send data to the GPU, trigger computational tasks a.k.a. "kernels" to run on the GPU, wait for their completion, and transfer the data back to the RAM.
I recommend you check out some tutorials on Metal. Here is for example a sample project where image data is modified on the GPU using compute kernels.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I've been fighting with several libraries (irrlicht, Ogre3D etc) and falling between either too complex libraries or too complex installation guides.
I'd appreciate some pointers to how to achieve what the title suggests.
Thanks
If you're going for simplicity of setup and use, I'd recommend you Unreal Engine. It not only allows you to render both in 3D and 2D, but has a lot of other functionality including scripting in c++.
If you're looking for a more lightweight solution, though not as easy, you can try using OpenGL. It is quite easy to set up - just install Code::Blocks and start with their OpenGL template. Although it is much harder to learn and use, it is very developing.
If you don't really need to use c++, you can use Unity. Although its interface is exposed through c#, its not very hard to learn for a c++ programmer. I also find it easier to use than Unreal Engine.
I would also reccomend Vulkan, which would probably the most perforamant of all of them, but well, you wanted a "simple" solution.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
My university started teaching a course which includes OpenGL programming. They make us use FreeGLUT to create a window and a context for OpenGL, but I found an online course at lynda.com about OpenGL in which they use GLFW instead of FreeGLUT.
So I want to know which one should I use and what are the differences between the two?
FreeGLUT:
Based on the GLUT API.
GLUT has been around for about as long as OpenGL itself.
Many tutorials and examples out there use GLUT.
Takes care of implementing the event loop and works through callbacks (good for simple stuff, makes things like precisely timed animation loops and low latency input much harder though).
GLFW:
Designed from scratch with the experiences of other frameworks in mind.
Gives much finer control over context creation and window attributes.
GLFW-2 Provides basic threading support functions (thread creation, synchronization). –– removed from GLFW-3
GLFW-2 Provides basic image file loading support. –– removed from GLFW-3
Gives very detailed access to input devices.
Event loop is in control of the programmer which allows for much preciser timing and lower latency.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
A while ago i made a database framework in c++ and have been using it in various places, even made a wrapper for it for vb.net.
Now i have a new project that would require multiple programs accessing a single database and it would be wasteful to load up the database multiple times for every one of them not to mention the syncing horrors.
So I figured i would turn the framework into a standalone application and access to the data would be done in some xx magical way from those other programs. From what I've seen php and mysql do something like this..?
Problem is, I have no clue where to start. The only kind of cross program communication i've done is one program reading and writing directly into the other ones memory, seems kinda hacky though and I'm not sure if that sort of thing is going to fly with managed languages (I want to make it accessible in vb.net too).
Tips?
The most portable way to do IPC (inter-process communication) is probably going to be Sockets.
What about D-Bus? There ist a port for Windows.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Im using Generic.Queue in C# 3.0 and Monitor.Enter,wait,exit for wait before consuming the queue (wait for the element to be enqueued). Now im moving to C# 4.
Can anyone suggest me which one is fast and best especially to avoid locks..
BlockingCollection vs concurrentQueue or any thing else...
Note. I dont want to restrict my producer
Thanks in advance..
BlockingCollection and ConcurrentQueue are there for precisely this reason. I doubt that you'll find anything better, or simpler to use. The parallel extensions team know their stuff :)
Just a quick check on versions though - you're definitely using .NET 4, not just C# 4? (For example, you could be using Visual Studio 2010 and thus C# 4, but still targeting .NET 3.5, in which case you couldn't use Parallel Extensions.)
You may also want to start researching Task-Based Asynchronous Pattern, TPL Dataflow and the async/await features of C# 5... obviously you can't use them just yet, but it doesn't hurt to know what's coming up.