Re: [osg-users] About HUD' projection

2014-09-14 Thread Bram Vaessen
For a normal 2D HUD I suggest orthogonal. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61031#61031 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] order of MatrixTransform

2014-09-14 Thread Bram Vaessen
Hi, I'm a little confused about something simple... the order in which to add MatrixTransform. For example I want to rotate something around x,y,z using 3 matrixtransforms. as I understand I can do this by: -translate(-x,-y,-z) -rotate -translate(x,y,z) when I add them, which is the correct

Re: [osg-users] order of MatrixTransform

2014-09-14 Thread Bram Vaessen
Thanks. Is there a way to make it a single node, but still being able to easily change the rotation around the point (the point on which to rotate doesn't change) ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61035#61035

Re: [osg-users] order of MatrixTransform

2014-09-14 Thread Bram Vaessen
Ok thanks, I would have to recalculate the matrix every time the rotation changes I assume, but in the end that is probably more efficient than having 3 matrixtransforms in the scenegraph... right? -- Read this topic online here:

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-09-03 Thread Bram Vaessen
I think making it two projects could be an advantage, specially if the docs are large, because you can check out the source code without having to transfer tons of data for doc-files, which might not be locally used by many. Any cons? -- Read this topic online here:

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-09-02 Thread Bram Vaessen
Hi Robert, I would say that the hand written ones would best sit alongside the generated once, with some kind of suffix like 'discuss' or 'details'. It also seems to make sense to me to check in the generated docs as well, or else it could cause some confusion. -- Read this

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-09-01 Thread Bram Vaessen
Hi Robert, One question: did the previous wikis offer a structure that somewhat covers most of OSG (like the api documentation)? Or was it a list of guides and articles? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60883#60883

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-09-01 Thread Bram Vaessen
Glenn I don't understand what you are trying to say. Are you saying that everyone who uses OSG necessarily has to (learn to) checkout the source repository, and push changes? This is not the case, you can download the source and use the source and/or precompiled OSG without every learning or

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-09-01 Thread Bram Vaessen
Hi Robert, I guess as the creator of a well known open source project you are entitled to make claims about what all programmers should be capable of doing, but if the problem is that not enough people are contributing to the documentation, my first idea would be: try to make it easier to

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-09-01 Thread Bram Vaessen
So we have tried what you are suggesting and it didn't work out how you are suggesting it could. Sort of true, except that those wiki's did not have a API-type structure, which might have made the difference. But obviously I cannot guarantee that. It's just a gut feeling I have, based on

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-08-31 Thread Bram Vaessen
Hi Björn, My idea is actually closely related with your point 2: the in depth documentation of OSG. As far as I know however, doxygen is generated from the comments in the source code, so everyone who wants to add or say something about any function would have to do it in the source code

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-08-31 Thread Bram Vaessen
Sounds like a cool system... however can people add, edit or comment on anything in the documentation without learning github (or whatever is rep system is used) checking out the source and pushing changes? I think it is very important that this is possible, or else many people may find it too

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-08-29 Thread Bram Vaessen
Hi Jordi (and others), I might be able to assist with the creation and maintenance of a wiki, but there are a few things: Con: -I'm not very familiar with creating and maintaining a wiki -I only use OSG in 1 project now so I only know a small part of it and that part not even that well. Pro:

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-08-29 Thread Bram Vaessen
I believe it is better to separate the documentation from the main website. It's not really easy to explain, but try to look at it from my perspective, from a general user. It wouldn't cross my mind to ask you guys for full permission to edit your main website. I'm not involved with the

Re: [osg-users] create a OSG wiki: (it was OpenSceneGraph Oculus Rift integration )

2014-08-29 Thread Bram Vaessen
First, it is not my intention to offend the creators of the current help system, or to suggest they made bad decisions or something like that. I just have a different vision that I want to explain. My line of thought goes something like this: if you want to get a really extensive

Re: [osg-users] OpenSceneGraph Oculus Rift integration

2014-08-27 Thread Bram Vaessen
What sometimes helps is a good wiki where enthusiasts/independents can share all the information they got on the SDK and the workings of the OR. Actually might be good for OSG too. Lots and lots of information and knowledge on the forums, but sometimes it's hard to find it. --

Re: [osg-users] OpenSceneGraph Oculus Rift integration

2014-08-27 Thread Bram Vaessen
Hopefully last post off topic: creating a good wiki with a good basic structure that has the possibility to cover all important classes and functions in OSG, and can be easily added to by all, is a huge difference from giving people who ask it full access to post whatever OSG related material

Re: [osg-users] transforming a directional vector into eye-space

2014-08-12 Thread Bram Vaessen
ok thanks :) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60636#60636 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] transforming a directional vector into eye-space

2014-08-11 Thread Bram Vaessen
Hi, In my shader I would like to have the direction of the light (sunlight) in eye-space, and since it doesn't vary per vertex I would like to pre-calculate it in OSG. I'm not sure how to do this, I thought it would make sense to multiply the view matrix with the direction of the light like

Re: [osg-users] transforming a directional vector into eye-space

2014-08-11 Thread Bram Vaessen
thanks I noticed I had to use the (vec3, matrix) version instead of the (matrix, vec3) version to make it work. So that does a v*M[0..2,0..2] However in the shader (glsl) it's gl_NormalMatrix * gl_Normal... seems to be the other way around. Any clarification on this? thanks!

Re: [osg-users] virtual ~TemplateArray() is protected

2014-08-09 Thread Bram Vaessen
I use that all the time, so it shouldn't be a problem. What you could try is to explicitly include osg/Vec3Array in your header. I have had problems before where I forgot to include the actual header file. The vec3array may have been declared (empty) in some other osg-file so it seems like

Re: [osg-users] Set color in fragment shader

2014-07-29 Thread Bram Vaessen
don't forget to pass the color in the vertex shader: gl_FrontColor = gl_Color; for texture you use texture coordinates: usually gl_TexCoord[0] = gl_MultiTexCoord0; in the vertex shader and then for example use texture2D( sampler2D, vec2 [,float bias] ) to sample a color from the texture at the

Re: [osg-users] Hard time with slave cameras and viewports.

2014-07-28 Thread Bram Vaessen
a quote from Robert: ABSOLTE_RF means that the when the cull traversal encounters a Transform node it ignores the inherited modelview matrix so that the local transform matrix on the Transform node becomes the new modelview matrix. This means that the Transform nodes subgraph is placed in new

Re: [osg-users] osgParticle Emitter on Fast Moving Object

2014-07-27 Thread Bram Vaessen
You could extrapolate, emitting tHe particles in front of your moving object, i.e. curpos + (curpos-lastpos)*k. I die that once in another environment and it can look wel if you tweak k, and you could make it dependent on the speed as well -- Read this topic online here:

Re: [osg-users] Convert depth image to 3D model

2014-07-25 Thread Bram Vaessen
Or use it in a heightfield: http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00364.html -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60453#60453 ___ osg-users mailing list

Re: [osg-users] Hard time with slave cameras and viewports.

2014-07-25 Thread Bram Vaessen
I'm not a huge expert, but: 1. the slave should be post, because you want to render the cross/axes on top of the rest. 2. you can just use a perspective projection if you want a 3d looking axis or a orthogonal view if you want a 'less' 3d look to it. Be sure to set the near and far correct, I

Re: [osg-users] geometry and normals

2014-07-25 Thread Bram Vaessen
it seems like you are using referenced vertices in your roads mesh? (at least that is what I understand from int* oConnections (the int references vertices indexes right?) I think that if you want to use the accelerated drawing you should convert it to simple vertex arrays, where the vertices

Re: [osg-users] geometry and normals

2014-07-25 Thread Bram Vaessen
Well to give better advice, I would need to understand what is exactly stored in float* oPoints and int* oConnections. What I assume is that oPoints (an array of floats) contains x1,y1,z1,x2,y2,z2, etc. and then oConnections (an array of ints) contains a serie of references to those points for

Re: [osg-users] geometry and normals

2014-07-25 Thread Bram Vaessen
First: In your example the coordinates are stored in an array of Vec3, but in the other code you posted, the oPoints is an array of float so there seems to be a bit of a contradiction there? Anyway you have indexed vertices obviously, but you can also use non-indexed vertices. In that case

Re: [osg-users] osgText::Text darker when rendered on frame buffer

2014-07-21 Thread Bram Vaessen
I'll try the multiple viewer to see if that makes a difference. When I render a texture to the framebuffer, it seems exactly the same as when I render it to the screen, so it seems there is problem of rendering the quad to the screen, or else everything would be different. Could it be that the

Re: [osg-users] osgText::Text darker when rendered on frame buffer

2014-07-21 Thread Bram Vaessen
I'm pretty sure I found the problem, but not sure how to fix it (probably easy for someone with more openGL knowledge ;) What I do: On the canvas I first draw a full solid background. Now all the alpha values are 1. Then I draw the text on top of that background. Now the problem is: it seems

Re: [osg-users] osgText::Text darker when rendered on frame buffer

2014-07-21 Thread Bram Vaessen
It's fixed! Code: osg::ref_ptrosg::BlendFunc blendFunc = new osg::BlendFunc(osg::BlendFunc::SRC_ALPHA, osg::BlendFunc::DST_ALPHA, osg::BlendFunc::ZERO, osg::BlendFunc::ONE); label-getOrCreateStateSet()-setAttributeAndModes(blendFunc); I didn't know you could/should specify

[osg-users] osgText::Text darker when rendered on frame buffer

2014-07-20 Thread Bram Vaessen
Hi, I'm having a small issue with the osgText::Text that I can't figure out. There is difference in how bright the text looks when I compare a osgText::Text drawn on screen, and the same one, but then drawn on a framebuffer, and then (the buffer) drawn on screen. Should be exactly the same

Re: [osg-users] osgText::Text darker when rendered on frame buffer

2014-07-20 Thread Bram Vaessen
I've tried to set the global defaults on the statesets of the camera's, but that didn't help. I'll try to give give a complete list of code that is used to set up the scene: in main: Code: //screen size int screenWidth = 1280; int screenHeight = 720; // construct the

Re: [osg-users] osgText::Text darker when rendered on frame buffer

2014-07-20 Thread Bram Vaessen
Hi Trajce Nikolov NICK, I just tried it, but made no difference unfortunately... -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60366#60366 ___ osg-users mailing list

Re: [osg-users] creating HUD in seperate camera

2014-07-19 Thread Bram Vaessen
When I use the osgText:Text classes, I still get the problem that everything is very dark. I use vec4(1,0,0,1) as color, but the actual color of the text on screen is (0.309803921,0,0). Is there a good way to find out the complete stateset that is used for a certain node? That should be able

Re: [osg-users] creating HUD in seperate camera

2014-07-19 Thread Bram Vaessen
It seems the problem goes away when I remove this line: Code: rootNode-getOrCreateStateSet()-setTextureAttributeAndModes(4, noiseTexture.get() ); noiseTexture is as the name suggest a noise texture (3d texture). I suppose I can move this texture up to the appropriate node instead of

Re: [osg-users] osgText::Text and screen

2014-07-19 Thread Bram Vaessen
I had the exact same issue, but I tried to flip the view matrix as suggested, but I must be doing something wrong, because I don't see anything when I try this: Code: camera-setViewMatrix(camera-getViewMatrix() * osg::Matrixd::scale(1,-1.f,1)); Can anyone tell me the right way to flip the

Re: [osg-users] creating HUD in seperate camera

2014-07-18 Thread Bram Vaessen
I posted some code in my original post. However, the code is part of a project that I cannot post as a whole (and you probably don't want that either). Can you tell me what parts of the code you would like to see, besides the code that I pasted in my first post? Is there a way to print the

[osg-users] assume render order?

2014-07-18 Thread Bram Vaessen
Hi, I was wondering what kind of assumptions I can make about the rendering order. for example in kinda pseude code: rootnode-addChild(node1); rootnode-addChild(node2); node1-addChild(node3); node1-addChild(node4); node3-addChild(node5); would give: rootnode - node1 - node3

Re: [osg-users] [osgPlugins] Very confused about plugins

2014-07-18 Thread Bram Vaessen
Thanks Robertos and Farshid. Robertos, when I said: What are the steps that are involved in building the libraries, and loading them as plugins? I actually meant to ask this from the perspective of the 'system', and not the steps that a user has to take to make it work. This demonstrates what

Re: [osg-users] assume render order?

2014-07-18 Thread Bram Vaessen
Thanks for your quick answer! What exactly does 'sorted by state order' mean? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60334#60334 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] creating HUD in seperate camera

2014-07-17 Thread Bram Vaessen
Do you mean on the geometry object itself? I just tried that now but no change... any other ideas? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60315#60315 ___ osg-users mailing list

[osg-users] creating HUD in seperate camera

2014-07-16 Thread Bram Vaessen
Hi, I'm working on my own simple HUD/GUI system, and my idea was to use a seperate orthogonal camera for that, which is attached to the root node, and is set to post-render. It does to work so far, except that the quad that I'm drawing on screen is about 4 times more dark than it should be.

[osg-users] [osgPlugins] Very confused about plugins

2014-07-16 Thread Bram Vaessen
Hi, I'm having issues with loading png. It just says: Warning: Could not find plugin to read objects from file GUI/canvas.png. The same line replaced with .jpg works fine. I built OSG 3.2 from source some time ago (using some tutorial, and CMake and such), and I recall that I tried to enable

[osg-users] ref_ptr issue

2014-07-11 Thread Bram Vaessen
Hi, I have used the osg::ref_ptr quite a lot and never had much problems with them, but I'm having an issue with it now. In the main function I create a viewer (and also a DisplaySettings that is used by it): Code: osg::ref_ptrosgViewer::Viewer viewer = new osgViewer::Viewer();

Re: [osg-users] ref_ptr issue

2014-07-11 Thread Bram Vaessen
Thanks, your input led me to look at the gui event handler, and it turned out that one of my own classes that I made long ago (an input handler) was derived from an OSG class, but didn't use ref_ptr somewhere for that, and that messed it up somehow. fixed now :) -- Read this

[osg-users] Reusing depth buffer for render targets

2013-11-14 Thread Bram Vaessen
Hi, I'm trying to reuse a depth buffer for rendering two different passes. The first one does terrain, the second one some water surface (to another output buffer, but that's not the issue here) Based on posts from the forum I though I had it figured out but it doesn't work well. Depending on

Re: [osg-users] Reusing depth buffer for render targets

2013-11-14 Thread Bram Vaessen
Farshid, I should have been more clear about it, but that was actually my intention. The terrain and water are in the same world so i wanted to use the depth information from the terrain render to draw only visible portions of the water to the other buffer. Sebastian, I always get this error:

Re: [osg-users] Reusing depth buffer for render targets

2013-11-14 Thread Bram Vaessen
Thanks, that makes perfect sense. I didn't know it was normalized, so I just have to make sure the camera's have the same clipping planes, didn't need to increase it to 10 (my scene is much smaller than that :) The depth buffer is based on 32 bits floats right (just for my information)?

Re: [osg-users] Setting breakpoints when using osg as library

2013-11-12 Thread Bram Vaessen
Hi Sebastian, Yes I built OSG from source myself, using CMake and VC++ 2010 Express (I just followed the tutorial on this). The strange thing is: when I press f11 during debug in a call to OSG for example viewer-someFunction(), it first goes into the ref_ptr overloaded operator code, then back

Re: [osg-users] Setting breakpoints when using osg as library

2013-11-11 Thread Bram Vaessen
It's not working. I keep getting these: 'world2.exe': Loaded 'D:\world2\world2\osg100-osgViewerd.dll', Cannot find or open the PDB file I put the PDB files in the same directory as where the DLL is, under the exact name. I ALSO set the directory where the PDB files were initially created

[osg-users] Setting breakpoints when using osg as library

2013-11-10 Thread Bram Vaessen
Hi, I have a (hopefully) easy question. I have compiled osg as a library from source, using the tutorials, and now I'm using visuall c++ 2010 as development tool. Is it possible to set breakpoints in the osg sourcecode somehow? I have tried to add some projects from osg to my solution, but it

Re: [osg-users] Setting breakpoints when using osg as library

2013-11-10 Thread Bram Vaessen
Thanks, I actually do have the pbd files loaded, but I read on the page you sent that you also have to specify where vc++ looks for debug source files, so I guess I'll have to add the directories with the OSG src files. I hope I can step into osg source code in debugging then and set

Re: [osg-users] blending on multiple targets

2013-11-08 Thread Bram Vaessen
Hi, thanks for the reply! I get the undefined part, that makes sense, but what I still don't understand though: I just specify blending (GL_BLEND on) is on in the nodes. But then if I do gl_FragData[0] = vec4(0,0,0,0); then it doesn't seem to matter anymore what I write to gl_FragData[1[

Re: [osg-users] blending on multiple targets

2013-11-08 Thread Bram Vaessen
Also, Do you setup a blendfunction and activate it for the stateset? No I didn't. The thing is, I made some other shaders for a volume light, and there I just enabled blending and it worked as I expected. And to clarify what I mean with that: I thought that normal 'standard' blending

Re: [osg-users] blending on multiple targets

2013-11-08 Thread Bram Vaessen
You're mixing up source and destination. Source is the incoming color (i.e. the color written in the shader), destination the color in the buffer (i,e, what was already in the target buffer). you are right, the word destination also makes more sense then :) I asked this a while ago.

[osg-users] blending on multiple targets

2013-11-07 Thread Bram Vaessen
Hi, I ran into something weird, or something that I don't know how it works exactly. What I want to do when rendering to multiple targets is that I selectively write to certain color buffers in my shader, but leave others alone. for example Code: gl_FragData[3] = vec4(0,1,0,1); without

[osg-users] Problem with Jpeg plugin

2013-10-07 Thread Bram Vaessen
Hi, I know this has been asked before, but I could not find a decent answer in previous posts. The problem is that I compile osg, and I want to use the plugin for jpeg. Now I followed the directions exactly (I think) on the getting started sections. I downloaded the dependencies, put them in a

Re: [osg-users] HUD 2d animation

2013-07-28 Thread Bram Vaessen
I would also suggest you place all images in 1 png. In total this will save space, reduce loading times and give you less files. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55463#55463 ___

Re: [osg-users] Source files and PDB's

2013-07-03 Thread Bram Vaessen
Nobody has any information or opinion about any of this??? To clarify: I just want to be able to set a breakpoint inside OSG because all I know is that the cull visitor sometimes starts to spit out errors (when it starts seems random) and I want to trace the first error. Could anyone tell me

Re: [osg-users] Source files and PDB's

2013-06-30 Thread Bram Vaessen
On a side node: In the manual it sais you have 2 ways of using OSG in MSVC++: -as a library -placing you own code in the workspace of OSG I also use Bullet Physics, and for their code, CMake generates project files for each part of library. Then, you can simply add the necessary projects into

[osg-users] Source files and PDB's

2013-06-29 Thread Bram Vaessen
Hi, I'm trying to find a bug, and a good way to do that is to set a breakpoint in the error message that OSG generated. But.. I use the premade binaries for MSVC++ 10. So now I also downloaded the PDB's and the source files. First thing I tried is stepping into a OSG function. Now it asks for

Re: [osg-users] osg::ref ptr and memory leaks.

2013-06-07 Thread Bram Vaessen
Another idea might be to use valgrind, memory doctor or some similar program to detect actuall memory leaks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54491#54491 ___ osg-users mailing list

Re: [osg-users] Edge artifacts with multiple render targets

2013-06-05 Thread Bram Vaessen
Hi, It was casued by the 3d buffer being LINEAR_MIPMAP_LINEAR, I didn't know that was the default, and I didn't quite understand how this could cause the problem I had, until someone at the opengl forum explained that. But it was still pretty hard to understand what the GPU exactly does with

[osg-users] Edge artifacts with multiple render targets

2013-06-04 Thread Bram Vaessen
Hi, I have switched my rendering stuff to deferred rendering, and I noticed some problems around the edges of the hills in the terrain (see attached picture) I write 3 buffers: -color -normal -position (fragment position in world coordinates) I tried finding a problem in the buffers around the

Re: [osg-users] Edge artifacts with multiple render targets

2013-06-04 Thread Bram Vaessen
Does anyone know: what is the default texture filter mode (for 3d textures) when you do not explicitly set it? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54457#54457 ___ osg-users mailing list

Re: [osg-users] Spamming errors, view breaks

2013-05-27 Thread Bram Vaessen
Thanks a lot for your great help! This will help me a lot, because I do feel like my lack of knowledge of visual c++ and debugging processes is keeping me back in the whole process, and indeed I should try to take an (hopefully online) course about this. I'll try to find more information

Re: [osg-users] setNumMultiSamples on render to FBO

2013-05-27 Thread Bram Vaessen
thanks! option 3 seems to be an interesting one. I did try to search for it, but I might have been using the wrong keywords. I'll try to find more information on option 3 then! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54219#54219

[osg-users] Viewer default fov settings

2013-05-26 Thread Bram Vaessen
Hi, I recently changed from just setting up a viewer Code: viewer-setUpViewInWindow(500,300,1280,720,1); To making a custom camera, but I can't seem to get the same 'normal' view as I did in the default viewer camera. I use: osg::ref_ptrosg::Camera camera = new osg::Camera();

Re: [osg-users] Viewer default fov settings

2013-05-26 Thread Bram Vaessen
Hi, Thanks yeah, I actually had screenWidth/screenHeight there and they were correct, but were also ints I changed it to 16.f/9.f and now it seems to work. I'm still unclear about what happens if you divide ints I had int screenWidth = 1280; int screenHeight = 720; Thank you! Cheers, Bram

[osg-users] Spamming errors, view breaks

2013-05-26 Thread Bram Vaessen
Hi, I am walking around in my world and sometimes suddenly I only see an empty screen and I the console spams messages like these: CullVisitor::apply(Geode) detected NaN, depth=-1.#IND, center=(64 64 18.2729), matrix={ 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN 1.#QNAN

Re: [osg-users] Spamming errors, view breaks

2013-05-26 Thread Bram Vaessen
Thanks! I have to admit I'm not very good at the whole setting up projects and debugging frameworks. My first question would be: In my projects I do not have the actual source code in my IDE. I just include the debug libraries and header files I think. I believe I used the permade ones. Could

[osg-users] setNumMultiSamples on render to FBO

2013-05-26 Thread Bram Vaessen
When I switched from 'normal' rendering to deferred rendering (or how you call it) I noticed a difference in how it looked, while it should look the same. I believe now that it looks different because I use setNumMultiSamples Code: osg::DisplaySettings::instance()-setNumMultiSamples( 4 );

Re: [osg-users] Detecting windows focus

2013-05-14 Thread Bram Vaessen
Thanks, i will have a look at it! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54010#54010 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Detecting windows focus

2013-05-13 Thread Bram Vaessen
Ok, then at least I know that it's not in OSG then (might be a good idea to implement this?). I did notice there is a win32 implementation of the GraphicsWindow, GraphicsWindowWin32 I think, which can give the windows-handle, so I could possibly look up some win32 api calls to check this. It's

Re: [osg-users] Detecting windows focus

2013-05-13 Thread Bram Vaessen
It's really not that much of a niche. If you work with windowes graphics and poll mouse information it will continue to do so and react to it even if you are no longer working in the osg application. Most games that run in a window disable event pulling when the window is no longer active. But

[osg-users] Detecting windows focus

2013-05-12 Thread Bram Vaessen
Hi, I've been looking for a while on the forum and using google, and looking in the documentation and the code, but i can't seem to find: how can I detect if a window (osgViewer::GraphicsWindow) has lost focus? I see there is a function to GRAB focus, but isn't it possible to check whether or

[osg-users] Vec3b/Vec4b for color array problem

2013-03-25 Thread Bram Vaessen
Hi, To save some memory I am trying to use 3 unsigned bytes for the color of my vertices (they are generated) instead of the 4 floats I had before. Before it was set to Vec3Array, and now Vec3bArray. (actually last thing I tried is Vec4bArray), but I only get black colors. I'm sure I'm not

[osg-users] Slowness in custom multithreading

2013-03-25 Thread Bram Vaessen
Hi, I am porting a small project that is still in starting stages from using irrlicht to osg (because osg seems more professional) However I encountered a problem: I'm using some custom multithreading (windows thread + mutex + event), to start a second thread that handles the generation and/or