Panda3D

Loading...
Searching...
No Matches
Public Member Functions | List of all members
TextureMemoryCounter Class Reference

This class is used to gather statistics on texture memory usage, etc. More...

`#include "textureMemoryCounter.h"`

## Public Member Functions
void | add_placement (TexturePlacement *placement)
| Adds the indicated TexturePlacement to the counter.
void | report (std::ostream &out, int indent_level)
| Reports the measured texture memory usage.
void | reset ()
| Resets the count to zero.

## Detailed Description

This class is used to gather statistics on texture memory usage, etc.

It adds up the total texture memory required by a number of image files, and reports it at the end.

Definition at line 33 of file textureMemoryCounter.h.

## Constructor & Destructor Documentation

## ◆ TextureMemoryCounter()

TextureMemoryCounter::TextureMemoryCounter | ( |  | ) |

Definition at line 27 of file textureMemoryCounter.cxx.

## Member Function Documentation

## ◆ add_placement()

void TextureMemoryCounter::add_placement | ( | TexturePlacement * | placement | ) |

Adds the indicated TexturePlacement to the counter.

Definition at line 53 of file textureMemoryCounter.cxx.

References TexturePlacement::get_dest(), TexturePlacement::get_image(), TexturePlacement::get_omit_reason(), TexturePlacement::get_placed_x_size(), TexturePlacement::get_placed_y_size(), and TexturePlacement::get_texture().

## ◆ report()

void TextureMemoryCounter::report | ( | std::ostream & | out,
|  | int | indent_level )

Reports the measured texture memory usage.

Definition at line 83 of file textureMemoryCounter.cxx.

References indent().

## ◆ reset()

void TextureMemoryCounter::reset | ( |  | ) |

Resets the count to zero.

Definition at line 35 of file textureMemoryCounter.cxx.

The documentation for this class was generated from the following files:

- pandatool/src/palettizer/textureMemoryCounter.h
- pandatool/src/palettizer/textureMemoryCounter.cxx