• R/O
  • SSH
  • HTTPS

gdx64: Commit


Commit MetaInfo

Revision270 (tree)
Time2020-01-16 05:12:47
Authorhgtterry

Log Message

Basic Shapes 1.9 Shell 150120

Change Summary

Incremental Difference

--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_Grid.cpp (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_Grid.cpp (revision 270)
@@ -236,8 +236,6 @@
236236 HairNode->setPosition(0, 0, 0);
237237 HairNode->resetOrientation();
238238
239- App->Cl19_Ogre->ModelNode->resetOrientation();
240-
241239 App->Cl19_Ogre->mCamera->setPosition(Ogre::Vector3(0, 20, 50));
242240 App->Cl19_Ogre->mCamera->lookAt(Ogre::Vector3(0, 0, 0));
243241
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_Ogre.cpp (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_Ogre.cpp (revision 270)
@@ -33,11 +33,7 @@
3333 mSceneMgr = nullptr;
3434 mCamera = nullptr;
3535 OgreListener = nullptr;
36- ModelNode = nullptr;
37-
38- ModelEntity = nullptr;
39- ModelNode = nullptr;
40-
36+
4137 OgreModel_Ent = nullptr;;
4238 OgreModel_Node =nullptr;;
4339
@@ -65,9 +61,9 @@
6561 App->Cl_Grid->Grid_Update(1);
6662 App->Cl_Grid->Hair_Update(1);
6763
68- ModelEntity = mSceneMgr->createEntity("Sinbad.mesh");
64+ /*ModelEntity = mSceneMgr->createEntity("Sinbad.mesh");
6965 ModelNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
70- ModelNode->attachObject(ModelEntity);
66+ ModelNode->attachObject(ModelEntity);*/
7167
7268 m_imgui.Init(mSceneMgr, RenderHwnd);
7369
@@ -284,9 +280,17 @@
284280 bool GD19_Ogre::Configure(void)
285281 {
286282
287- Ogre::RenderSystem* rs = mRoot->getRenderSystemByName("Direct3D9 Rendering Subsystem");
288- if (!(rs->getName() == "Direct3D9 Rendering Subsystem"))
283+ //Ogre::RenderSystem* rs = mRoot->getRenderSystemByName("Direct3D9 Rendering Subsystem");
284+ //if (!(rs->getName() == "Direct3D9 Rendering Subsystem"))
285+ //{
286+ // App->Say("No D3D9");
287+ // return false; //No RenderSystem found
288+ //}
289+
290+ Ogre::RenderSystem* rs = mRoot->getRenderSystemByName("OpenGL Rendering Subsystem");
291+ if (!(rs->getName() == "OpenGL Rendering Subsystem"))
289292 {
293+ App->Say("No GL");
290294 return false; //No RenderSystem found
291295 }
292296
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_Ogre.h (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_Ogre.h (revision 270)
@@ -57,9 +57,6 @@
5757 Ogre::SceneManager* mSceneMgr;
5858 Ogre::Camera* mCamera;
5959
60- Entity* ModelEntity;
61- SceneNode* ModelNode;
62-
6360 Entity* OgreModel_Ent;
6461 SceneNode* OgreModel_Node;
6562
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_OgreListener.cpp (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD19_OgreListener.cpp (revision 270)
@@ -222,7 +222,7 @@
222222 Pl_DeltaMouse = float(Pl_Cent500X - Pl_MouseX);
223223 App->Cl_Grid->GridNode->yaw(Ogre::Degree(-Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_LOCAL);
224224 App->Cl_Grid->HairNode->yaw(Ogre::Degree(-Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_LOCAL);
225- App->Cl19_Ogre->ModelNode->yaw(Ogre::Degree(-Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_LOCAL);
225+ //App->Cl19_Ogre->ModelNode->yaw(Ogre::Degree(-Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_LOCAL);
226226
227227 if (App->Cl19_Ogre->OgreModel_Node)
228228 {
@@ -241,7 +241,7 @@
241241 Pl_DeltaMouse = float(Pl_MouseX - Pl_Cent500X);
242242 App->Cl_Grid->GridNode->yaw(Ogre::Degree(Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_LOCAL);
243243 App->Cl_Grid->HairNode->yaw(Ogre::Degree(Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_LOCAL);
244- App->Cl19_Ogre->ModelNode->yaw(Ogre::Degree(Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_LOCAL);
244+ //App->Cl19_Ogre->ModelNode->yaw(Ogre::Degree(Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_LOCAL);
245245
246246 if (App->Cl19_Ogre->OgreModel_Node)
247247 {
@@ -262,7 +262,7 @@
262262 Pl_DeltaMouse = float(Pl_Cent500Y - Pl_MouseY);
263263 App->Cl_Grid->GridNode->pitch(Ogre::Degree(-Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_PARENT);
264264 App->Cl_Grid->HairNode->pitch(Ogre::Degree(-Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_PARENT);
265- App->Cl19_Ogre->ModelNode->pitch(Ogre::Degree(-Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_PARENT);
265+ // App->Cl19_Ogre->ModelNode->pitch(Ogre::Degree(-Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_PARENT);
266266
267267 if (App->Cl19_Ogre->OgreModel_Node)
268268 {
@@ -281,7 +281,7 @@
281281 Pl_DeltaMouse = float(Pl_MouseY - Pl_Cent500Y);
282282 App->Cl_Grid->GridNode->pitch(Ogre::Degree(Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_PARENT);
283283 App->Cl_Grid->HairNode->pitch(Ogre::Degree(Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_PARENT);
284- App->Cl19_Ogre->ModelNode->pitch(Ogre::Degree(Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_PARENT);
284+ // App->Cl19_Ogre->ModelNode->pitch(Ogre::Degree(Pl_DeltaMouse * (mMoveSensitivityMouse / 1000) * 2), Ogre::Node::TS_PARENT);
285285
286286 if (App->Cl19_Ogre->OgreModel_Node)
287287 {
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Export_Ogre3D.cpp (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Export_Ogre3D.cpp (revision 270)
@@ -171,19 +171,19 @@
171171 strcat(mOgreScriptFileName,".material");
172172 strcat(mOgreSkellFileName,".skeleton");
173173
174-// if (mDoExportTextures == 1 && App->S_Counters[0]->TextureCount > 0)
175-// {
174+ //if (mDoExportTextures == 1 && App->S_Counters[0]->TextureCount > 0)
175+ {
176176 DecompileTextures();
177-// }
177+ }
178178 // if (mDoExportMesh == 1)
179-// {
179+ {
180180 CreateMeshFile(mOgreMeshFileName);
181-// }
181+ }
182182
183183 // if (mDoCreateMaterialFile == 1 && App->S_Counters[0]->TextureCount > 0)
184-// {
184+ {
185185 CreateMaterialFile(mOgreScriptFileName);
186-// }
186+ }
187187
188188 return 1;
189189 }
@@ -226,35 +226,35 @@
226226 int Loop=0;
227227 while (Loop<MatCount)
228228 {
229- /*strcpy(FileName,App->Cl_Model->S_MeshGroup[Loop]->Text_FileName);
229+ strcpy(FileName,App->Cl_Model->S_MeshGroup[Loop]->Text_FileName);
230230
231231 HBITMAP Data;
232232
233233 Data = App->Cl_Model->S_MeshGroup[Loop]->Base_Bitmap;
234234
235- if (stricmp(FileName+strlen(FileName)-4,".tga") == 0)
235+ if (_stricmp(FileName+strlen(FileName)-4,".tga") == 0)
236236 {
237237 int Len=strlen(FileName);
238238 FileName[Len-4]=0;
239239 strcat(FileName,".jpg");
240240
241- App->CL_Textures->HBITMAP_TO_BmpFile(Data,FileName,"");
242- App->CL_Textures->Jpg_To_Tga24(FileName);
241+ App->Cl_Textures->HBITMAP_TO_BmpFile(Data,FileName,"");
242+ App->Cl_Textures->Jpg_To_Tga24(FileName);
243243 }
244- else if (stricmp(FileName+strlen(FileName)-4,".png") == 0)
244+ else if (_stricmp(FileName+strlen(FileName)-4,".png") == 0)
245245 {
246246 int Len=strlen(FileName);
247247 FileName[Len-4]=0;
248248 strcat(FileName,".jpg");
249249
250- App->CL_Textures->HBITMAP_TO_BmpFile(Data,FileName,"");
251- App->CL_Textures->Jpg_To_png24(FileName);
250+ App->Cl_Textures->HBITMAP_TO_BmpFile(Data,FileName,"");
251+ App->Cl_Textures->Jpg_To_png24(FileName);
252252 }
253253 else
254254 {
255255
256- App->CL_Textures->HBITMAP_TO_BmpFile(Data,FileName,"");
257- }*/
256+ App->Cl_Textures->HBITMAP_TO_BmpFile(Data,FileName,"");
257+ }
258258
259259 Loop++;
260260 }
@@ -302,8 +302,6 @@
302302 strcat(MatName,"_Material_");
303303 strcat(MatName,MaterialNumber);
304304
305- /*char MatName[255];
306- strcpy(MatName,App->S_MeshGroup[i]->MatName);*/
307305 ogreSubMesh->setMaterialName(MatName);
308306 }
309307 //------------------------------------------
@@ -437,14 +435,13 @@
437435 // *************************************************************************
438436 void GD_Export_Ogre3D::CreateMaterialFile(char* MatFileName)
439437 {
440- Ogre::MaterialManager *matMgrSgl;
438+ Ogre::MaterialManager* matMgrSgl = Ogre::MaterialManager::getSingletonPtr();
441439
442- matMgrSgl = new Ogre::MaterialManager();
443440 matMgrSgl->initialise();
444441
445442 char MatName[255];
446443 char File[255];
447-// char FileName[255];
444+
448445 char MaterialNumber[255];
449446
450447 Ogre::String OMatFileName = MatFileName;
@@ -453,10 +450,6 @@
453450
454451 int numMaterials = App->Cl_Model->TextureCount;
455452
456- /*char Temp[255];
457- itoa(numMaterials,Temp,10);
458- App->WinMessage(Temp);*/
459-
460453 Ogre::MaterialSerializer matSer;
461454
462455 for (int i = 0; i < numMaterials; ++i)
@@ -466,8 +459,6 @@
466459 strcat(MatName,"_Material_");
467460 strcat(MatName,MaterialNumber);
468461
469-
470- //strcpy(MatName,App->S_MeshGroup[i]->mTextureName);
471462 strcpy(File,App->Cl_Model->S_MeshGroup[i]->Text_FileName);
472463
473464 OMatName = MatName;
@@ -476,17 +467,11 @@
476467 Ogre::MaterialPtr ogremat = matMgrSgl->create(OMatName,
477468 Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
478469
479- //ogremat->setAmbient(msVec4ToColourValue(mat->Ambient));
480- //ogremat->setDiffuse(msVec4ToColourValue(mat->Diffuse));
481- //ogremat->setSpecular(msVec4ToColourValue(mat->Specular));
482- //ogremat->setShininess(mat->fShininess);
483-
484470 if (0 < strlen(File))
471+ {
485472 ogremat->getTechnique(0)->getPass(0)->createTextureUnitState(File);
473+ }
486474
487- /* if (0 < strlen(mat->szAlphaTexture))
488- ogremat->getTechnique(0)->getPass(0)->createTextureUnitState(mat->szAlphaTexture);*/
489-
490475 matSer.queueForExport(ogremat);
491476 }
492477
@@ -499,11 +484,12 @@
499484 // *************************************************************************
500485 void GD_Export_Ogre3D::CreateMaterialFile_Ogre(char* MatFileName)
501486 {
502- Ogre::MaterialManager *matMgrSgl;
487+
488+ Ogre::MaterialManager* matMgrSgl = Ogre::MaterialManager::getSingletonPtr();
489+ // matMgrSgl->initialise();
503490
504- matMgrSgl = new Ogre::MaterialManager();
505- matMgrSgl->initialise();
506491
492+
507493 char MatName[255];
508494 char File[255];
509495 // char FileName[255];
@@ -519,32 +505,31 @@
519505
520506 for (int i = 0; i < numMaterials; ++i)
521507 {
522- Ogre::SubMesh const *subMesh = Cloned_Ent->getSubEntity(i)->getSubMesh();
523- strcpy(MatName,subMesh->getMaterialName().c_str());
508+ //Ogre::SubMesh const *subMesh = Cloned_Ent->getSubEntity(i)->getSubMesh();
509+ //strcpy(MatName,subMesh->getMaterialName().c_str());
524510
525511 strcpy(File,App->Cl_Model->S_MeshGroup[i]->Text_FileName);
526512
527- OMatName = MatName;
513+ OMatName = App->Cl_Model->S_MeshGroup[i]->MaterialName;
528514 OFile = File;
529515
530- Ogre::MaterialPtr ogremat = matMgrSgl->create(OMatName,
531- Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
516+ /*Ogre::MaterialPtr ogremat = Ogre::MaterialManager::getSingleton().create(
517+ "OMatName",
518+ Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);*/
532519
533- /*ogremat->setAmbient(msVec4ToColourValue(ogremat->Ambient));
534- ogremat->setDiffuse(msVec4ToColourValue(ogremat->Diffuse));
535- ogremat->setSpecular(msVec4ToColourValue(ogremat->Specular));
536- ogremat->setShininess(mat->fShininess);*/
520+
537521
538- if (0 < strlen(File))
539- ogremat->getTechnique(0)->getPass(0)->createTextureUnitState(File);
522+ // if (0 < strlen(File))
523+ // ogremat->getTechnique(0)->getPass(0)->createTextureUnitState(File);
540524
541525 /* if (0 < strlen(mat->szAlphaTexture))
542526 ogremat->getTechnique(0)->getPass(0)->createTextureUnitState(mat->szAlphaTexture);*/
543527
544- matSer.queueForExport(ogremat);
528+ //matSer.queueForExport(ogremat);
545529 }
546530
547- matSer.exportQueued(OMatFileName);
531+ //matSer.exportQueued(OMatFileName);
532+
548533 }
549534
550535 // *************************************************************************
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_FileIO.cpp (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_FileIO.cpp (revision 270)
@@ -227,49 +227,51 @@
227227 // *************************************************************************
228228 int __stdcall GD_FileIO::BrowseCallbackProc(HWND hwnd,UINT uMsg,LPARAM lParam,LPARAM lpData)
229229 {
230- ////Initialization callback message
231- //if(uMsg==BFFM_INITIALIZED)
232- //{
233- // //SendMessage(hWnd, BFFM_SETSELECTION, 1, (LPARAM) szInitialPathName);
234- // SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData);
230+ //Initialization callback message
231+ if(uMsg==BFFM_INITIALIZED)
232+ {
233+ //SendMessage(hWnd, BFFM_SETSELECTION, 1, (LPARAM) szInitialPathName);
234+ SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData);
235235
236- //}
236+ }
237237
238- ////Selection change message - store the selected directory
239- //if(uMsg==BFFM_SELCHANGED)
240- //{
241- // TCHAR szDir[MAX_PATH*2] = { 0 };
238+ //Selection change message - store the selected directory
239+ if(uMsg==BFFM_SELCHANGED)
240+ {
241+ TCHAR szDir[MAX_PATH*2] = { 0 };
242242
243- // // fail if non-filesystem
244- // BOOL bRet = SHGetPathFromIDList((LPITEMIDLIST) lParam, szDir);
245- // if (bRet)
246- // {
247- // //If the folder cannot be "read" then fail
248- // if (_taccess(szDir, 00) != 0)
249- // {
250- // bRet = FALSE;
251- // }
252- // else
253- // {
254- // SHFILEINFO sfi;
255- // ::SHGetFileInfo((LPCTSTR)lParam, 0, &sfi, sizeof(sfi),
256- // SHGFI_PIDL | SHGFI_ATTRIBUTES);
243+ // fail if non-filesystem
244+ BOOL bRet = SHGetPathFromIDList((LPITEMIDLIST) lParam, szDir);
245+ if (bRet)
246+ {
247+ //If the folder cannot be "read" then fail
248+ if (_taccess(szDir, 00) != 0)
249+ {
250+ bRet = FALSE;
251+ }
252+ else
253+ {
254+ SHFILEINFO sfi;
255+ ::SHGetFileInfo((LPCTSTR)lParam, 0, &sfi, sizeof(sfi),
256+ SHGFI_PIDL | SHGFI_ATTRIBUTES);
257257
258- // // fail if pidl is a link
259- // if (sfi.dwAttributes & SFGAO_LINK)
260- // bRet = FALSE;
261- // }
262- // }
258+ // fail if pidl is a link
259+ if (sfi.dwAttributes & SFGAO_LINK)
260+ bRet = FALSE;
261+ }
262+ }
263263
264- // // if invalid selection, disable the OK button
265- // if (!bRet)
266- // {
267- // ::EnableWindow(GetDlgItem(hwnd, IDOK), FALSE);
268- // /// strcpy(App->CL_FileIO->szSelectedDir,"");
269- // }
270- // else
271- // /// strcpy(App->CL_FileIO->szSelectedDir, szDir);
272- // }
264+ // if invalid selection, disable the OK button
265+ if (!bRet)
266+ {
267+ ::EnableWindow(GetDlgItem(hwnd, IDOK), FALSE);
268+ strcpy(App->Cl_FileIO->szSelectedDir,"");
269+ }
270+ else
271+ {
272+ strcpy(App->Cl_FileIO->szSelectedDir, szDir);
273+ }
274+ }
273275
274276 return 0;
275277 }
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Importer.cpp (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Importer.cpp (revision 270)
@@ -225,7 +225,7 @@
225225 bool Test = App->Cl_Assimp->LoadFile(App->Cl_FileIO->Model_FileName);
226226 if (Test == 0)
227227 {
228- //App->CL_Dialogs->PleaseWaitEnd();
228+ App->Say("Failed to Load Assimp");
229229 return 0;
230230 }
231231
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Textures.cpp (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Textures.cpp (revision 270)
@@ -25,7 +25,58 @@
2525 {
2626 }
2727
28+
2829 // *************************************************************************
30+// * Jpg_To_Tga *
31+// *************************************************************************
32+bool GD_Textures::Jpg_To_Tga24(char* File)
33+{
34+ char OldFile[1024];
35+ strcpy(OldFile, File);
36+
37+ ilLoadImage(File);
38+
39+ int Len = strlen(File);
40+ File[Len - 4] = 0;
41+ strcat(File, ".tga");
42+
43+ ilSaveImage(File);
44+
45+ remove(OldFile);
46+ return 1;
47+}
48+
49+// *************************************************************************
50+// * Jpg_To_png24 *
51+// *************************************************************************
52+bool GD_Textures::Jpg_To_png24(char* File)
53+{
54+ char OldFile[1024];
55+ strcpy(OldFile, File);
56+
57+ ilLoadImage(File);
58+
59+ int Len = strlen(File);
60+ File[Len - 4] = 0;
61+ strcat(File, ".png");
62+
63+ ilSaveImage(File);
64+
65+ remove(OldFile);
66+ return 1;
67+}
68+
69+// *************************************************************************
70+// * HBITMAP_TO_BmpFile *
71+// *************************************************************************
72+bool GD_Textures::HBITMAP_TO_BmpFile(HBITMAP Bitmap, char* Filename, char* SaveFolder)
73+{
74+ ilutWinSaveImage(Filename, Bitmap);
75+
76+ return 1;
77+}
78+
79+// *************************************************************************
2980 // * TexureToWinPreviewFullPath *
3081 // *************************************************************************
3182 bool GD_Textures::TexureToWinPreviewFullPath(int Index, char* FullPath)
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Textures.h (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_Textures.h (revision 270)
@@ -5,6 +5,9 @@
55 GD_Textures();
66 ~GD_Textures();
77
8+ bool Jpg_To_Tga24(char* File);
9+ bool Jpg_To_png24(char* File);
10+ bool HBITMAP_TO_BmpFile(HBITMAP Bitmap, char* Filename, char* SaveFolder);
811 bool TexureToWinPreviewFullPath(int Index, char* FullPath);
912 bool Texture_To_Bmp(char* File);
1013 bool CreateDummyTexture(void);
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_ToOgre.cpp (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_ToOgre.cpp (revision 270)
@@ -20,7 +20,7 @@
2020 // *************************************************************************
2121 void GD_ToOgre::Init_Model(void)
2222 {
23- Create_Meterials();
23+ Create_ResourceGroup();
2424 CreateMeshFile();
2525
2626 /*App->Cl_Model->ItsAnOgreModel = 1;
@@ -64,8 +64,6 @@
6464 strcat(MatName, "_Material_");
6565 strcat(MatName, MaterialNumber);
6666
67- /*char MatName[255];
68- strcpy(MatName,App->S_MeshGroup[i]->MatName);*/
6967 Ogre::MaterialPtr material = Ogre::MaterialManager::getSingleton().create(MatName, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
7068 material->getTechnique(0)->getPass(0)->createTextureUnitState(App->Cl_Model->S_MeshGroup[i]->Text_FileName);
7169
@@ -338,14 +336,19 @@
338336 }
339337
340338 // *************************************************************************
341-// * Create_Meterials *
339+// * Create_ResourceGroup *
342340 // *************************************************************************
343-bool GD_ToOgre::Create_Meterials()
341+bool GD_ToOgre::Create_ResourceGroup()
344342 {
343+ Ogre::ResourceGroupManager::getSingleton().destroyResourceGroup(App->Cl19_Ogre->TempResourceGroup);
344+ Ogre::ResourceGroupManager::getSingleton().createResourceGroup(App->Cl19_Ogre->TempResourceGroup);
345+
345346 Ogre::ResourceGroupManager::getSingleton().addResourceLocation(App->Cl_Model->Texture_FolderPath,
346347 "FileSystem",
347- App->Cl19_Ogre->PermResourceGroup);
348+ App->Cl19_Ogre->TempResourceGroup);
348349
350+ Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
351+
349352 return 1;
350353 //-------------------------------------------------------------------------
351354 char MatName[255];
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_ToOgre.h (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/GD_ToOgre.h (revision 270)
@@ -10,7 +10,7 @@
1010 bool Create_Skeleton(Ogre::MeshPtr& mesh);
1111 void Add_TestMotion(void);
1212
13- bool Create_Meterials();
13+ bool Create_ResourceGroup();
1414
1515 Ogre::MeshPtr ogreMesh;
1616
--- Basic_Shapes/Ogre_Basic/Ogre_Basic/Ogre_Basic.cpp (revision 269)
+++ Basic_Shapes/Ogre_Basic/Ogre_Basic/Ogre_Basic.cpp (revision 270)
@@ -173,7 +173,7 @@
173173 }
174174 return 1;
175175 }
176- // ---------------------------- Menu Import
176+ // ---------------------------- Menu File Import
177177 case ID_IMPORT_WAVEFRONTOBJ:
178178 {
179179 App->Cl_Importer->Assimp_Loader("Wavefront OBJ *.obj\0*.obj\0", "Wavefront OBJ");
@@ -185,6 +185,13 @@
185185 App->Cl_Importer->Assimp_Loader("Autodesk 3DS *.3ds\0*.3ds\0", "Autodesk 3DS");
186186 return 1;
187187 }
188+ // ---------------------------- Menu File Export
189+ case ID_OGRE3D_MESH:
190+ {
191+ App->Cl_Exporter->Ogre3D_Model();
192+ App->Say("Here");
193+ return 1;
194+ }
188195
189196 // ---------------------------- Menu View
190197 case ID_VIEW_RESET:
--- GD_Shell2/Shell2/Shell2/GD_Scene_Data.cpp (revision 269)
+++ GD_Shell2/Shell2/Shell2/GD_Scene_Data.cpp (revision 270)
@@ -548,23 +548,22 @@
548548
549549 App->Ogre17->PhysicsFrameListener->GD_Run_Physics = 1;
550550
551-
552551 App->GDCL_Scene_Data->S_LoadOptions[0]->Has_Objects = 1;
553552 App->GDCL_Scene_Data->S_LoadOptions[0]->Has_Player = 1;
554553
555554 App->GDCL_Scene_Data->SceneLoaded = 1;
556555
557- App->GDCL_Scene_Data->ObjectCount++; // Must be last line
556+ //App->GDCL_Scene_Data->ObjectCount++; // Must be last line
558557
559558
560- App->GDCL_Add_Objects->Add_Stock_Message();
559+ ///App->GDCL_Add_Objects->Add_Stock_Message();
561560
562561 Read_LoadLevel(); // Get Scene File Name From External File
563-
562+
564563 char FileName[255];
565564 char ParhFile[255];
566565 strcpy(FileName,First_SceneFile);
567-
566+
568567 strcpy(ParhFile,App->EquityDirecory_FullPath);
569568 strcat(ParhFile,"\\");
570569 strcat(ParhFile,"Media\\Levels\\");
@@ -572,7 +571,7 @@
572571
573572 strcpy(App->CL10_Load_Scene->Scene_FileName, FileName);
574573 strcpy(App->CL10_Load_Scene->Scene_Path_FileName, ParhFile);
575-
574+
576575 App->CL10_Load_Scene->OpenScene(0);
577576 return 1;
578577 }
@@ -584,10 +583,8 @@
584583 {
585584 First_SceneFile[0] = 0;
586585
587- char Tag1[256];
588- char ReadBuf[256];
589-
590- Read_IniFile = NULL;
586+ char Tag1[1024];
587+
591588 char FileName[2048];
592589 strcpy(FileName,App->EquityDirecory_FullPath);
593590 strcat(FileName,"\\Load_Level.gds");
--- GD_Shell2/Shell2/Shell2/Shell2.cpp (revision 269)
+++ GD_Shell2/Shell2/Shell2/Shell2.cpp (revision 270)
@@ -60,8 +60,8 @@
6060 App->Ogre17->InitOgre();
6161
6262
63- //App->GDCL_Scene_Data->Start_Scene();
64- //App->GDCL_Scene_Data->GameMode();
63+ App->GDCL_Scene_Data->Start_Scene();
64+ App->GDCL_Scene_Data->GameMode();
6565
6666 App->Ogre17->mRoot->startRendering();
6767
Show on old repository browser