[osg-users] show mouse cursor in embedded osg

2019-02-28 Thread Sebastian Schmidt
How can i show the default osg mouse cursor in a embedded opengl context 
(GraphicsWindowEmbedded) ?
i tried embeddedWindow->useCursor(true), but i didnt work.


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75671#75671





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] hidden geometry in embedded osg

2019-02-28 Thread Sebastian Schmidt
i fixed it by setting:

Code:
stateset->setRenderBinDetails(11,"RenderBin");




OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75667#75667





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] rtt not working with opengl embedded osg

2019-02-20 Thread Sebastian Schmidt
Inside my scenegraph i have a ReaderWriter node, which basically render opengl 
stuff to a texture. This is not working if i try to run my osg project wrapped 
in a opengl app /plugin with a GraphicsWindowEmbedded view.

main loop:

Code:

void osgplugin::draw( bool on )
{
GLint currentFrameBuffer;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, );
glBindFramebuffer(GL_FRAMEBUFFER, 0);

m_pViewer->frame();

glBindFramebuffer(GL_FRAMEBUFFER, currentFrameBuffer);
}




setup of the rtt camera:

Code:

m_pCam->setClearColor(osg::Vec4(0,0,0,1));
m_pCam->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | 
GL_STENCIL_BUFFER_BIT);
m_pCam->setClearStencil(0);


m_pCam->setProjectionMatrix(osg::Matrix::ortho2D(0,TEX_WIDTH,0,TEX_HEIGHT));
m_pCam->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
m_pCam->setViewMatrix(osg::Matrix::identity());

m_pCam->setViewport(0,0,TEX_WIDTH,TEX_HEIGHT);

m_pCam->setRenderOrder(osg::Camera::PRE_RENDER);

m_pCam->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);

m_pCam->attach(osg::Camera::PACKED_DEPTH_STENCIL_BUFFER, 
GL_DEPTH_STENCIL_EXT);
m_pCam->attach(osg::Camera::COLOR_BUFFER, m_pTexture, 0, 0, true, 4, 4);




When i use FRAME_BUFFER_OBJECT for the rtt camera's rendertarget, the texture 
is blank. When i change it to FRAME_BUFFER, i can see the texture rendered to 
the whole screen.[/code]


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75646#75646





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] maximizing qt widgets with maximumsize

2018-07-26 Thread Sebastian Schmidt
After creation of a GLWidget/QWidget i call setMaximumSize() with a resolution 
less than fullscreen.
When i click on the maximize button of the window bar my window is resized to 
maximum size but in frameless mode.

Dont know if this is a osg related bug, but i think in qt the maximize event is 
ignored.


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74390#74390





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] delete qwidget & removeView

2018-06-25 Thread Sebastian Schmidt
okay so for now i avoid Qt::WA_DeleteOnClose and it works. 
Just catch the QCloseEvent of the widget and hide or delete


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74141#74141





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] delete qwidget & removeView

2018-06-22 Thread Sebastian Schmidt
How can i safely delete a qwidget and remove the corresponding view from the 
compositeviewer at runtime?

At creation time i call setAttribute(Qt::WA_DeleteOnClose) and connect the 
destroyed() event of the widget with a function that just calls removeView().

After closing and opening the window several times it always crashes somewhere 
inside 
GraphicsWindowQt::swapBuffersImplementation()
where _widget is NULL.


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74115#74115





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgQt scenegraph flickering with multiple views

2018-06-20 Thread Sebastian Schmidt
Flickering actually means that culling is not working correctly for parts of 
the geometry which overlapping each other in the scene.

Another thing is, if i toggle the StatsHandler in the first view and add the 
second view the StatsHandler frame is resizing and moving to the middle of the 
window.


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74094#74094





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgQt flickering with high framerates

2018-05-29 Thread Sebastian Schmidt
After i have finished moving my gui code from osg to qt, 
i noticed a strange render bug in my scene.
Basically i have a compositeviewer with two views, each view has a 
GLWidget/QWidget
like in the osgviewerQt example.
osgViewer and Qt each run in separate thread.

The first view contains also my 3D scene.
When i create and add the second view to the compositeviewer, textures of the 
scene start to flicker. 
Depending on current framerate, the flickering is increasing (~60 fps) 
or is not visible (<30 fps).


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73889#73889





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgQt mouse position from QEvent is always zero

2018-05-22 Thread Sebastian Schmidt
I'm trying to get current mouse position when mouseMoveEvent() gets called 
after moving the mouse over a QWidget.

QMouseEvent->pos() or QMouseEvent->globalPos() is always zero.

The same goes for catching the event in a custom eventFilter.

I'm using osgQt from version 3.4.1.

I would rather use the relative QWidget mouse position than 2d coordinates from 
osg::GUIEventAdapter.


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73711#73711





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Can see parts of the back side of a model

2018-03-15 Thread Sebastian Schmidt
In my case the original 3DS model had some flipped face normals due to wrong 
vertex winding etc.


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73100#73100





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Can see parts of the back side of a model

2018-03-02 Thread Sebastian Schmidt
Hi, i have a similar problem and dont want to create a new thread.

Unfortunately i couldnt fix the problem with these solutions here.

What you can see is the back of a plane with enabled front (transparency) or 
back (black/no lightning) face culling.[/img]


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73001#73001



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] set cullface mode in osg file

2018-03-02 Thread Sebastian Schmidt
Hi,

What is the correct syntax to enable front or backface culling in an osg file?

For example:

Geode {...
Geometry { ...
 StateSet { ...
GL_CULL_FACE ON
... 
Material {


OSG Version: 3.4.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72995#72995





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] disabled lighting after migration

2018-01-23 Thread Sebastian Schmidt
I set this for my main camera and it works.

Code:
osg::TexEnv* texenv = new osg::TexEnv;
texenv->setMode(osg::TexEnv::MODULATE);
ss->setTextureAttributeAndModes(0,texenv, osg::StateAttribute::ON);




There was a change in SceneView::setDefaults() in line 258: 

Code:
(if ((options_GLOBAL_DEFAULTS)))


Maybe thats why it worked with 3.0.1.


OSG Version: 3.0.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72834#72834





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] disabled lighting after migration

2018-01-19 Thread Sebastian Schmidt
Found a dirty solution. Had nothing to with lighting.
It was easier for me to check for specific opengl calls inside drawable's 
drawImplementation().

I had to reset this:

Code:
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);


with:

> glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
> glTexEnvfv( GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, 
> osg::Vec4(0.0,0.0,0.0,0.0).ptr());


Don't know why it happens with 3.4.1 and not with 3.0.1, coudln't find changes 
related to TexEnv.[/code]


OSG Version: 3.0.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72797#72797





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] disabled lighting after migration

2018-01-17 Thread Sebastian Schmidt
My scene contains a node, a RTT drawable with custom camera like in the 
osgprerender example.
The drawable is initialized and rendered after i set up the 
compositeviewer/mastercamera during runtime via a osgDB::ReaderWriter plugin.
In the drawable's drawImplementation() function i do lot of glEnable/glDisable 
calls.

After migration from osg 3.0.1 to 3.4.1 my whole scene is rendered with 
disabled lighting
and when i try to reactivate lighting with pressing "L" only a very small part 
of my scene is affected.

I have already fixed culling problem by calling setGlobalDefaults() for my 
custom cameras, but i don't how to fix this. Maybe it has something to do with 
changes in render states/orders.


OSG Version: 3.0.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72769#72769





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] change focus between multiple windows

2018-01-08 Thread Sebastian Schmidt
My compositeviewer has two views, each containing a osgWidget::Canvas (window).
When i press a widget inside the first window, the second window should be 
restored (if minimized) and focused.
The restoring works but the second window stays in background.


Code:

osg::ref_ptr pWindow = windows[1];
int x;
int y;
int width;
int height;
pWindow->getWindowRectangle(x, y, width, height);
pWindow->setWindowDecoration(true);
pWindow->setWindowRectangle(x, y, width, height);
pWindow->grabFocus();





OSG Version: 3.0.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72676#72676





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Prevent resizing with window decoration

2017-08-10 Thread Sebastian Schmidt

> Have you tried creating the GraphicsContext and setting the 
> GraphicsContext::Traits::supportsResize to false? 


I hoped there would be a simpler solution, but setting traits->supportsResize 
and call window->setWindowDecorationImplementation() again works for already 
existing GraphicsContext.

Thanks.


OSG Version: 3.0.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71399#71399





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Prevent resizing with window decoration

2017-08-08 Thread Sebastian Schmidt
Hi,

Is there any fix for the issue to prevent users from resizing the window with 
active window decoration in newer osg versions?

old thread: http://forum.openscenegraph.org/viewtopic.php?t=9882


OSG Version: 3.0.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71386#71386





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] check status of pagedlod

2017-08-07 Thread Sebastian Schmidt

robertosfield wrote:
> 
> What do you mean by "all of this is finished"?  In application "A" or "B"?
> 
> 
> It's hard to know really what you are after.
> 
> 
> The only thing I can suggest at this stage, if a plugin is taking time to 
> load and it's load is not deterministic due it being loaded in response to a 
> PagedLOD file request then why not just preload the plugin or statically link 
> it into your application so it doesn't happen during rendering of the frame.
> 
> 
> Robert.
> 


I mean when all of the initialization of osg application "A" is finished. It 
must be loaded during runtime, because the plugin is also waiting for a 
established network connection with app "A" that is rendering stuff to the 
texture.

I will try osgDB::Registry, maybe get ReadResult, for this.


OSG Version: 3.0.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71372#71372





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] check status of pagedlod

2017-08-04 Thread Sebastian Schmidt
Ok..i will try to explain. 

In my osg application "A" the scenegraph contains several pagedlod nodes which 
are reading from a custom osgdb plugin file. 

Application "B" is rendering stuff to a texture and the plugin is returning a 
osg node containing this texture.

The initialization of application "A" take some time, especially the loading of 
the plugin at the end.

And i need to know when all of this is finished.


Currently i call getFrameNumber() of the PagedLOD. After loading is finished 
framenumber is > 0 (~300).


OSG Version: 3.0.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71366#71366





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] check content of pagedlod

2017-08-04 Thread Sebastian Schmidt
Hi,

Is there a way to check current status/content of a pagedlod object of my 
scenegraph, for example if its already in the rendering process. 

I need this to determine if a plugin was loaded or not.

Thank you!

Cheers,
Sebastian


OSG Version: 3.0.1
OS: OpenSuse Leap 42.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=71364#71364





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] SCROLL event triggered twice

2017-05-19 Thread Sebastian Schmidt
Inside of the handle() function of my custom osgGA::GUIEventHandler class the 
osgGA::GUIEventAdapter::SCROLL event is triggered twice, when i move the mouse 
wheel slowly to the next position.

Is this a normal behaviour? Like a second event when the mouse button is 
released?
I tried to track down the scoll delta value but ea.getScrollingDelta..() is 
always zero.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70949#70949





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] scene object not receiving/casting shadows

2017-05-11 Thread Sebastian Schmidt
Hi,
I have a strange problem with osgShadow.
Every geometry (loaded osg models) in my scene is receiving and casting 
shadows, except for one model "A", that is not receiving/casting shadows when 
another specific model "B" of the scene is inside my current view frustrum.
I tried to track down the problem by removing single child nodes of model "B".
When i remove the last 3 of the 102 children of the root node, shadow works for 
model "A".

I dont know whats the relation between those two models, that could cause such 
a effect.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70896#70896





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] shrink, optimize, convert scenedata

2017-04-05 Thread Sebastian Schmidt
I have decreased the memory space of my models data up to 10% of the original 
size
and also improved performance by reducing vertex count to 1/3.

I did this by running the osg::Optimizer over my loaded scenegraph, write the 
scenedata to a new osg file and convert it to .ive format. Fortunately i could 
use most optimizer options without destroying the scenedata except for 
TEXTURE_ATLAS_BUILDER, which removed my texture paths and 
FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS ,
which instantly crashed my app.

I wonder if it makes any difference if i run osgconv first on every single .osg 
file before i do it again for the complete scenegraph and if i get other 
results by converting from .osg to .ive or .osdb to .ive ...

Also are there techniques for packing textures into a single file, like i did 
it for the scenegraph?


[/code]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70687#70687





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] ref null pointer in Group::traverse

2017-03-20 Thread Sebastian Schmidt
Sry for the lack of information.
Im using a CompositeViewer with two Views.
One for the scenegraph and one for the GUI.

The crash happens after i call CompositeViewer::run in a function where i 
dynamically add/change nodes of the scenegraph.

In
CompositeViewer::updateTraversal
-> scene->updateSceneGraph(*_updateVisitor);

I added viewer->stopThreading() and viewer->startThreading() in my custom 
function and it seems to work for now.

Unfortunately i get most of the crashes in Release mode and its harder to debug 
it.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70516#70516





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] using ref_ptr in any case

2017-03-20 Thread Sebastian Schmidt

robertosfield wrote:
> Hi Sebastian,
> 
> Using ref_ptr<> in local scope to objects t that are owned by external
> scope is a good practice but isn't always required.
> 
> If your application is multi-threaded then the external scope could
> unref and objects that you are using, so if you don't have your own
> reference to it it would go out of scope and you'd end up with a
> dangling pointer in your local scope.
> 
> If your application is single threaded then it should be safe to just
> use C pointers in local scope while the object is kept alive by the
> external scope.
> 
> Robert.
> 


Thanks. I would like to stick to multi threading.
Even if it doesnt make sense in local scope i have a consitent way of using 
ref_ptr everytime.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70515#70515





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] using ref_ptr in any case

2017-03-20 Thread Sebastian Schmidt
Hi.
I try to avoid possible memory leaks and currently replacing all pointers of 
osg object types with ref_ptr.

I read the osgproducer article and some other threads about these reference 
pointers, but i wonder if there is any advantage for using ref_ptr also in 
local scope as temporary references to existing pointers. 


Code:
osg::ref_ptr pView = dynamic_cast();

[/code]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70512#70512





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] ref null pointer in Group::traverse

2017-03-16 Thread Sebastian Schmidt
Sometimes my app is crashing in 

Code:

void Group::traverse(NodeVisitor& nv)
{
for(NodeList::iterator itr=_children.begin();
itr!=_children.end();
++itr)
{
(*itr)->accept(nv);
}
}



where the first element of children is present (a MatrixTransform node), but 
the _ptr of the second child is 0x0.

It always happens during the initialization of my scene.

Its also mentionable that im using osg 3.0.1 with ThreadPerCamera and a 
separate ReaderWriter plugin that is drawing texture to PagedLOD objects.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70508#70508





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] compositeviewer, close and remove view

2016-12-14 Thread Sebastian Schmidt
Hi,

I have a compositeviewer with multiple views. 
One of them has a windowmanager with canvas window.
My problem is that after i closed the window, 
the view is still present (getNumViews() was not decreased).
And even if i call removeView() the canvas reference is not deleted.

I want to close and readd the same window/view during runtime.
Maybe i can catch the CLOSE event, call removeView + set my canvas reference to 
null.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69683#69683





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] clamp mouse cursor / position

2016-11-30 Thread Sebastian Schmidt
Of course i ran into the problem that the internal mouse position ends at the 
screen borders, so that the mouse delta is zero for faster mouse dragging.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69551#69551





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Disable/Enable default keyevent during runtime

2016-11-07 Thread Sebastian Schmidt
Couldnt find the trigger for the bug yet. Might also be fixed (im using 3.0.1).
It also happens at start when i create ScreenCapture and call 
setKeyEventTakeScreenShot(0).

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69261#69261





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Disable/Enable default keyevent during runtime

2016-11-07 Thread Sebastian Schmidt

robertosfield wrote:
> Hi Sebastian,
> 
> Just set the KeyEvent to 0.
> 
> Robert.
> 


0 should be ok, but 
when i do this for ScreenCaptureHandler, it starts continous screen capturing.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69255#69255





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Disable/Enable default keyevent during runtime

2016-11-06 Thread Sebastian Schmidt
Hi,

I want to disable default keyevents during runtime,
so that all key event will be redirected to the osgWidget::Input 
and enable them again later.

I dont want to delete/recreate all of these handlers (Statshandler, 
Helphandler,etc.)
or create new custom classes for them.

Wouldnt it be easier to call the setKeyEvent... functions with a key that is 
not in use?
Unfortunately we dont have something like osgGA::GUIEventAdapter::KEY_NONE, 
right?

So what would be the best approach here?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69252#69252





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] implement filedialog without using qt

2016-11-03 Thread Sebastian Schmidt
Hi,

I want to implement a functionality similar to the QFileDialog in osg 
(currently 3.0.1).
A window shows up, where the user can navigate through the filesystem
and load/save files.
I haven*t used qt in my application yet and i don't want to use it at all.

Is there already a class f.e in the osgWidget folder and maybe in newer 
versions of osg, which does what i want?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69217#69217





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] multiple input with osgwidgets

2016-10-05 Thread Sebastian Schmidt

gambr wrote:
> Honestly I usually derive from osgGA::GUIEventHandler to handle mouse events.
> 
> Cheers,
> Gianni


I use the osgWidget::MouseHandler and osgGA::CameraManipulator which both 
derive from osgGA::GUIEventHandler.

The reason why i use MouseHandler is because it will send events to the 
WindowManager which knows all about its windows and widgets.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68855#68855





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] multiple input with osgwidgets

2016-10-04 Thread Sebastian Schmidt

gambr wrote:
> Hi Meldryt,
> I worked with osgWidget in the past. I move a widget with 
> left_mouse+mouse_move and resize it with central_mouse_button+mouse_move.
> I also tried to show a contextual menu clicking with right mouse button on it.
> Now I'm on OSG 3.4.0 but moved recentrly from OSG 3.0.1.
> 
> Could you please just write "one" of the cases not working in your 
> implemetation?
> 
> Cheers,
> Gianni


This all is one case. Its also not triggering for my parent window (canvas).

When i have two buttons pressed and release one of them, i get no event 
(release or drag) for the second button.

I don't know why this is happening with osgWidget::Input but not with my 
CameraManipulator.

I could try this with 3.4.0, maybe it was fixed in the past.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68843#68843





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] multiple input with osgwidgets

2016-09-30 Thread Sebastian Schmidt
bump!
Does anyone else have this issue?

I have no problem when i try to track this event inside my handle function of 
the custom osgGA::StandardManipulator class.

But for my GUI widgets its easier to track this input events just by overriding 
mousePush, mouseDrag, ... events of osgWidget::Input.

So there is this situation when i dont receive mouseDrag event.
1. push left or right mouse button and hold down.
2. now push the other button and release it
3. drag the first button

I use version 3.0.1

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68829#68829





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] multiple input with osgwidgets

2016-08-12 Thread Sebastian Schmidt
I have problems with receiving multi input events in my osgWidget::Label class.
f.e. 
1. click right mouse
2. click left mouse
3. release left mouse
4. no event when i drag the right mouse

i added 
Code:
setEventMask(osgWidget::EVENT_ALL);

 to receive all events but i seems like osg is killing//ignoring all other 
states when one of the mouse button is released.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68357#68357





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Get monitor resolutions on extended desktops

2016-08-11 Thread Sebastian Schmidt
@roberto Thanks for explaining. 
So maybe i cannot blame osg for this. Under Ubuntu xrandr and Nvidia X Server 
Settings gives me also one screen with 3840x1200 (1920x1200 * 2). Connected two 
monitors, one via DVI and one via DP. 
Im not an expert with this internal display behaviours and the linux api, so i 
have to hack around it.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68348#68348





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Get monitor resolutions on extended desktops

2016-08-10 Thread Sebastian Schmidt

robertosfield wrote:
> 
> The OSG's osg::GraphicsContext::WindowSystemInterface class is the
> method the OSG uses to abstract away how to query what displays you
> have and their resolution,
> 
> Robert.
> ___
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
>  --
> Post generated by Mail2Forum


I tried WindowSystemInterface as i said, but while using two monitors with 
extended desktop view i get only one screen with the streched resolution 
instead of two separate.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68339#68339





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Get monitor resolutions on extended desktops

2016-08-10 Thread Sebastian Schmidt

d_a_heitbrink wrote:
> if you are using windows you can use EnumDisplayMonitors, this will go 
> through your list of physical displays attached to your computer.


Thanks. Is there a similar function for Linux ?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68327#68327





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] clamp mouse cursor / position

2016-08-10 Thread Sebastian Schmidt
So to offset the mouse cursor only to the delta of a center point i found a 
simple solution.
In my case i wanted to hide the default cursor anyway, so didnt have to call 
requestWarpPointer.
Also i couldnt find a clean/fast solution to solve the requestWarpPointer 
recursive call problem without overriding a lot of osg classes and functions.

What i did was just call 
Code:
GraphicsView::useCursor

 and move the custom cursor to the delta of my widget center.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68326#68326





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] clamp mouse cursor / position

2016-05-24 Thread Sebastian Schmidt

Flogo wrote:
> Hi Sebastian,
> 
> I'm not an expert, but in my case I've my own class overloading 
> osgGA::StandardManipulator.
> In this case, while overriding the method handleMouseMove I can call 
> requestWarpPointer without recusiving call handleMouseMove.
> 
> Is it what you are looking for?
> 
> Best,
> Florian


Thanks. The problem is, that i still need to call a mousemove event to update 
the position of a widget (f.e. the pin button of a scrollbar).
But with a custom StandardManipulator it might be possible to separate 
mousemove events from an event triggered by calling requestWarpPointer.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67217#67217





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] clamp mouse cursor / position

2016-05-23 Thread Sebastian Schmidt
Hi,

I'm trying to keep the mouse cursor in a specific area, while dragging a widget.
(f.e. scrollbar, 2d stick).

I cannot use requestWarpPointer, because this will recursively call my 
mouseDrag event.

Maybe its not a good behaviour at all, but still i wonder if its possible.
... 

Thank you!

Cheers,
Sebastian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67194#67194





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] compositeviewer with mutliple windowmanager

2016-04-28 Thread Sebastian Schmidt
I ran into another problem. I created two windows (each with own camera, view 
and windowmanager). When i move the second window, the first window always gets 
the resize event, called by the first windowmanager.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66994#66994





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] compositeviewer with mutliple windowmanager

2016-04-27 Thread Sebastian Schmidt
What is the normal approach to create multiple windows, each filled with 
widgets and/or 3d models?

In my opinion i only need to merge the code in osg examples for osgwidgetwindow 
and osgcompositeviewer.

So i created two windowmanager and stuff for each view and added them to the 
compositeviewer.

It works for now, but i'm not sure if its the right approach.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66981#66981





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] crash after resizing high resolutions

2016-04-26 Thread Sebastian Schmidt
OS is Ubuntu 14.04 and OSG 3.0.1. GeForce GTX 750, Intel Xeon E3-1200
Im currently unable to use the 4k monitor and to report stack trace.


robertosfield wrote:
> Hi Sebastian,
> 
> 
> You might want to add a few more details about your OS, your hardware, OSG 
> version, memory footprint of your application, the strack trace at crash.  
> Without this there isn't too much others in the community can suggest.
> 
> 
> Robert.
> 
> 
> On 15 April 2016 at 12:44, Sebastian Schmidt < ()> wrote:
> 
> > Hi,
> > 
> > Most of the time when i resize/decrease a window with high resolution (f.e 
> > 3860 x 2160) the app crashes. This is normally not the case in full hd and 
> > lower resolutions.
> > 
> > The process of resizing the window takes to long. Maybe has something to do 
> > with sleep calls.
> > 
> > In my special case the crash is possibly caused by a second plugin that is 
> > running and doesn't like it when the osg app is in this black window/ 
> > intermediate state.
> > 
> > Is there a hack to make the resizing process faster?
> > 
> > ...
> > 
> > Thank you!
> > 
> > Cheers,
> > Sebastian
> > 
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=66832#66832 
> > (http://forum.openscenegraph.org/viewtopic.php?p=66832#66832)
> > 
> > 
> > 
> > 
> > 
> > ___
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> 
> 
>  --
> Post generated by Mail2Forum


--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66960#66960





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] get middle mouse event

2016-04-26 Thread Sebastian Schmidt
Thanks for the answer.

I want to access the mouse state from outside an eventhandler (f.e. Widget or 
Canvas).

After quick research i found out that WindowManager has functions like 
isMiddleMouseButtonDown()


Trajce Nikolov NICK wrote:
> Hi Sebastian,
> 
> 
> I think that is the proper way. Further you can get ea.getButtom() to inspect 
> which mouse button was pushed
> 
> 
> Nick
> 
> 
> On Wed, Apr 20, 2016 at 3:28 PM, Sebastian Schmidt < ()> wrote:
> 
> > Hi,
> > 
> > I try to get the mouse event, when the middle button is pushed.
> > 
> > By default the WindowManager receives the event, but unfortunately it is 
> > sent as normal mouse push to the widget.
> > 
> > Is there any chance to catch this special event in my widget, without using 
> > the osgGA::GUIEventHandler?
> > ...
> > 
> > Thank you!
> > 
> > Cheers,
> > Sebastian
> > 
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=66893#66893 
> > (http://forum.openscenegraph.org/viewtopic.php?p=66893#66893)
> > 
> > 
> > 
> > 
> > 
> > ___
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> 
> 
> 
> -- 
> trajce nikolov nick
> 
>  --
> Post generated by Mail2Forum


--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66959#66959





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] get middle mouse event

2016-04-20 Thread Sebastian Schmidt
Hi,

I try to get the mouse event, when the middle button is pushed.

By default the WindowManager receives the event, but unfortunately it is sent 
as normal mouse push to the widget.

Is there any chance to catch this special event in my widget, without using the 
osgGA::GUIEventHandler?
... 

Thank you!

Cheers,
Sebastian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66893#66893





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgWidget update function

2016-04-18 Thread Sebastian Schmidt
Hi,

I have the same problem like in this thread: 
http://forum.openscenegraph.org/viewtopic.php?t=13169=previous.

I try to implement mousePressed function for an osgWidget.
The solution is easy, but i can't find any "update/frame" function inside 
osgWidget or parent classes, which i can override.

(Of course i can call every single Widget from my Window/Canvas class)
... 

Thank you!

Cheers,
Sebastian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66850#66850





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] crash after resizing high resolutions

2016-04-15 Thread Sebastian Schmidt
Hi,

Most of the time when i resize/decrease a window with high resolution (f.e 3860 
x 2160) the app crashes. This is normally not the case in full hd and lower 
resolutions.

The process of resizing the window takes to long. Maybe has something to do 
with sleep calls. 

In my special case the crash is possibly caused by a second plugin that is 
running and doesn't like it when the osg app is in this black window/ 
intermediate state.

Is there a hack to make the resizing process faster?

... 

Thank you!

Cheers,
Sebastian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66832#66832





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgText alignment

2016-04-12 Thread Sebastian Schmidt
Hi,

What is general approach to set the text alignment of osg::Widget::Label to 
left ?
I try to set it with setAlignment(), but the text is always aligned to the 
center.

(OSG 3.0.1)
... 

Thank you!

Cheers,
Sebastian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66793#66793





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] setPadding inside osgWidget::Canvas (osg 3.0.1)

2016-03-22 Thread Sebastian Schmidt
Hi,

I can not see borders of my osgWidget::Widget after callling setPadding().
The widget is inside of a osgWidget::Canvas object. 
Does this function only work for osgWidget:Box ?
... 

Thank you!

Cheers,
Sebastian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66593#66593





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgWidget::Label size adjustment

2016-03-21 Thread Sebastian Schmidt
Hi,

Im using osg 3.0.1 and i have problems with adjusting the size of a 
osgWidget::Label to its text.

As far as i understand, without using setSize, the widget size depends on the 
length of the text and font type.
I like this and i dont want to set the size manually, but the gap to the widget 
border is getting larger with every character.

Is it possible to use this behaviour in combination with something like 
"setMargin()" ?
Thank you!

Cheers,
Sebastian

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66575#66575





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Keyrepeat after delay

2016-03-08 Thread Sebastian Schmidt
Hi,
I added several GuiEventHandler to my Viewer.
When i try to track the 
Code:
KeyDown 

event in the 
Code:
handle 

function while pressing a key, i always get a short delay between the first and 
the folllowing events.
This problem doesnt exist for my custom 
Code:
CameraManipulator

.

My 
Code:
handle 

functions also return 
Code:
false

, so the cannot block each other.

Do i have to modify key repeat times or set a specific mode?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66475#66475





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org