Re: [osg-users] Render to Texture and osgQt (osgQOpenGL)

2019-09-20 Thread Wouter Roos
Finally had some time to look at it in more detail and it was a problem on my side, all is working now with setting the default fbo id. I've made a pull request, thanks again for the pointer. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76724#76

Re: [osg-users] Render to Texture and osgQt (osgQOpenGL)

2019-09-16 Thread Wouter Roos
Thank you, that looks helpful. I have quickly tried implementing it but it does not seem to fix the problem I'm having, however it now does now react to keyboard inputs again, so it looks like it is a step in the right direction. I will try I bit more later today. gwaldron wrote: > Read this -

Re: [osg-users] Render to Texture and osgQt (osgQOpenGL)

2019-09-16 Thread Glenn Waldron
Read this - it might help: http://forum.osgearth.org/solved-black-screen-with-drape-mode-in-a-QOpenGLWidget-td7592420.html#a7592421 Glenn Waldron / osgEarth On Mon, Sep 16, 2019 at 2:03 PM Wouter Roos wrote: > Hi all, > I'm really struggling with getting RTT to work under the latest version

[osg-users] Render to Texture and osgQt (osgQOpenGL)

2019-09-16 Thread Wouter Roos
Hi all, I'm really struggling with getting RTT to work under the latest version of osgQt and using osgQOpenGL. I am aware of the discussion around adding the setDrawBuffer(GL_BACK) and setReadBuffer(GL_BACK) to the camera for double buffered contexts, but no matter what settings I set for the wi

Re: [osg-users] Render to texture with GL3.

2017-05-23 Thread Nickolai Medvedev
I found problem. HUD-Camera does not work when i create OpenGL 3.3 core context. Only clear color is visible. If not create context, all is worked. Code: const int width(1920), height(1080); const std::string version("3.3"); osg::ref_ptr< osg::GraphicsContext::Traits > traits = new osg::Graph

Re: [osg-users] Render to texture with GL3.

2017-05-23 Thread Nickolai Medvedev
Hi, Robert. All right, now i see. Probably, something wrong with my code. I'm use new OSG 3.5.6, trying to port deferred renderer with light system to OpenGL 3.3. Thank you for your answer. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70964#709

Re: [osg-users] Render to texture with GL3.

2017-05-23 Thread Robert Osfield
HI Nickolai, There are no differences between RTT setup in the OSG for GL2 and GL3, or any other GL/GLES combinations for that matter. The osgprerender or osgprerendercubemap examples are decent places to start to learn what you need to do. Robert. On 23 May 2017 at 11:33, Nickolai Medvedev wr

[osg-users] Render to texture with GL3.

2017-05-23 Thread Nickolai Medvedev
Hi, community! How to correctly create a render to texture in GL3 context? What is the difference between RTT GL2 and GL3 in OSG. Thank you! Cheers, Nickolai -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70962#70962

Re: [osg-users] Render to texture ONLY?

2016-08-18 Thread Christian Buchner
One more thing: Rendering to a pbuffer does not automatically give you the option to access your rendered content as a texture. The technique to render to texture with pbuffers is called pbuffer-rtt and implemented in several OSG samples with the " *--pbuffer-rtt" command line option.* *This may

Re: [osg-users] Render to texture ONLY?

2016-08-18 Thread Christian Buchner
On Windows, create a graphics context with the pbuffer flag set to true and windowDecoration set to false. osg::ref_ptr traits = new osg::GraphicsContext::Traits; traits->x = 0; traits->y = 0; traits->width = 640; traits->height = 480; traits->red =

Re: [osg-users] Render to texture ONLY?

2016-08-18 Thread Chris Thomas
Hi, OK, I based my initial integration into my app on osgteapot.cpp. As with all the other examples, it os run via viewer.run(); And this creates an output window in OSX (and I am assuming any other OS its run on). And thats the issue I have, I need OSG to run "headless", that is to say, prod

Re: [osg-users] Render to texture ONLY?

2016-08-18 Thread Nickolai Medvedev
Hi, https://github.com/xarray/osgRecipes Chapter 6 - it's all what you need. Cheers, Nickolai -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68418#68418 ___ osg-users mailing list osg-users@lists.

Re: [osg-users] Render to texture ONLY?

2016-08-18 Thread Sebastian Messerschmidt
Hi Chris, Take a look at the osgprerender example. It shows you how to render to a framebuffer object. The bound texture can be used to be displayed later on. Cheers Sebastian Hi, I have an existing app I am developing, which itself is based on OpenGL. It uses an API that provides a 3D win

Re: [osg-users] Render to texture ONLY?

2016-08-18 Thread Christian Buchner
have a look at the osgprerender example. That one renders to texture first, and then uses the contents of this texture for rendering to screen. The osgscreencapture and osgposter examples also have options to render off-screen to FBO or pbuffers. 2016-08-18 13:19 GMT+02:00 Chris Thomas : > Hi,

[osg-users] Render to texture ONLY?

2016-08-18 Thread Chris Thomas
Hi, I have an existing app I am developing, which itself is based on OpenGL. It uses an API that provides a 3D windowing system, with different media being displayed on planes, within this 3D space. All good... Except, its API does not offer anything near the flexibility, and ease of use of OS

Re: [osg-users] Render to Texture without clamping values

2016-06-14 Thread Philipp Meyer
Hi, I was able to figure out the issue. For everyone wondering, I was missing the following line: textureImage->setInternalTextureFormat(GL_RGBA16F_ARB); In other words, one needs to set the format on the image as well as on the texture for everything to work properly. Hope this helps someone i

Re: [osg-users] Render to Texture without clamping values

2016-06-14 Thread Philipp Meyer
Hi, I did some more testing and it turns out that I can set a texel to a color with values > 1.0 just fine in the C++ code. When using image->setColor(osg::Vec4(1,2,3,4),x,y,0) before reading it with getColor, I can get results > 1.0. Does that mean that the shader itself is clamping the values

[osg-users] Render to Texture without clamping values

2016-06-13 Thread Philipp Meyer
Hi, for my current project I need to do some computations in the fragment shader and retrieve the values within my application. For that I am using the render to texture feature together with a float texture. I'm having some trouble reading values > 1.0 though. It seems like the values are get

Re: [osg-users] Render to texture race condition

2015-02-23 Thread Robert Osfield
On 23 February 2015 at 13:09, Nicolas Baillard wrote: > > robertosfield wrote: > > The OSG doesn't mutex lock GL objects for a single context as the costs > would be prohibitive, and it's only required for shared contexts usage so > it's not a penalty that is worth paying. > > If I didn't use ren

Re: [osg-users] Render to texture race condition

2015-02-23 Thread Nicolas Baillard
robertosfield wrote: > The OSG doesn't mutex lock GL objects for a single context as the costs would > be prohibitive, and it's only required for shared contexts usage so it's not > a penalty that is worth paying. If I didn't use render to texture at all (or if I didn't try to share the genera

Re: [osg-users] Render to texture race condition

2015-02-23 Thread Robert Osfield
Hi Nicolas, On 23 February 2015 at 09:35, Nicolas Baillard wrote: > By "sharing of GL objects between contexts" I assume you mean the > sharedContext member of the GraphicsContext::Traits structure correct ? > Yes, this is how one sets up shared contexts. This means you'll need to run SingleT

Re: [osg-users] Render to texture race condition

2015-02-23 Thread Nicolas Baillard
Thank you Robert. By "sharing of GL objects between contexts" I assume you mean the sharedContext member of the GraphicsContext::Traits structure correct ? I do set this member for all my contexts. If I don't set it then my windows don't display the texture generated by my master camera, they d

Re: [osg-users] Render to texture race condition

2015-02-23 Thread Robert Osfield
Hi Nicolas, The OSG by default will use separate OpenGL objects and associated buffers for each graphics context. If you enable sharing of GL objects between contexts then you'll need to run the application single theaded to avoid these shared GL objects and associated buffers being contend. If

[osg-users] Render to texture race condition

2015-02-23 Thread Nicolas Baillard
Hello everyone. I have a view with a master camera rendering to a texture. Then I have two slave cameras that display this texture into two different windows (so two different rendering contexts). When I use the DrawThreadPerContext threading model I get a crash into Texture::TextureObjectSet::

Re: [osg-users] Render to texture,processing, make it displayed

2014-07-02 Thread Solkar Graphics
wwwanghao wrote: > I use the Render to texture method to get a float image, then I need to > process the image to make the data is in the range of 0-255 I'm not sure I understand the why, but anyway - How did you customize the image you render to? That's likely in the vicinity of Code: pCam-

Re: [osg-users] Render to texture,processing, make it displayed

2014-06-30 Thread LearningOSG LearningOSG
hello hao, following code frame mybe will help you: osg::Image* p_image ; p_image= your image adress; int width = p_image->s(); int height = p_image->t(); int totalbytes = width * height * 4; // Directly copy osg image buffer to your memptr; memptr= your allocated

[osg-users] Render to texture,processing, make it displayed

2014-06-27 Thread Hao Wang
Hi, I use the Render to texture method to get a float image, then I need to process the image to make the data is in the range of 0-255, after that I want to display the image. But I don't know how to handle it,is there anyone know how do it? Thank you. Thank you! Cheers, Hao

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Sebastian Messerschmidt
If I use #version 150 compatibility, do I still have to explicitly do the in out specifications, such as declaring out gl_FragColor in the frag shader? No, as I already said: You can use the old syntax and mix it with the new one. You absolutely don't have to use the layout, in, out things in th

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Sebastian Messerschmidt
Sorry Ethan, Personally I try to take the profile which doesn't require the extension. Simply go ahead an try. Concerning your other question: Please check the web for answers. The OpenGL/GLSL Specification is freely available and there might be some tutorials for this. For reference I use: h

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Ethan Fahy
Also, is there any good reason to use #version 150 compatibility vs using #version 120 and using the extension required to use geometry shaders other than using #version 150 compatibility is more forward looking syntactically? -- Read this topic online here: http://forum.openscen

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Ethan Fahy
If I use #version 150 compatibility, do I still have to explicitly do the in out specifications, such as declaring out gl_FragColor in the frag shader? SMesserschmidt wrote: > Hi Ethan, > > > Hello Sebastian, > > I read up on the differences between glsl 1.2 and 1.5 and then scimmed > > thro

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Sebastian Messerschmidt
Hi Ethan, Hello Sebastian, I read up on the differences between glsl 1.2 and 1.5 and then scimmed through the official GLSL 1.5 specification document. I then grepped the osg src and examples directories to see if I could find any #version 150 shaders (I could not). Are there any reference/e

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Ethan Fahy
Hello Sebastian, I read up on the differences between glsl 1.2 and 1.5 and then scimmed through the official GLSL 1.5 specification document. I then grepped the osg src and examples directories to see if I could find any #version 150 shaders (I could not). Are there any reference/example imple

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Sebastian Messerschmidt
Hi Ethan, Thanks again, it looks like I need to get up to speed with using "in" and "out" vs attribute and varying since I cut my teeth on older tutorials and apparently attribute and varying are officially deprecated and are supported through compatibility mode. I'm not used to needing histo

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Ethan Fahy
Thanks again, it looks like I need to get up to speed with using "in" and "out" vs attribute and varying since I cut my teeth on older tutorials and apparently attribute and varying are officially deprecated and are supported through compatibility mode. I'm not used to needing historical contex

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Sebastian Messerschmidt
Hi Ethan Thanks Sebastian, I have in fact looked through every geometry shader tutorial I could find and have tried to implement a simple pass-through sahder identical to the one you posted, but when I add the geometry shader I just get a black screen with no OpenGL error messages, and if I r

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Ethan Fahy
Thanks Sebastian, I have in fact looked through every geometry shader tutorial I could find and have tried to implement a simple pass-through sahder identical to the one you posted, but when I add the geometry shader I just get a black screen with no OpenGL error messages, and if I remove the g

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-19 Thread Sebastian Messerschmidt
Hi Ethan, Thanks, that makes sense that it would just be rendering a quad and that the original scene geometry would be lost. However, the GLSL geometry shader only accepts primitives of the type point, line, or triangle->is it perhaps rendering two triangles to the geometry shader to make

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-18 Thread Sebastian Messerschmidt
thanf...@gmail.com > Date: Mon, 18 Nov 2013 16:50:53 +0100 > To: osg-users@lists.openscenegraph.org > Subject: Re: [osg-users] Render-To-Texture GLSL program question > > Thanks, that makes sense that it would just be rendering a quad and that the original scene geometry would be

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-18 Thread WillScott
ertex in the vertex shader totally about primitives such as triangles, lines ,points? Or about the whole surface that is assembled by primitives? > From: ethanf...@gmail.com > Date: Mon, 18 Nov 2013 16:50:53 +0100 > To: osg-users@lists.openscenegraph.org > Subject: Re: [osg

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-18 Thread Ethan Fahy
Thanks, that makes sense that it would just be rendering a quad and that the original scene geometry would be lost. However, the GLSL geometry shader only accepts primitives of the type point, line, or triangle->is it perhaps rendering two triangles to the geometry shader to make up the quad?

Re: [osg-users] Render-To-Texture GLSL program question

2013-11-18 Thread Sebastian Messerschmidt
Am 18.11.2013 15:32, schrieb Ethan Fahy: Hello, Preface: I realize this question comes about because I've never really learned OpenGL/GLSL from the ground up and am likely missing some simple concepts, but I mostly have been coasting by at the osg middleware level and have been doing OK so fa

[osg-users] Render-To-Texture GLSL program question

2013-11-18 Thread Ethan Fahy
Hello, Preface: I realize this question comes about because I've never really learned OpenGL/GLSL from the ground up and am likely missing some simple concepts, but I mostly have been coasting by at the osg middleware level and have been doing OK so far. If I want to do some simple post-proces

Re: [osg-users] Render to texture and write image to file.

2012-10-13 Thread Peterakos
Ok found it... I just had to write to image in post camera callback... nothing more. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-25 Thread Christian Rumpf
robertosfield wrote: > Hi Christian, > > thank you > > Have a look at the osgdistortion example. > > Robert. > > On 25 June 2012 11:20, Christian Rumpf <> wrote: > > > Hey again. As I posted before I managed to render to texture a scene and > > projected it onto a Geometry. But it is just an

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-25 Thread Robert Osfield
Hi Christian, Have a look at the osgdistortion example. Robert. On 25 June 2012 11:20, Christian Rumpf wrote: > Hey again. As I posted before I managed to render to texture a scene and > projected it onto a Geometry. But it is just an image of a scene and the RTT > camera can't move around my

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-25 Thread Christian Rumpf
Hey again. As I posted before I managed to render to texture a scene and projected it onto a Geometry. But it is just an image of a scene and the RTT camera can't move around my object ("cessna.osg"). Is there a way to move the camera freely around like you would do with viewer's camera? lg Ch

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-11 Thread Christian Rumpf
No need anymore, Robert. I finally a homepage which explains everything about render to texture: http://beefdev.blogspot.de/2012/01/render-to-texture-in-openscenegraph.html It really helped me, and I finally could load my shader files with texture as uniform sampler2D. Nevertheless thank you ve

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-11 Thread Robert Osfield
Hi Christian, I'm afraid I do have time to walk you through the baby steps of this type of problem. The OSG has lots of examples, there are several books, lots of resources you can call upon to learn about the OSG. Robert. On 11 June 2012 16:26, Christian Rumpf wrote: > This really sounds help

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-11 Thread Christian Rumpf
This really sounds helpful, Robert, but for some reason this examples you recommended aren't understandable for me. They all tells about reflecting, printing it into a flag and so on. isn't there an example which just renders a single node, a single box or something else into a texture and proje

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-07 Thread Robert Osfield
Hi Christian, You simply need to create a geometry and assign the RTT Texture to via a StateSet and then render this as part of the main scene graph. Have a look at the osgprerender or osgdistortion examples. Robert. On 7 June 2012 20:52, Christian Rumpf wrote: > Hey! > > I read nearly everyth

[osg-users] Render to texture, display pre-rendered scene

2012-06-07 Thread Christian Rumpf
Hey! I read nearly everything about render to texture techniques and what you can do with them, but not how to SIMPLY display it. My intention is to pre-render the scene into a texture and sending this texture into my fragment shader (GLSL) to simulate blur effects. But before I can do this sh

[osg-users] Render to texture with shaders

2012-05-24 Thread Joel Graff
Hi, I've run into a problem which I suspect is just a gap in my understanding of osg and RTT. Nevertheless, I'm a bit stumped. My goal is to do a small RTT test where I take a source texture, render it to a quad using an RTT camera and then apply the output to another quad. In other words, I

Re: [osg-users] Render to Texture Question for Integrating Vendor's Flash Renderer

2011-06-06 Thread Wang Rui
Hi Glen, Have a glimpse of the osgXI project on sourceforge.net. It has an osgFlash absolute layer and two different implementations using Scaleform and gameswf, written by one of my cooperators. It is not written in a uniform format at present so you may have to ignore many Chinese comments in th

Re: [osg-users] Render to Texture Question for Integrating Vendor's Flash Renderer

2011-06-06 Thread Glen Swanger
Robert, Just what I was looking for...Thanks! I do have a prototype working using an RTT camera which updates a texture on an object in the scene. On your suggestion about minding the state, it did take me a while to work through the interaction between OSG and Scaleform on the state since Sca

Re: [osg-users] Render to Texture Question for Integrating Vendor's Flash Renderer

2011-06-06 Thread Robert Osfield
Hi Glen, Thanks for the explanation about Scaleform. Given that it's doing OpenGL calls for you you'll need to be mindful of the effect of OSG state on Scalform and visa-versa. The issues of integration of 3rd party OpenGL codes with the OSG is something that has been disucssed a number of times

Re: [osg-users] Render to Texture Question for Integrating Vendor's Flash Renderer

2011-06-06 Thread Glen Swanger
Thanks Robert for taking the time to reply. Also, I want to say thanks to you and other main developers of OSG, because I have found OSG quite easy to work with so far. I haven’t had to post to the forum thus far because of the learning environment that the forum content has provided, along wi

Re: [osg-users] Render to Texture Question for Integrating Vendor's Flash Renderer

2011-06-04 Thread Robert Osfield
Hi Glen, The solution you are explaining sounds far too complicated for what is actually needed. I can't see why a pre-render FBO camera would be required, unless Scaleform is using OpenGL. The normal way to implement video textures with the OSG is to subclass from osg::ImageStream as the ffmpeg

[osg-users] Render to Texture Question for Integrating Vendor's Flash Renderer

2011-06-04 Thread Glen Swanger
Hi, I have some questions concerning the best approach to update textures using a pre-render FBO camera. First I want to provide a little background before my questions. For the project I'm working on I've been integrating a 3rd party vendor product (Scaleform) into OpenSceneGraph to pre-ren

Re: [osg-users] Render to texture for IPhone

2011-03-01 Thread Tang Yu
Hi, Stephan and Sergey Thank you for your helps!!! Finally i got a good fps on my iphone4 according to your advices. It is so great!!! Now I can go on working on my mobile AR project. Appreciate you very much again! Cheers, Tang -- Read this topic online here: http://forum.opens

Re: [osg-users] Render to texture for IPhone

2011-03-01 Thread Stephan Huber
Hi Tang, just some tips: * disable the autoresizing of NPOT-images via texture->setResizeNonPowerOfTwoHint(false); * set the internal format of the image to GL_RGBA and the format of the image to GL_BGRA, so the conversion is done by hardware/driver. image->setInternalTextureFormat(GL_RGBA); im

Re: [osg-users] Render to texture for IPhone

2011-03-01 Thread Sergey Polischuk
Hi, Tang Camera frame texture is likely to be not power of two size. Osg by default resize textures to be power of two size, this can take a lot of time each frame in your case. You can disable resizing by calling setResizeNonPowerOfTwoHint(false) on your texture. Also use linear filtering as s

Re: [osg-users] Render to texture for IPhone

2011-03-01 Thread Tang Yu
hi, Sergey, Thank you for your help. I used Texture2D, not use mipmap. I need to render the camera frame to the whole size of viewer. Do you think it will improve my program's efficiency to use mipmap? TANG hybr wrote: > Hi, Tang > > First thing that comes to mind - check if you disabled resizi

Re: [osg-users] Render to texture for IPhone

2011-02-28 Thread Sergey Polischuk
Hi, Tang First thing that comes to mind - check if you disabled resizing of non power of two textures on texture with image from camera, as well as mipmap generation. Cheers, Sergey. 28.02.2011, 13:30, "Tang Yu" : > Hi, > > I also met the same question about rendering to texture on iphone. I tr

Re: [osg-users] Render to texture for IPhone

2011-02-28 Thread Stephan Huber
Hi, Am 28.02.11 11:30, schrieb Tang Yu: > I also met the same question about rendering to texture on iphone. I tried to > render the video frame, captured from iphone's camera continually, as 2D > texture of the viewer's background, but the speed is very slowly. > How can i fix it? Without see

Re: [osg-users] Render to texture for IPhone

2011-02-28 Thread Tang Yu
Hi, I also met the same question about rendering to texture on iphone. I tried to render the video frame, captured from iphone's camera continually, as 2D texture of the viewer's background, but the speed is very slowly. How can i fix it? Thank you for your any help! Cheers, Tang ---

Re: [osg-users] Render To Texture

2011-02-18 Thread Dietmar Funck
Hi Sergey, your proposal works very well. Thank you very much, Dietmar Funck hybr wrote: > Hi, Dietmar Funck. > > In order to get another texture attached you can use something like > > > _cam->setCullCallback( new fboAttachmentCullCB( this ) ); > > void fboAttachmentCullCB::operator()(osg:

Re: [osg-users] Render To Texture

2011-02-18 Thread Dietmar Funck
Hi Phummipat, I think it is not intended that within first viewer.frame() a statement causes an abort of viewer.frame(). However most people call viewer.frame() in a loop and wouldn't notice it at all. Best regards. Dietmar Funck pumdo575 wrote: > Hi Dietmar Funck > > Thank you very much for

Re: [osg-users] Render To Texture

2011-02-16 Thread Sergey Polischuk
Hi, Dietmar Funck. In order to get another texture attached you can use something like _cam->setCullCallback( new fboAttachmentCullCB( this ) ); void fboAttachmentCullCB::operator()(osg::Node* node, osg::NodeVisitor* nv) { osg::Camera* fboCam = dynamic_cast( node ); osgUtil::CullVis

Re: [osg-users] Render To Texture

2011-02-16 Thread Pumipat Doungklang
Hi Dietmar Funck Thank you very much for your reply. Do you mean, the first viewer.frame() is used for initialization that why nothing is rendered in the first frame ?. Best regards, Phummipat On Wed, Feb 16, 2011 at 2:48 PM, Dietmar Funck < dietmar.fu...@student.hpi.uni-potsdam.de> wrote: > Hi

Re: [osg-users] Render To Texture

2011-02-16 Thread Dietmar Funck
Hi, I noticed the problem with first call of viewer.frame() too. This is happens. because meanwhile the viewer initialization - which is called by first call of viewer.frame() - a call to glGetString (SceneView::init() -> osg::isGLExtensionSupported(_renderInfo.getState()->getContextID(),"");

[osg-users] Render To Texture

2011-02-16 Thread Pumipat Doungklang
Hi everyone, I have some question about render to texture. The code that I give below is work but I have some question. 1. Why I have to use viewer.frame() for 2 time for working ?. If I use viewer.frame() just one time it doesn't work. The written image show just bank screen. 2. How to run view

Re: [osg-users] Render To Texture is very slow

2011-02-02 Thread Martin Großer
renka > An: OpenSceneGraph Users > Betreff: Re: [osg-users] Render To Texture is very slow > Hi Martin, > > Am 02.02.2011 14:35, schrieb "Martin Großer": > > Hello David, > > > > So I use the FRAME_BUFFER_OBJECT and I have a NVIDIA GTX 470 grafics > card. > &

Re: [osg-users] Render To Texture is very slow

2011-02-02 Thread Peter Hrenka
Hi Martin, Am 02.02.2011 14:35, schrieb "Martin Großer": Hello David, So I use the FRAME_BUFFER_OBJECT and I have a NVIDIA GTX 470 grafics card. I tried the osgprerendercubemap, but I cannot print out the frame rate. Additionally I tried the osgprerender example and I get a frame rate of arou

Re: [osg-users] Render To Texture is very slow

2011-02-02 Thread Martin Großer
Nachricht > Datum: Wed, 2 Feb 2011 13:56:09 +0100 > Von: David Callu > An: OpenSceneGraph Users > Betreff: Re: [osg-users] Render To Texture is very slow > Hi Martin > > > What is your Hardware/Software configuration? > Which osg::Camera::Rende

Re: [osg-users] Render To Texture is very slow

2011-02-02 Thread David Callu
Hi Martin What is your Hardware/Software configuration? Which osg::Camera::RenderTargetImplementation did you use in your code ? Try the osgprerendercubemap example to test performance of your hardware. HTH David Callu 2011/2/2 "Martin Großer" > Hello, > > I would like use render to texture

[osg-users] Render To Texture is very slow

2011-02-02 Thread Martin Großer
Hello, I would like use render to texture in every render step. My texture resolution is 2048 x 2048 and it is very slow. There are tipps and tricks to speed up the render to texture? With 2048 x 2048 I get around 15 FPS and with 1024 x 1024 I get 45 FPS. Thanks Martin -- Neu: GMX De-Mail -

Re: [osg-users] Render to texture 3D

2010-12-23 Thread Julien Valentin
Thanks a lot ! It works :D Frederic Bouvier wrote: > I used > camera->setImplicitBufferAttachmentMask( > osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT, > osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT ); > > to avoid having a depth buffer attached. > > HTH > Regards, > -Fred > > > -

Re: [osg-users] Render to texture 3D

2010-12-21 Thread Frederic Bouvier
I used camera->setImplicitBufferAttachmentMask( osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT, osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT ); to avoid having a depth buffer attached. HTH Regards, -Fred - "Julien Valentin" a écrit : > Thank for your answer: > I've manage to make it wor

Re: [osg-users] Render to texture 3D

2010-12-21 Thread Julien Valentin
Thank for your answer: I've manage to make it work in pure GL3 without osg and see that your tweak in osg is the right thing to do. However it always doesnt work.. here are the different GL call for fbo creation for 2 case: -working case (only one slice) cam->attach( osg::Camera::COLOR_BUFFER0,t

Re: [osg-users] Render to texture 3D

2010-12-20 Thread Frederic Bouvier
Hi Julien, It's me that submitted this change at http://www.mail-archive.com/osg-submissions@lists.openscenegraph.org/msg05568.html It's hard to tell what's going wrong without the full code of your camera setup. In http://www.opengl.org/registry/specs/ARB/geometry_shader4.txt error 0x8da8 refers

Re: [osg-users] Render to texture 3D

2010-12-19 Thread Robert Osfield
Hi Julien, I haven't personally tested this feature yet, but having merged the submissions I know that the FACE_CONTROLLED_BY_GEOMETRY_SHADER control is only available on recent hardware and drivers so check whether this feature is available on your hardware. Robert. On Sat, Dec 18, 2010 at 7:19

[osg-users] Render to texture 3D

2010-12-18 Thread Julien Valentin
Hi, I'm trying to make efficient fluid simulation with osg I've just found this page : http://www.mail-archive.com//msg05568.html It look pretty great as my 1 camera per slice code is very CPU time consuming. I develop a geometry shader that change gl_layer value per primitive. It work so i chang

Re: [osg-users] Render to Texture

2010-12-15 Thread Sajjadul Islam
Hi Delport, I am getting the several pass with the chain effect within the dynamic scene. But the scene freezes after the third pass. And the scene remains frozen(i mean the animation), i can only see the blurred scene. What should i look into to debug this? Thanks for all the useful hint yo

Re: [osg-users] Render to Texture

2010-12-14 Thread J.P. Delport
Hi, sorry, I can't quite follow the code, but do something like this: input_texture -> ProcessPass[0] -> Out[0] Out[0] -> Process[1] -> Out[1] Out[1] -> Process[2] -> Out[2] Just make a chain... Depending on how many passes you have enables, view one of the Out[] textures. jp On 15/12/10 0

Re: [osg-users] Render to Texture

2010-12-14 Thread Sajjadul Islam
Hi Delport, I have added one more pass branch to the graph and i can see a new behavior. The code snippet for it as follows: ***' //the first pass in the scene, with the key press the following do the blur on the initial

Re: [osg-users] Render to Texture

2010-12-14 Thread J.P. Delport
Hi, in the case of osggameoflife, the state of a single "image" is updated during every call to viewer.frame(). In other words the processing starts with a single state and this is updated - the input in not dynamic. The flip flop is only used because one cannot read from and write to the sam

Re: [osg-users] Render to Texture

2010-12-14 Thread Sajjadul Islam
Hi Delport , Is something like happening in osggameflife without adding the pass in the scenegraph? Please correct me if i m wrong. They have multiple pass and they are are just flip flop the two output textures ... Thank you! Cheers, Sajjadul -- Read this topic online here

Re: [osg-users] Render to Texture

2010-12-14 Thread J.P. Delport
Hi, you cannot make loops in the graph, so the more passes you need, the more passes you will have to insert into the scene graph. jp On 14/12/10 13:53, Sajjadul Islam wrote: Hi Delport, Thanks for the support. At least i have a little bit of improvement. I can go upto second pass that mak

Re: [osg-users] Render to Texture

2010-12-14 Thread Sajjadul Islam
Hi Delport, I am attaching the code i put inside the keyboard handler. I believe it will provide you with more insight to suggest. ' class BlurPassHandler : public osgGA::GUIEventHandler { public: BlurPassHandler(int key,BlurPa

Re: [osg-users] Render to Texture

2010-12-14 Thread Sajjadul Islam
Hi Delport, Thanks for the support. At least i have a little bit of improvement. I can go upto second pass that makes the burred scene blurrer. 1. Initial scene - No blur effect. 2. First key press - Shader activated and scene blurred and scene is visualized. 3. Second key press - the scene is e

Re: [osg-users] Render to Texture

2010-12-13 Thread J.P. Delport
Hi, On 13/12/10 19:25, Sajjadul Islam wrote: Hi Delport, I am sorry that i did not get much from your last reply asking how am i changing the texture when i switch the branches. Do i have to explicitly specify the texture? Even it is i believe that it is done as follows: stateset->setTexture

Re: [osg-users] Render to Texture

2010-12-13 Thread J.P. Delport
Hi, On 14/12/10 02:46, Sajjadul Islam wrote: Hi Delport, I have created a new class inherating the osg::Drawable::UpdateCallback. The class structure is as follows: *' class BlurCallback : public osg::Drawable::Update

Re: [osg-users] Render to Texture

2010-12-13 Thread Sajjadul Islam
Hi Delport, I have created a new class inherating the osg::Drawable::UpdateCallback. The class structure is as follows: *' class BlurCallback : public osg::Drawable::UpdateCallback { public: BlurCallback(BlurPass *b

Re: [osg-users] Render to Texture

2010-12-13 Thread Sajjadul Islam
Hi Delport, I am sorry that i did not get much from your last reply asking how am i changing the texture when i switch the branches. Do i have to explicitly specify the texture? Even it is i believe that it is done as follows: stateset->setTextureAttributeAndModes(0, bp->getOutputTexture().get

Re: [osg-users] Render to Texture

2010-12-13 Thread J.P. Delport
Hi, On 13/12/10 12:26, Sajjadul Islam wrote: Hi Delport, Reasons for rendering the scene to two textrues With key press event i may want to show the texture using the HUD that have not gone through any operation. If i do any post processing on the texture the initial texture value is lost. I w

Re: [osg-users] Render to Texture

2010-12-13 Thread Sajjadul Islam
Hi Delport, Reasons for rendering the scene to two textrues With key press event i may want to show the texture using the HUD that have not gone through any operation. If i do any post processing on the texture the initial texture value is lost. I want to preserve it. This is why i render the

Re: [osg-users] Render to Texture

2010-12-13 Thread J.P. Delport
Hi, On 13/12/10 10:15, Sajjadul Islam wrote: Hi Robert& Delport, I have the setup with 4 cameras: 1st camera - the slave camera that inherit the master camera's relative frame and render the scene to 2 textures with color attachments. One of the texture remains as it is and other texture is l

Re: [osg-users] Render to Texture

2010-12-13 Thread Sajjadul Islam
Hi Robert & Delport, I have the setup with 4 cameras: 1st camera - the slave camera that inherit the master camera's relative frame and render the scene to 2 textures with color attachments. One of the texture remains as it is and other texture is left for further operation. 2. 2nd camera - th

Re: [osg-users] Render to Texture

2010-12-12 Thread J.P. Delport
Hi, On 12/12/10 12:58, Sajjadul Islam wrote: Hello forum, a scene is rendered to a texture. Is that ok to render to the same texture by another camera? yes, you can render to the same texture from multiple cameras. What you should avoid is reading and writing to the same texture in the same

  1   2   3   >