PR_Settings.MissingTextureFatal = 0;
PR_Settings.UseWindowed = 1;
Terrain_Globals.InitializationParameters.ScreenWidth = 800;
Terrain_Globals.InitializationParameters.ScreenHeight = 600;
Terrain_Globals.InitializationParameters.MaxPolys = 10000;
Terrain_Globals.InitializationParameters.MaxTextures = 1024;
Terrain_Globals.InitializationParameters.MaxMaterials = 1024;
Terrain_Globals.InitializationParameters.MaxCharacters = 32;
Terrain_Globals.InitializationParameters.MaxParticles = 5000;
Terrain_Globals.InitializationParameters.MaxEmitters = 500;
Terrain_Globals.InitializationParameters.MaxVoices = 32;
Terrain_Globals.InitializationParameters.MaxWAVs = 32;
strcpy(Terrain_Globals.InitializationParameters.PackagePath, "Data/Packages");
PR_SetWindow(hAppWin);
ChooseDevice();
PR_Settings.UseAGP = 1; // tried 0 also
PR_Initialize(10000);
InitializeDevices();
PR_AllocMaterials(512);
PR_AllocTextures(512);
PR_SetMode(800, 600, 60);
Terrain_Globals.DrawCollisionWireframes = 0;
Terrain_Globals.LOD_Distances[0] = 5000.0f;
Terrain_Globals.LOD_Distances[1] = 10000.0f;
Terrain_Globals.LOD_Distances[2] = 20000.0f;
Terrain_Globals.LOD_Distances[3] = 30000.0f;
Terrain_Globals.terrain = NULL;
PR_InitTimer(60);
LS_InitializeCharacters();
CHR_AllocateCharacterTypes(128);
PR_SetD3DPipeline(1);
If I leave in the call to PR_SetMode, I get the error that "This video card does not support rendering to a window". If I remove that call, I get an "Unhandled exception in Server.exe" from the PR_SetD3DPipeline call.
I''ve also tried removing a variety of the above init lines with more or less the same results.
How can I fix this?? What am I missing?
dedicated server init
How can PR be set up so it doesn''t have a rendering window, but still work? I''ve got an MFC application that is to be used as a dedicated game server, so it needs to be able to load PRO files and packages, but it doesn''t need to render. And in fact, I don''t want it to have a graphical window displayed, just the MFC window.
After the MFC initialization, I use the following code to attempt to set up PR.
Dr Pain, did you got a chance to have a look to EPR.zip on the UserApps dir ?
It implements the terrain engine within a MFC app... It would maybe help you!
Amadrias
It implements the terrain engine within a MFC app... It would maybe help you!
Amadrias
Thanks for the tip, Amadrias. I looked at MFCPR4F, EPR, and PR4EPR, but they all create a graphical rendering window, which is what I''m trying to avoid.
Ok...
You shouldn''t call PR_Initialize() but LS_InitializeTerrainEngine() instead. That''s the way you get all terrain engine initialized...
Amadrias
You shouldn''t call PR_Initialize() but LS_InitializeTerrainEngine() instead. That''s the way you get all terrain engine initialized...
Amadrias
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement