New answers tagged

1

Most game engines will have a layer between their rendering abstraction and the actual rendering API. In Unreal and Qt this is called the Rendering Hardware Interface, or RHI. I'm not sure if the others use the same terminology. Typically the rendering engine will make high level calls to the rendering abstractions, and it will be the job of the various ...


1

You're out of luck. There is nothing wrong in your code, and there's nothing you can do in your code to guarantee any set of arbitrary lines will always meet perfectly by using the technique you are using. For line rasterization, OpenGL uses the diamond exit line rasterization rule (there is a primer of rasterization rules on the Direct3D documentation), ...


2

Using more meshes with fewer polygons per mesh can improve performance when it allows the renderer to cull more objects. Culling refers to skipping objects during the render process, which improves performance. There are two main reasons why an object might get culled: View-frustum culling: Objects that are entirely outside the field of view of the camera ...


1

Lets say initiating a draw call takes 1 millisecond. Now lets say that it takes 10 milliseconds to draw 100 polygons. A single call to draw 100 polygons costs 11 milliseconds 11ms * 1000 = 11 seconds. For 100k polygons: 100,000 / 100 = 1000 * 10ms = 10 seconds. Add on the 1ms for initiating the draw call = 10.001 seconds. Drawing the 100k polygons once ...


4

There are two main components to the time it takes to process a draw call: The time it takes to calculate all the results for every work item in the batch The time it takes to upload info / switch states / ready the GPU to start working on it As GPUs have gotten more powerful, most of the leaps and bounds have helped with point 1. They can now run hundreds ...


1

I think this is more an opinion-based question but here are my thought (I'm not a C++ expert): Create a base class Tile that will handle generic stuff like rendering, animations if any, behavior of the tile... For each of your special tiles, create a new class that inherits from your base class Tile and override the behavior if your new tile has a custom ...


Top 50 recent answers are included