Tag Info

Hot answers tagged

5

On tile based GPUs (commonly seen in mobile hardware) it is beneficial to clear the renderer, as it allows the GPU to dispose of the existing cached frame data. Here's a quote from OpenGL Insights, dealing with the benefits of clearing the framebuffer on a tile based renderer: "On a tile-based architecture, avoiding clears can be disasterous for ...


4

Frameworks in C++ tend to use their own string implementation to solve Unicode and localization issues. Unicode support in C++ is generally not that good even in C++11. std::string can't store Unicode characters. If you want to take advantage of unicode and probably localization you may want to use their string.


2

No you don't need to. As you said yourself, if you whole scene is drawn-over by the new rendered frame, then it makes no visual difference. And as comments rightfully mentionned, it might have a positive or a negative impact on performance: profile on your target platform(s) to make your decision. In the old days, it was common place to actually re-render ...


2

Generally timeGetTime() is best for timing game logic - GetTickCount isn't quite high enough resolution, and QPC & RDTSC are a lot more trouble than they are worth for that purpose. For profiling on the other hand, either RDTSC or QPC can be quite worthwhile. I prefer RDTSC over QPC, though microsoft recommends QPC. The four common time functions ...


2

Multiple inheritance In C++, you want to be careful with multiple inheritance. It can really add complexity to your code. Especially when you include two objects that have the same base class. This is known as the diamond problem. There are, however, cases were multiple inheritance has it's uses, as seen below. How to properly use multiple inheritance In ...


2

The simplest way to do this is to compute a correcting rotation every time the camera moves: axis = cross(newPosition, oldPosition); angle = acos(dot(normalize(oldPosition), normalize(newPosition))); ...and then rotate the camera's orientation matrix/quaternion/basis vectors by this correction. But since the movements are likely to be small and frequent, ...


1

You might also wan't to consider a component based approach for your game. I can point you to these two articles on the subject: 1 - 2 If you search for "component based game architecture" or "entity component system" you should be able to find a lot more on the subject.


1

Shader programming is a highly specialised section of general Graphics Programming. Like any other highly specialised section of development, it depends on two factors; namely the Team-Size and the Goals you wish to achieve 1. Team Size: On smaller teams, having an entire resource (read: person) dedicated to ONLY shader programming might be a huge ...


1

Shader coding is a pretty specific skillset, however it is one that anybody who calls themselves a graphics programmer nowadays should be familiar with since writing shaders has become absolutely crucial to that profession. It's not quite as simple as just jumping in and integrating samples you can find online, because you need to make different shaders work ...


1

It should be either from the image file itself, or from a shader which rejects all perfectly white pixels, or something like that, but since the shader isn't the simplest thing to implement, I'll bet it's the image file. I'll also bet you made or found this image with a white background, then tried to delete that white to make the background transparent. ...



Only top voted, non community-wiki answers of a minimum length are eligible