Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion HPL2/core/sources/impl/LowLevelGraphicsSDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ namespace hpl {
{
;

// glFinish();
glFinish();
//dont use this any more, SwapBuffers() takes care of it
}

Expand Down
2 changes: 1 addition & 1 deletion HPL2/tools/editors/common/EditorBaseClasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ cEngine* iEditorBase::Init(cEngine* apEngine, bool abDestroyEngineOnExit)

mpEngine = CreateHPLEngine(eHplAPI_OpenGL, eHplSetup_All, &vars);
mpEngine->GetInput()->GetLowLevel()->LockInput(false);
gpEngine->GetInput()->GetLowLevel()->RelativeMouse(false);
mpEngine->GetInput()->GetLowLevel()->RelativeMouse(false);

mpEngine->GetResources()->GetMaterialManager()->SetTextureSizeDownScaleLevel(cString::ToInt(GetSetting("TexQuality").c_str(), 0));

Expand Down
3 changes: 3 additions & 0 deletions HPL2/tools/editors/leveleditor/LevelEditorWindowGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,15 @@ void cLevelEditorWindowGroup::OnInitLayout()
mpListGroups = mpSet->CreateWidgetListBox(cVector3f(10,50,1), cVector2f(250,340), mpWindow);
mpListGroups->SetDefaultFontSize(vTextSize);
mpListGroups->AddCallback(eGuiMessage_SelectionChange, this, kGuiCallback(GroupList_OnSelectionChange));
AddWidget(mpListGroups);

mpListGroupEntities = mpSet->CreateWidgetMultiPropertyListBox(cVector3f(270,50,1), cVector2f(340,340), mpWindow);
mpListGroupEntities->SetDefaultFontSize(vTextSize);
mpListGroupEntities->SetAllowMultiSelection(true);
mpListGroupEntities->AddCallback(eGuiMessage_SelectionChange, this, kGuiCallback(EntityList_OnSelectionChange));
mpListGroupEntities->AddColumn("Name", 0);
mpListGroupEntities->SetColumnWidth(0,340);
AddWidget(mpListGroupEntities);

cWidgetLabel* pLabelParams = mpSet->CreateWidgetLabel(cVector3f(10,400,0.1f), 0, _W("Group parameters"), mpWindow);
pLabelParams->SetDefaultFontSize(vTextSize);
Expand All @@ -241,6 +243,7 @@ void cLevelEditorWindowGroup::OnInitLayout()
mpCheckBoxGroupVisibility = mpSet->CreateWidgetCheckBox(cVector3f(10,450,0.1f), 0, _W("Visible"),mpWindow);
mpCheckBoxGroupVisibility->SetDefaultFontSize(vTextSize);
mpCheckBoxGroupVisibility->AddCallback(eGuiMessage_CheckChange, this, kGuiCallback(VisibilityCheckBox_OnChange));
AddWidget(mpCheckBoxGroupVisibility);

mpEditor->SetLayoutNeedsUpdate(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ void cLevelEditorWindowLevelSettings::OnInitLayout()
mpWindow->SetText(_W("Level Settings"));

cWidgetTabFrame* pTabFrame = mpSet->CreateWidgetTabFrame(cVector3f(10,35,0.1f), mvSize-cVector2f(20,40), _W(""), mpWindow);
AddWidget(pTabFrame);

////////////////////////////////////////////////////////
// SkyBox parameters tab
Expand Down Expand Up @@ -123,7 +124,7 @@ void cLevelEditorWindowLevelSettings::OnInitLayout()
vPos.x += mpInpGlobalMaxDecalTris->GetSize().x + 15;
mpBResetDecals = mpSet->CreateWidgetButton(vPos, cVector2f(100,20), _W("Reset created decals"), pTab);
mpBResetDecals->AddCallback(eGuiMessage_ButtonPressed, this, kGuiCallback(ResetDecals));

AddWidget(mpBResetDecals);
}

//---------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,15 +529,15 @@ bool cModelEditorWindowPhysicsTest::OnViewportUpdate(const cGuiMessageData& aDat
mpSet->SetAttentionWidget(mpImgViewport);

pInput->GetLowLevel()->LockInput(true);
pInput->GetLowLevel()->MouseRelative(true);
pInput->GetLowLevel()->RelativeMouse(true);
}
else if(mbViewMode==false && mpSet->GetAttentionWidget()==mpImgViewport)
{
mpSet->SetAttentionWidget(mpPrevAttention);
mpPrevAttention = NULL;

pInput->GetLowLevel()->LockInput(false);
pInput->GetLowLevel()->MouseRelative(false);
pInput->GetLowLevel()->RelativeMouse(false);

mCamera.SetTumbleActive(false);
mCamera.SetTrackActive(false);
Expand Down Expand Up @@ -651,7 +651,7 @@ bool cModelEditorWindowPhysicsTest::OnViewportMouseUp(const cGuiMessageData& aDa
}

pInput->GetLowLevel()->LockInput(false);
pInput->GetLowLevel()->MouseRelative(false);
pInput->GetLowLevel()->RelativeMouse(false);

if(mbViewMode)
{
Expand Down
4 changes: 3 additions & 1 deletion HPL2/tools/mapview/MapView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,8 @@ class cSimpleUpdate : public iUpdateable
gpSimpleCamera->GetViewport()->AddRendererCallback(&renderCallback);

gpSimpleCamera->SetMouseMode(true);
gpEngine->GetInput()->GetLowLevel()->LockInput(false);
gpEngine->GetInput()->GetLowLevel()->RelativeMouse(false);

//pSettings->mbLog = true;

Expand Down Expand Up @@ -2032,7 +2034,7 @@ int hplMain(const tString &asCommandline)
vars.mGraphics.mbFullscreen = gpConfig->GetBool("Screen","FullScreen", false);
gpEngine = CreateHPLEngine(eHplAPI_OpenGL, eHplSetup_All, &vars);
gpEngine->SetLimitFPS(false);
gpEngine->GetGraphics()->GetLowLevel()->SetVsyncActive(false);
gpEngine->GetGraphics()->GetLowLevel()->SetVsyncActive(false, false);
gpEngine->SetWaitIfAppOutOfFocus(true);

gsNodeCont_Name = gpConfig->GetString("NodeCont","Name", "MapViewTest");
Expand Down
7 changes: 4 additions & 3 deletions HPL2/tools/modelview/ModelView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,8 @@ class cSimpleUpdate : public iUpdateable
void SetupView()
{
gpEngine->GetInput()->GetLowLevel()->LockInput(false);

gpEngine->GetInput()->GetLowLevel()->RelativeMouse(false);

cRenderSettings *pSettings = gpSimpleCamera->GetViewport()->GetRenderSettings();
gpSimpleCamera->GetViewport()->AddRendererCallback(&renderCallback);

Expand Down Expand Up @@ -979,7 +980,7 @@ class cSimpleUpdate : public iUpdateable
else
SetPhysicsActive(gbPhysicsActive);

cPlatform::SetWindowCaption("ModelView - "+cString::GetFileName(asFileName));
mpLowLevelGraphics->SetWindowCaption("ModelView - "+cString::GetFileName(asFileName));

Log("--------- MODEL INFO ------------------\n");

Expand Down Expand Up @@ -2396,7 +2397,7 @@ int hplMain(const tString &asCommandline)
//vars.mGraphics.mvWindowPosition = cVector2l(0,0);
gpEngine = CreateHPLEngine(eHplAPI_OpenGL, eHplSetup_All, &vars);
gpEngine->SetLimitFPS(false);
gpEngine->GetGraphics()->GetLowLevel()->SetVsyncActive(false);
gpEngine->GetGraphics()->GetLowLevel()->SetVsyncActive(false, false);
gpEngine->SetWaitIfAppOutOfFocus(true);


Expand Down