MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / d3d_PreUploadTextureToCard

Function d3d_PreUploadTextureToCard

legacy/renderer/Direct3D.cpp:3038–3052  ·  view source on GitHub ↗

Creates a on the video card if needed

Source from the content-addressed store, hash-verified

3036
3037// Creates a on the video card if needed
3038void d3d_PreUploadTextureToCard(int handle, int map_type) {
3039 if (map_type == MAP_TYPE_BITMAP) {
3040 if (GameBitmaps[handle].cache_slot == -1) {
3041 d3d_CreateTextureFromBitmap(handle, map_type);
3042 }
3043 } else if (map_type == MAP_TYPE_BUMPMAP) {
3044 if (GameBumpmaps[handle].cache_slot == -1) {
3045 d3d_CreateTextureFromBitmap(handle, map_type);
3046 }
3047 } else {
3048 if (GameLightmaps[handle].cache_slot == -1) {
3049 d3d_CreateTextureFromBitmap(handle, map_type);
3050 }
3051 }
3052}
3053
3054// Evicts local texture memory
3055void d3d_FreePreUploadedTexture(int handle, int map_type) {

Callers 1

Calls 1

Tested by

no test coverage detected