add command-line option --disable_retina for Mac
improve TimeSeries and Dof6ConstaintTutorial
This commit is contained in:
@@ -52,13 +52,14 @@ static MyProfileWindow* s_profWindow =0;
|
||||
|
||||
#define DEMO_SELECTION_COMBOBOX 13
|
||||
const char* startFileName = "0_Bullet3Demo.txt";
|
||||
|
||||
char staticPngFileName[1024];
|
||||
static GwenUserInterface* gui = 0;
|
||||
static int sCurrentDemoIndex = -1;
|
||||
static int sCurrentHightlighted = 0;
|
||||
static CommonExampleInterface* sCurrentDemo = 0;
|
||||
static b3AlignedObjectArray<const char*> allNames;
|
||||
static float gFixedTimeStep = 0;
|
||||
bool gAllowRetina = true;
|
||||
|
||||
static class ExampleEntries* gAllExamples=0;
|
||||
bool sUseOpenGL2 = false;
|
||||
@@ -360,7 +361,10 @@ static void saveCurrentSettings(int currentEntry,const char* startFileName)
|
||||
fprintf(f,"--background_color_green= %f\n", green);
|
||||
fprintf(f,"--background_color_blue= %f\n", blue);
|
||||
fprintf(f,"--fixed_timestep= %f\n", gFixedTimeStep);
|
||||
|
||||
if (!gAllowRetina)
|
||||
{
|
||||
fprintf(f,"--disable_retina");
|
||||
}
|
||||
|
||||
if (enable_experimental_opencl)
|
||||
{
|
||||
@@ -678,7 +682,11 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
|
||||
enable_experimental_opencl = true;
|
||||
gAllExamples->initOpenCLExampleEntries();
|
||||
}
|
||||
|
||||
if (args.CheckCmdLineFlag("disable_retina"))
|
||||
{
|
||||
gAllowRetina = false;
|
||||
}
|
||||
|
||||
|
||||
int width = 1024;
|
||||
int height=768;
|
||||
@@ -978,11 +986,11 @@ void OpenGLExampleBrowser::update(float deltaTime)
|
||||
{
|
||||
skip=0;
|
||||
//printf("gPngFileName=%s\n",gPngFileName);
|
||||
static int s_frameCount = 0;
|
||||
char fileName[1024];
|
||||
sprintf(fileName,"%s%d.png",gPngFileName,s_frameCount++);
|
||||
b3Printf("Made screenshot %s",fileName);
|
||||
s_app->dumpNextFrameToPng(fileName);
|
||||
static int s_frameCount = 100;
|
||||
|
||||
sprintf(staticPngFileName,"%s%d.png",gPngFileName,s_frameCount++);
|
||||
//b3Printf("Made screenshot %s",staticPngFileName);
|
||||
s_app->dumpNextFrameToPng(staticPngFileName);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user