The above field is supplemented with consent to receive a newsletter containing information and marketing content about the cppstories.com portal from Bartłomiej Filipek codebf based in Krakow. The consent may be withdrawn at any time. See the full Privacy Policy.
In this post I will test several compiler options and switches that could make the particle system run faster.
Read more to see how I’ve reached around 20% of performance improvement!
The Series Initial Particle Demo Introduction Particle Container 1 - problems Particle Container 2 - implementation Generators & Emitters Updaters Renderer Introduction to Software Optimization Tools Optimizations (this post) Code Optimizations Renderer Optimizations Summary Start We are starting with those numbers (Core i5 Sandy Bridge):
OpenGL 4.5 has just arrived!
Since Siggraph 2014 is happening right now, we could expect a new version of OpenGL. And it happened! Khronos announced OpenGL 4.5! Not a major update, but still adds some nice features to the API. What about OpenGL 5.0? Is there any news here?
Changes GL_ARB_clip_control GL_ARB_cull_distance GL_ARB_ES3_1_compatibility GL_ARB_conditional_render_inverted GL_KHR_context_flush_control GL_ARB_derivative_control (GLSL) GL_ARB_direct_state_access GL_ARB_get_texture_sub_image GL_KHR_robustness GL_ARB_shader_texture_image_samples (GLSL) GL_ARB_texture_barrier As you can see, this list of changes is not that impressive.
I am very curious about the D language and its community. Although, I do not have lot’s of experience with this language, I try to track news and important updates. Recently, I’ve noticed that there is another book released regarding the language: D Cookbook, by Adam D. Ruppe
Let’s see what’s inside this book
It’s time to start improving the particle code and push more pixels to the screen! So far, the system is capable to animate and do some basic rendering with OpenGL. I’ve shown you even some nice pictures and movies… but how many particles can it hold? What is the performance? Is it that bad?
When you write:
char strA[] = "Hexlo World!"; strA[2] = 'l'; Everything works as expected. But what about:
char *strP = "Hexlo World!"; strP[2] = 'l'; Do you think it will work correctly? If you are not sure, then I guess, you might be interested in the rest of article.
As I wrote in the Introduction to the particle series, I’ve got only a simple particle renderer. It uses position and color data with one attached texture. In this article you will find the renderer description and what problems we have with our current implementation.
The Series Initial Particle Demo Introduction Particle Container 1 - problems Particle Container 2 - implementation Generators & Emitters Updaters Renderer (this post) Introduction to Optimization Tools Optimizations Code Optimizations Renderer Optimizations Summary Introduction The gist is located here: fenbf / ParticleRenderer
Recently, I’ve written an article about using a .NET third party library to generate reports from apps. You can find it on this in my previous post. In my opinion, the whole idea might be useful, for instance, for performance tests. I often try to make such in my blog. Basically you do some tests and then output results to the console or a txt file…
In the previous particle post the particle generation system was introduced. But after a new particle is created we need to have a way to update its parameters. This time we will take a look at updaters - those are the classes that, actually, makes things moving and living.
The Series Initial Particle Demo Introduction Particle Container 1 - problems Particle Container 2 - implementation Generators & Emitters Updaters (this post) Renderer Introduction to Optimization Tools Optimizations Code Optimizations Renderer Optimizations Summary Introduction Updaters also follow SRP principle.
Recently ended DConf 2014 conference was, as usually, a great event filled with interesting topics about the D language. I still need to update my little knowledge about the language and see more presentations, but one keynote especially drew my attention. This was a talk from Scott Meyers called The Last Thing D Needs.
In our particle system we have already a basic foundation: the container and the framework. Now we need some modules that can actually wake particles. In this post I will describe the emitter module and generators.
The Series Initial Particle Demo Introduction Particle Container 1 - problems Particle Container 2 - implementation Generators & Emitters (this post) Updaters Renderer Introduction to Optimization Tools Optimizations Code Optimizations Renderer Optimizations Summary Introduction Basic design:
Last time I’ve written about problems that we can face when designing a particle container. This post will basically show my current (basic - without any optimizations) implementation. I will also write about possible improvements.
The Series Initial Particle Demo Introduction Particle Container 1 - problems Particle Container 2 - implementation (this post) Generators & Emitters Updaters Renderer Introduction to Optimization Tools Optimizations Code Optimizations Renderer Optimizations Summary Introduction Basic design:
After watching some of the talks from Build 2014 - especially “Modern C++: What You Need to Know” and some talks from Eric Brumer I started thinking about writing my own test case. Basically I’ve created simple code that compares vector<Obj> vs vector<shared_ptr<Obj>> The first results are quite interesting so I thought it is worth to describe this on the blog.