Page 1 of 1
Is it possible to hide/show ogre 3D view
Posted: Sun Aug 03, 2025 9:30 am
by marc_256
Hi,
For my latest GUI development for my [Industry 4.0] dream ...
I want the user can show 3D view with the push of a keyboard [Fx] key.
The key selection is not the problem ...
See pictures below.
Pic1: normal development environment.
Pic2: after user pushed [Fx] key.
Q)
Is it possible to hide/show ogre 3D view ?
Is there a [Hide3D] or [HideOgre] command ?
I use [OpenWindowedScreen] mode
OS: win 10
PB: 5.73 x64
Thanks,
marc

Re: Is it possible to hide/show ogre 3D view
Posted: Tue Aug 05, 2025 1:16 am
by idle
cant you use hidewindow() or HideWindow3D()?
Re: Is it possible to hide/show ogre 3D view
Posted: Sun Aug 10, 2025 5:56 pm
by marc_256
Hi idle,
thanks, I never used Window3D() ...
So, I need to find out, I need to test it.
Marc
Re: Is it possible to hide/show ogre 3D view
Posted: Sun Aug 10, 2025 11:23 pm
by wombats
Do you mean something like this? Only tested on macOS.
Code: Select all
InitEngine3D()
InitSprite()
InitKeyboard()
InitMouse()
OpenWindow(0, 0, 0, 800, 600, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(0, 10, 10, 100, 90, "Hide")
OpenWindow(1, 0, 0, 640, 480, "", #PB_Window_WindowCentered, WindowID(0))
OpenWindowedScreen(WindowID(1), 0, 0, 640, 480, 0, 0, 0)
CreateLight(#PB_Any, RGB(0, 255, 255), -5, 10, 5, #PB_Light_Point)
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 2, 1, 3, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)
CreateSphere(0, 1)
CreateEntity(0, MeshID(0), #PB_Material_None)
ReleaseMouse(#True)
Define evt
Repeat
Repeat
evt = WindowEvent()
Select evt
Case #PB_Event_CloseWindow
quit = 1
Case #PB_Event_Gadget
Select GetGadgetText(0)
Case "Hide"
HideWindow(1, 1)
SetGadgetText(0, "Show")
Case "Show"
HideWindow(1, 0)
SetGadgetText(0, "Hide")
EndSelect
EndSelect
Until evt = 0
RenderWorld()
FlipBuffers()
Until Quit = 1
Re: Is it possible to hide/show ogre 3D view
Posted: Mon Aug 11, 2025 5:35 am
by miso
@wombats, tested on Win10, it also works there.
@mark_256, Yes, I could not identify what is in your picture, a skinned window with gadgets + an opened screen on a second window, or only a screen + sprites + images something like a window3d.
Re: Is it possible to hide/show ogre 3D view
Posted: Tue Aug 12, 2025 12:28 pm
by marc_256
Sorry for the late answer ...
@wombats
This works very well, thanks.
I gone try it inside my program ...
Q) If I use it, does it only hide the window, and still render the 3D in the background ?
Marc