Skyscraper 2.0
texturemanager.cpp
Go to the documentation of this file.
1/*
2 Skyscraper 2.0 Alpha - Texture Manager Dialog
3 Copyright (C)2003-2024 Ryan Thoryk
4 https://www.skyscrapersim.net
5 https://sourceforge.net/projects/skyscraper/
6 Contact - ryan@skyscrapersim.net
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21*/
22
23//(*InternalHeaders(TextureManager)
24#include <wx/intl.h>
25#include <wx/string.h>
26//*)
27#include "wx/stdpaths.h"
28
29#include "globals.h"
30#include "sbs.h"
31#include "texture.h"
32#include "debugpanel.h"
33#include "vm.h"
34#include "texturemanager.h"
35
36namespace Skyscraper {
37
38//(*IdInit(TextureManager)
39const wxWindowID TextureManager::ID_TextureList = wxNewId();
40const wxWindowID TextureManager::ID_STATICTEXT7 = wxNewId();
41const wxWindowID TextureManager::ID_tDependencies = wxNewId();
42const wxWindowID TextureManager::ID_STATICTEXT4 = wxNewId();
43const wxWindowID TextureManager::ID_tMaterial = wxNewId();
44const wxWindowID TextureManager::ID_STATICTEXT1 = wxNewId();
45const wxWindowID TextureManager::ID_tFilename = wxNewId();
46const wxWindowID TextureManager::ID_STATICTEXT8 = wxNewId();
47const wxWindowID TextureManager::ID_tWidth = wxNewId();
48const wxWindowID TextureManager::ID_STATICTEXT9 = wxNewId();
49const wxWindowID TextureManager::ID_tHeight = wxNewId();
50const wxWindowID TextureManager::ID_STATICTEXT11 = wxNewId();
51const wxWindowID TextureManager::ID_tAlpha = wxNewId();
52const wxWindowID TextureManager::ID_STATICTEXT12 = wxNewId();
53const wxWindowID TextureManager::ID_tMipMaps = wxNewId();
54const wxWindowID TextureManager::ID_STATICTEXT10 = wxNewId();
55const wxWindowID TextureManager::ID_tMemory = wxNewId();
56const wxWindowID TextureManager::ID_STATICTEXT5 = wxNewId();
57const wxWindowID TextureManager::ID_tWidthMult = wxNewId();
58const wxWindowID TextureManager::ID_STATICTEXT6 = wxNewId();
59const wxWindowID TextureManager::ID_tHeightMult = wxNewId();
60const wxWindowID TextureManager::ID_STATICTEXT2 = wxNewId();
61const wxWindowID TextureManager::ID_chkEnableForce = wxNewId();
62const wxWindowID TextureManager::ID_STATICTEXT3 = wxNewId();
63const wxWindowID TextureManager::ID_chkForceMode = wxNewId();
64const wxWindowID TextureManager::ID_bSave = wxNewId();
65const wxWindowID TextureManager::ID_bExport = wxNewId();
66const wxWindowID TextureManager::ID_bUnload = wxNewId();
67const wxWindowID TextureManager::ID_bmpMain = wxNewId();
68const wxWindowID TextureManager::ID_bOK = wxNewId();
69//*)
70
71BEGIN_EVENT_TABLE(TextureManager,wxDialog)
72 //(*EventTable(TextureManager)
73 //*)
74END_EVENT_TABLE()
75
77{
78 //(*Initialize(TextureManager)
79 wxBoxSizer* BoxSizer1;
80 wxBoxSizer* BoxSizer2;
81 wxFlexGridSizer* FlexGridSizer1;
82 wxFlexGridSizer* FlexGridSizer2;
83 wxFlexGridSizer* FlexGridSizer3;
84 wxFlexGridSizer* FlexGridSizer4;
85
86 Create(parent, wxID_ANY, _("Texture Manager"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("wxID_ANY"));
87 FlexGridSizer1 = new wxFlexGridSizer(0, 1, 0, 0);
88 FlexGridSizer3 = new wxFlexGridSizer(0, 2, 0, 0);
89 TextureList = new wxListBox(this, ID_TextureList, wxDefaultPosition, wxSize(200,600), 0, 0, wxVSCROLL, wxDefaultValidator, _T("ID_TextureList"));
90 FlexGridSizer3->Add(TextureList, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
91 FlexGridSizer2 = new wxFlexGridSizer(0, 1, 0, 0);
92 FlexGridSizer4 = new wxFlexGridSizer(0, 2, 0, 0);
93 StaticText7 = new wxStaticText(this, ID_STATICTEXT7, _("Dependencies:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT7"));
94 FlexGridSizer4->Add(StaticText7, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
95 tDependencies = new wxTextCtrl(this, ID_tDependencies, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTRE, wxDefaultValidator, _T("ID_tDependencies"));
96 FlexGridSizer4->Add(tDependencies, 1, wxALL|wxEXPAND, 5);
97 StaticText4 = new wxStaticText(this, ID_STATICTEXT4, _("Material:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT4"));
98 FlexGridSizer4->Add(StaticText4, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
99 tMaterial = new wxTextCtrl(this, ID_tMaterial, wxEmptyString, wxDefaultPosition, wxSize(200,-1), wxTE_READONLY|wxTE_CENTRE, wxDefaultValidator, _T("ID_tMaterial"));
100 FlexGridSizer4->Add(tMaterial, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
101 StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("Filename:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
102 FlexGridSizer4->Add(StaticText1, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
103 tFilename = new wxTextCtrl(this, ID_tFilename, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTRE, wxDefaultValidator, _T("ID_tFilename"));
104 FlexGridSizer4->Add(tFilename, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5);
105 StaticText8 = new wxStaticText(this, ID_STATICTEXT8, _("Width:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT8"));
106 FlexGridSizer4->Add(StaticText8, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
107 tWidth = new wxTextCtrl(this, ID_tWidth, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTRE, wxDefaultValidator, _T("ID_tWidth"));
108 FlexGridSizer4->Add(tWidth, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5);
109 StaticText9 = new wxStaticText(this, ID_STATICTEXT9, _("Height:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT9"));
110 FlexGridSizer4->Add(StaticText9, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
111 tHeight = new wxTextCtrl(this, ID_tHeight, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTRE, wxDefaultValidator, _T("ID_tHeight"));
112 FlexGridSizer4->Add(tHeight, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5);
113 StaticText11 = new wxStaticText(this, ID_STATICTEXT11, _("Has Alpha:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT11"));
114 FlexGridSizer4->Add(StaticText11, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
115 tAlpha = new wxTextCtrl(this, ID_tAlpha, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTRE, wxDefaultValidator, _T("ID_tAlpha"));
116 FlexGridSizer4->Add(tAlpha, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5);
117 StaticText12 = new wxStaticText(this, ID_STATICTEXT12, _("MipMaps:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT12"));
118 FlexGridSizer4->Add(StaticText12, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
119 tMipMaps = new wxTextCtrl(this, ID_tMipMaps, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTRE, wxDefaultValidator, _T("ID_tMipMaps"));
120 FlexGridSizer4->Add(tMipMaps, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5);
121 StaticText10 = new wxStaticText(this, ID_STATICTEXT10, _("Memory:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT10"));
122 FlexGridSizer4->Add(StaticText10, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
123 tMemory = new wxTextCtrl(this, ID_tMemory, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_CENTRE, wxDefaultValidator, _T("ID_tMemory"));
124 FlexGridSizer4->Add(tMemory, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5);
125 StaticText5 = new wxStaticText(this, ID_STATICTEXT5, _("WidthMult:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT5"));
126 FlexGridSizer4->Add(StaticText5, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
127 tWidthMult = new wxTextCtrl(this, ID_tWidthMult, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE, wxDefaultValidator, _T("ID_tWidthMult"));
128 FlexGridSizer4->Add(tWidthMult, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5);
129 StaticText6 = new wxStaticText(this, ID_STATICTEXT6, _("HeightMult:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT6"));
130 FlexGridSizer4->Add(StaticText6, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
131 tHeightMult = new wxTextCtrl(this, ID_tHeightMult, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE, wxDefaultValidator, _T("ID_tHeightMult"));
132 FlexGridSizer4->Add(tHeightMult, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5);
133 StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("Enable Force:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT2"));
134 FlexGridSizer4->Add(StaticText2, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
135 chkEnableForce = new wxCheckBox(this, ID_chkEnableForce, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_chkEnableForce"));
136 chkEnableForce->SetValue(false);
137 FlexGridSizer4->Add(chkEnableForce, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
138 StaticText3 = new wxStaticText(this, ID_STATICTEXT3, _("Force Mode:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT3"));
139 FlexGridSizer4->Add(StaticText3, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
140 chkForceMode = new wxCheckBox(this, ID_chkForceMode, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_chkForceMode"));
141 chkForceMode->SetValue(false);
142 FlexGridSizer4->Add(chkForceMode, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
143 FlexGridSizer2->Add(FlexGridSizer4, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
144 BoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
145 bSave = new wxButton(this, ID_bSave, _("Save"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_bSave"));
146 BoxSizer2->Add(bSave, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
147 bExport = new wxButton(this, ID_bExport, _("Export"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_bExport"));
148 BoxSizer2->Add(bExport, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
149 bUnload = new wxButton(this, ID_bUnload, _("Unload"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_bUnload"));
150 BoxSizer2->Add(bUnload, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
151 FlexGridSizer2->Add(BoxSizer2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
152 bmpMain = new wxStaticBitmap(this, ID_bmpMain, wxNullBitmap, wxDefaultPosition, wxSize(256,256), wxBORDER_SIMPLE, _T("ID_bmpMain"));
153 FlexGridSizer2->Add(bmpMain, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
154 FlexGridSizer3->Add(FlexGridSizer2, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
155 FlexGridSizer1->Add(FlexGridSizer3, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
156 BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
157 bOK = new wxButton(this, ID_bOK, _("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_bOK"));
158 BoxSizer1->Add(bOK, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
159 FlexGridSizer1->Add(BoxSizer1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
160 SetSizer(FlexGridSizer1);
161 FlexGridSizer1->SetSizeHints(this);
162 Center();
163
164 Connect(ID_TextureList, wxEVT_COMMAND_LISTBOX_SELECTED, (wxObjectEventFunction)&TextureManager::On_TextureList_Select);
165 Connect(ID_bSave, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&TextureManager::On_bSave_Click);
166 Connect(ID_bExport, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&TextureManager::On_bExport_Click);
167 Connect(ID_bUnload, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&TextureManager::On_bUnload_Click);
168 Connect(ID_bOK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&TextureManager::On_bOK_Click);
169 //*)
170
171 lastcount = 0;
172 Simcore = 0;
173 panel = parent;
174}
175
177{
178 //(*Destroy(TextureManager)
179 //*)
180}
181
183{
184 if (Simcore != panel->GetSystem())
185 {
186 //if active engine has changed, refresh values
188 lastcount = 0;
189 }
190
191 if (!Simcore)
192 return;
193
195
196 if (!manager)
197 return;
198
199 if (manager->GetTextureInfoCount() != lastcount)
200 {
201 lastcount = manager->GetTextureInfoCount();
202
203 //clear values
204 TextureList->Clear();
205 tMaterial->Clear();
206 tFilename->Clear();
207 chkEnableForce->SetValue(false);
208 chkForceMode->SetValue(false);
209 tHeightMult->Clear();
210 tWidthMult->Clear();
211 tDependencies->Clear();
212 tWidth->Clear();
213 tHeight->Clear();
214 tAlpha->Clear();
215 tMipMaps->Clear();
216 tMemory->Clear();
217
218 for (int i = 0; i < manager->GetTextureInfoCount(); i++)
219 {
221 if (manager->GetTextureInfo(i, info))
222 TextureList->Append(SBS::ToString(i + 1) + wxT(" - ") + info.name);
223 }
224 }
225}
226
227void TextureManager::On_bUnload_Click(wxCommandEvent& event)
228{
229 int selection = TextureList->GetSelection();
230 if (selection < 0)
231 return;
232
234 Simcore->GetTextureManager()->GetTextureInfo(selection, texture);
235
236 if (texture.name != "" && texture.name != "Default")
237 {
238 //don't unload texture if submeshes are using it
239 if (texture.dependencies > 0)
240 return;
241
242 bool result = Simcore->GetTextureManager()->UnloadMaterial(texture.name, "General");
243 if (result == true)
245 }
246}
247
248void TextureManager::On_bOK_Click(wxCommandEvent& event)
249{
250 this->Close();
251}
252
253void TextureManager::On_TextureList_Select(wxCommandEvent& event)
254{
255 int selection = TextureList->GetSelection();
256 if (selection < 0)
257 return;
258
260 Simcore->GetTextureManager()->GetTextureInfo(selection, texture);
261
262 if (texture.name != "")
263 {
264 tMaterial->SetValue(texture.material_name);
265 tFilename->SetValue(texture.filename);
266 tWidthMult->SetValue(SBS::TruncateNumber(texture.widthmult, 2));
267 tHeightMult->SetValue(SBS::TruncateNumber(texture.heightmult, 2));
268 chkEnableForce->SetValue(texture.enable_force);
269 chkForceMode->SetValue(texture.force_mode);
270 tDependencies->SetValue(SBS::ToString(texture.dependencies));
271
272 std::string name = GetTextureName(texture.name);
273
274 if (name.empty())
275 return;
276
277 //get raw texture
278 Ogre::TexturePtr tex = Ogre::TextureManager::getSingleton().getByName(name, "General");
279 if (tex)
280 {
281 tWidth->SetValue(SBS::ToString((int)tex->getWidth()));
282 tHeight->SetValue(SBS::ToString((int)tex->getHeight()));
283 if (tex->getNumMipmaps() == Ogre::MIP_UNLIMITED)
284 tMipMaps->SetValue("Unlimited");
285 else
286 tMipMaps->SetValue(SBS::ToString((int)tex->getNumMipmaps()));
287 tMemory->SetValue(SBS::ToString((int)tex->getSize()));
288
289 if (tex->hasAlpha() == true)
290 tAlpha->SetValue("true");
291 else
292 tAlpha->SetValue("false");
293
294 wxString path = wxStandardPaths::Get().GetDataDir();
295 wxImage image;
296 if (texture.filename != "")
297 image.LoadFile(panel->GetRoot()->data_path + texture.filename);
298 else
299 {
300 bool result = Simcore->GetTextureManager()->GetTextureImage(tex);
301 if (result)
302 image.LoadFile("temp.jpg");
303 }
304 bmpMain->SetBitmap(image);
305 bmpMain->SetSize(256, 256);
306 bmpMain->SetScaleMode(wxStaticBitmap::ScaleMode::Scale_AspectFit);
307 }
308 }
309}
310
311void TextureManager::On_bSave_Click(wxCommandEvent& event)
312{
313 int selection = TextureList->GetSelection();
314 if (selection < 0)
315 return;
316
318 Simcore->GetTextureManager()->GetTextureInfo(selection, texture);
319
320 if (texture.name != "")
321 {
322 texture.widthmult = atof(tWidthMult->GetValue());
323 texture.heightmult = atof(tHeightMult->GetValue());
324 texture.enable_force = chkEnableForce->GetValue();
325 texture.force_mode = chkForceMode->GetValue();
326
327 Simcore->GetTextureManager()->SetTextureInfo(selection, texture);
328 }
329}
330
331void TextureManager::On_bExport_Click(wxCommandEvent& event)
332{
333 int selection = TextureList->GetSelection();
334 if (selection < 0)
335 return;
336
338 Simcore->GetTextureManager()->GetTextureInfo(selection, texture);
339
340 if (texture.name != "")
341 {
342 std::string name = GetTextureName(texture.name);
343
344 if (name.empty())
345 return;
346
347 //get raw texture
348 Ogre::TexturePtr tex = Ogre::TextureManager::getSingleton().getByName(name, "General");
349 if (tex)
350 Simcore->GetTextureManager()->SaveTexture(tex, "texture.png");
351 }
352}
353
354std::string TextureManager::GetTextureName(const std::string &material)
355{
356 if (material != "")
357 {
358 //get material
359 Ogre::MaterialPtr mat = Simcore->GetTextureManager()->GetMaterialByName(material);
360
361 Ogre::TextureUnitState *state = 0;
362 std::string name;
363 if (mat)
364 state = mat->getTechnique(0)->getPass(0)->getTextureUnitState(0);
365 if (state)
366 return state->getTextureName();
367 }
368
369 return "";
370}
371
372}
TextureManager * GetTextureManager()
Definition sbs.cpp:4588
bool UnloadMaterial(const std::string &name, const std::string &group)
Definition texture.cpp:359
bool GetTextureImage(Ogre::TexturePtr texture)
Definition texture.cpp:2069
void SaveTexture(Ogre::TexturePtr texture, const std::string &filename)
Definition texture.cpp:2060
bool SetTextureInfo(int index, TextureInfo &info)
Definition texture.cpp:1637
bool GetTextureInfo(int index, TextureInfo &info)
Definition texture.cpp:1626
bool UnregisterTextureInfo(std::string name, std::string material_name="")
Definition texture.cpp:328
Ogre::MaterialPtr GetMaterialByName(const std::string &name, const std::string &group="General")
Definition texture.cpp:2224
SBS::SBS * GetSystem()
Definition debugpanel.h:131
static const wxWindowID ID_STATICTEXT4
static const wxWindowID ID_STATICTEXT10
static const wxWindowID ID_STATICTEXT11
static const wxWindowID ID_tDependencies
static const wxWindowID ID_tFilename
static const wxWindowID ID_tHeightMult
static const wxWindowID ID_tMaterial
static const wxWindowID ID_bmpMain
static const wxWindowID ID_tWidth
static const wxWindowID ID_chkEnableForce
static const wxWindowID ID_STATICTEXT2
void On_bExport_Click(wxCommandEvent &event)
void On_TextureList_Select(wxCommandEvent &event)
static const wxWindowID ID_tWidthMult
static const wxWindowID ID_STATICTEXT6
static const wxWindowID ID_tMipMaps
static const wxWindowID ID_STATICTEXT12
static const wxWindowID ID_tHeight
void On_bUnload_Click(wxCommandEvent &event)
static const wxWindowID ID_bSave
void On_bSave_Click(wxCommandEvent &event)
static const wxWindowID ID_tAlpha
static const wxWindowID ID_bExport
static const wxWindowID ID_chkForceMode
static const wxWindowID ID_bUnload
static const wxWindowID ID_bOK
std::string GetTextureName(const std::string &material)
static const wxWindowID ID_STATICTEXT9
static const wxWindowID ID_STATICTEXT5
static const wxWindowID ID_STATICTEXT1
static const wxWindowID ID_STATICTEXT7
static const wxWindowID ID_STATICTEXT8
static const wxWindowID ID_tMemory
void On_bOK_Click(wxCommandEvent &event)
static const wxWindowID ID_TextureList
static const wxWindowID ID_STATICTEXT3
std::string data_path
Definition vm.h:139
std::string TruncateNumber(float value, int decimals)
Definition globals.cpp:416
std::string ToString(int number)
Definition globals.cpp:279