Ghost Context Refactor

https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
This commit is contained in:
Jason Wilkins
2014-10-07 15:46:19 -05:00
parent a8705e99ee
commit 8d084e8c8f
236 changed files with 63900 additions and 2614 deletions

View File

@@ -79,8 +79,6 @@ extern "C"
#include "IMB_imbuf.h"
#include "IMB_moviecache.h"
int GHOST_HACK_getFirstFile(char buf[]);
// For BLF
#include "BLF_api.h"
#include "BLF_translation.h"
@@ -294,12 +292,6 @@ static void get_filename(int argc, char **argv, char *filename)
if (BLI_exists(argv[argc-1])) {
BLI_strncpy(filename, argv[argc-1], FILE_MAX);
}
if (::strncmp(argv[argc-1], "-psn_", 5)==0) {
static char firstfilebuf[512];
if (GHOST_HACK_getFirstFile(firstfilebuf)) {
BLI_strncpy(filename, firstfilebuf, FILE_MAX);
}
}
}
srclen -= ::strlen("MacOS/blenderplayer");
@@ -811,14 +803,6 @@ int main(int argc, char** argv)
if (scr_saver_mode != SCREEN_SAVER_MODE_CONFIGURATION)
#endif
{
if (SYS_GetCommandLineInt(syshandle, "nomipmap", 0)) {
GPU_set_mipmap(0);
}
GPU_set_anisotropic(U.anisotropic_filter);
GPU_set_gpu_mipmapping(U.use_gpu_mipmap);
// Create the system
if (GHOST_ISystem::createSystem() == GHOST_kSuccess) {
GHOST_ISystem* system = GHOST_ISystem::getSystem();
@@ -1041,6 +1025,13 @@ int main(int argc, char** argv)
else
app.startWindow(title, windowLeft, windowTop, windowWidth, windowHeight,
stereoWindow, stereomode, aasamples);
if (SYS_GetCommandLineInt(syshandle, "nomipmap", 0)) {
GPU_set_mipmap(0);
}
GPU_set_anisotropic(U.anisotropic_filter);
GPU_set_gpu_mipmapping(U.use_gpu_mipmap);
}
}
}