27#ifndef __GLTEXTUREMANAGER_H__
28#define __GLTEXTUREMANAGER_H__
30const wxEventType wxEVT_OCPN_COMPRESSIONTHREAD = wxNewEventType();
33class wxGenericProgressDialog;
54 wxEvtHandler *m_pMessageTarget;
64 void SetTicket(
JobTicket *ticket) { m_ticket = ticket; }
65 JobTicket *GetTicket(
void) {
return m_ticket; }
68 wxEvent *Clone()
const;
84 bool DoJob(
const wxRect &rect);
88 int level_min_request;
93 unsigned char *level0_bits;
94 unsigned char *comp_bits_array[10];
98 bool bpost_zip_compress;
100 unsigned char *compcomp_bits_array[10];
101 int compcomp_size_array[10];
102 bool b_inCompressAll;
106WX_DECLARE_STRING_HASH_MAP(
glTexFactory *, ChartPathHashTexfactType);
115 void OnTimer(wxTimerEvent &event);
116 bool ScheduleJob(
glTexFactory *client,
const wxRect &rect,
int level_min,
117 bool b_throttle_thread,
bool b_nolimit,
bool b_postZip,
120 int GetRunningJobCount() {
return running_list.GetCount(); }
121 int GetJobCount() {
return GetRunningJobCount() + todo_list.GetCount(); }
122 bool AsJob(wxString
const &chart_path)
const;
123 void PurgeJobList(wxString chart_path = wxEmptyString);
125 void ClearAllRasterTextures(
void);
126 bool PurgeChartTextures(
ChartBase *pc,
bool b_purge_factory =
false);
127 bool TextureCrunch(
double factor);
128 bool FactoryCrunch(
double factor);
129 void BuildCompressedCache();
134 ChartPathHashTexfactType m_chart_texfactory_hash;
141 JobList running_list;
149 wxGenericProgressDialog *m_progDialog;
152 ProgressInfoList progList;
160 wxString chart_path,
int level);
161int TextureDim(
int level);
162int TextureTileSize(
int level,
bool compressed);