How textures are managed in modern games ?

Started by
1 comment, last by idinev 14 years, 1 month ago
Hi all, I am currently developping a 3D engine, and I came to a hardware question : The GPU's memory is limited, and in nowadays games, developpers and graphists use a lot of different textures for each object. I wondered if these textures were all loaded at the beginning of the "level", or if some of them were loaded on-the-fly during camera moves. Not that I already reached my GPU limits, but if it could come with big levels... even if one uses DDS files. Do anyone know something about GPU memory management ?
Advertisement
Memory management is done automatically by the OpenGL driver. It doesn't matter how much gpu memory there is. On some systems, there isn't even any gpu memory. On some systems, there is no gpu and all rendering is done by the cpu, just like the old days.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
1GB texture data, all used in a frame with depth-prepass (overdraw minimization), drawing a spiced-up counter-strike:source level on a 256MB geforce8600: performance drops from 86fps down to 78fps.
That's how good gpus are :) .
(ofc, the PCIe doesn't/can't transfer 750-1024MB/frame; the gpu pulls just the smallest texture regions it needs - as if the texels were in a slightly slower VRAM).

This topic is closed to new replies.

Advertisement