forked from bartvdbraak/blender
fix for recent stereo changes+tweaks
(it's the 3rd commit in a row. But as they say, the 3rd is always a charm ;) I still think we have a little mess with the DEFINE parameters in BGE (as in RAS_IRasterizer::StereoMode). We used to have them duplicated and hardcoded in 2.4xx, but I think we can do it in another way now. (I didn't change gameplayer, but I can do it once we have it linking and building properly)
This commit is contained in:
parent
a3366cb8f0
commit
01b787636b
@ -95,16 +95,16 @@ class LOGIC_PT_stereo(bpy.types.Panel):
|
||||
if stereo_mode == 'STEREO':
|
||||
col = layout.column(align=True)
|
||||
row = col.row()
|
||||
row.item_enumR(gs, "stereo_mode", "ANAGLYPH")
|
||||
row.item_enumR(gs, "stereo_mode", "QUADBUFFERED")
|
||||
row.item_enumR(gs, "stereo_mode", "ABOVEBELOW")
|
||||
|
||||
row = col.row()
|
||||
row.item_enumR(gs, "stereo_mode", "INTERLACED")
|
||||
row.item_enumR(gs, "stereo_mode", "ANAGLYPH")
|
||||
row.item_enumR(gs, "stereo_mode", "VINTERLACE")
|
||||
|
||||
row = col.row()
|
||||
row.item_enumR(gs, "stereo_mode", "SIDEBYSIDE")
|
||||
row.item_enumR(gs, "stereo_mode", "VINTERLACE")
|
||||
row.item_enumR(gs, "stereo_mode", "ABOVEBELOW")
|
||||
|
||||
# row = layout.column_flow()
|
||||
# row.itemR(gs, "stereo_mode")
|
||||
|
@ -9214,6 +9214,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
/* TODO: should be moved into one of the version blocks once this branch moves to trunk and we can
|
||||
bump the version (or sub-version.) */
|
||||
{
|
||||
World *wo;
|
||||
Object *ob;
|
||||
Material *ma;
|
||||
Scene *sce;
|
||||
@ -9347,7 +9348,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
sce->gm.stereomode = STEREO_ANAGLYPH;
|
||||
}
|
||||
else
|
||||
sce->gm.stereoflag = STEREO_ENABLE;
|
||||
sce->gm.stereoflag = STEREO_ENABLED;
|
||||
|
||||
//Framing
|
||||
sce->gm.framing = sce->framing;
|
||||
@ -9357,16 +9358,17 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
sce->gm.depth= sce->r.depth;
|
||||
|
||||
//Physic (previously stored in world)
|
||||
if (0){
|
||||
// if (sce->world){ // XXX I think we need to run lib_link_all() before do_version()
|
||||
sce->gm.gravity = sce->world->gravity;
|
||||
sce->gm.physicsEngine= sce->world->physicsEngine;
|
||||
sce->gm.mode = sce->world->mode;
|
||||
sce->gm.occlusionRes = sce->world->occlusionRes;
|
||||
sce->gm.ticrate = sce->world->ticrate;
|
||||
sce->gm.maxlogicstep = sce->world->maxlogicstep;
|
||||
sce->gm.physubstep = sce->world->physubstep;
|
||||
sce->gm.maxphystep = sce->world->maxphystep;
|
||||
//temporarily getting the correct world address
|
||||
wo = newlibadr(fd, sce->id.lib, sce->world);
|
||||
if (wo){
|
||||
sce->gm.gravity = wo->gravity;
|
||||
sce->gm.physicsEngine= wo->physicsEngine;
|
||||
sce->gm.mode = wo->mode;
|
||||
sce->gm.occlusionRes = wo->occlusionRes;
|
||||
sce->gm.ticrate = wo->ticrate;
|
||||
sce->gm.maxlogicstep = wo->maxlogicstep;
|
||||
sce->gm.physubstep = wo->physubstep;
|
||||
sce->gm.maxphystep = wo->maxphystep;
|
||||
}
|
||||
else{
|
||||
sce->gm.gravity =9.8f;
|
||||
|
@ -403,7 +403,7 @@ typedef struct GameData {
|
||||
float pad12;
|
||||
} GameData;
|
||||
#define STEREO_NOSTEREO 1
|
||||
#define STEREO_ENABLE 2
|
||||
#define STEREO_ENABLED 2
|
||||
#define STEREO_DOME 3
|
||||
|
||||
//#define STEREO_NOSTEREO 1
|
||||
|
@ -586,7 +586,7 @@ void rna_def_scene_game_data(BlenderRNA *brna)
|
||||
|
||||
static EnumPropertyItem stereo_items[] ={
|
||||
{STEREO_NOSTEREO, "NO_STEREO", 0, "No Stereo", ""},
|
||||
{STEREO_ENABLE, "STEREO", 0, "Stereo", ""},
|
||||
{STEREO_ENABLED, "STEREO", 0, "Stereo", ""},
|
||||
{STEREO_DOME, "DOME", 0, "Dome", ""},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
|
@ -332,8 +332,10 @@ extern "C" void StartKetsjiShell(struct bContext *C, int always_use_expand_frami
|
||||
ketsjiengine->SetGame2IpoMode(game2ipo,startFrame);
|
||||
|
||||
// Quad buffered needs a special window.
|
||||
if (blscene->gm.stereomode != RAS_IRasterizer::RAS_STEREO_QUADBUFFERED)
|
||||
rasterizer->SetStereoMode((RAS_IRasterizer::StereoMode) blscene->gm.stereomode);
|
||||
if(blscene->gm.stereoflag == STEREO_ENABLED){
|
||||
if (blscene->gm.stereomode != RAS_IRasterizer::RAS_STEREO_QUADBUFFERED)
|
||||
rasterizer->SetStereoMode((RAS_IRasterizer::StereoMode) blscene->gm.stereomode);
|
||||
}
|
||||
}
|
||||
|
||||
if (exitrequested != KX_EXIT_REQUEST_QUIT_GAME)
|
||||
@ -672,8 +674,10 @@ extern "C" void StartKetsjiShellSimulation(struct wmWindow *win,
|
||||
}
|
||||
|
||||
// Quad buffered needs a special window.
|
||||
if (blscene->gm.stereomode != RAS_IRasterizer::RAS_STEREO_QUADBUFFERED)
|
||||
rasterizer->SetStereoMode((RAS_IRasterizer::StereoMode) blscene->gm.stereomode);
|
||||
if(blscene->gm.stereoflag == STEREO_ENABLED){
|
||||
if (blscene->gm.stereomode != RAS_IRasterizer::RAS_STEREO_QUADBUFFERED)
|
||||
rasterizer->SetStereoMode((RAS_IRasterizer::StereoMode) blscene->gm.stereomode);
|
||||
}
|
||||
|
||||
if (exitrequested != KX_EXIT_REQUEST_QUIT_GAME)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user