Re: [osg-users] Use OSG with an existing renderer in OpenGL ES

2016-11-22 Thread Chris Hanson
Fabien, if you want someone do do a custom implementation of that sort of
thing, we can be hired to do so. ;)

On Mon, Nov 21, 2016 at 7:27 AM, Riccardo Corsi 
wrote:

> Hi Fabien,
>
> in your situation the approach suggested by Chris is certainly the most
> promising.
> Create a second GL context (shared), render everything you need to with
> osg in the second context to an FBO target and have Qt retrieve the fbo's
> texture content, to display it in one of its widgets/primitives.
> This way you don't need to know which GL states Qt/qml uses and/or
> modifies and you're sure neither qml nor osg rendering will be corrupted.
>
> You can find a sample integration I wrote some times ago here:
> https://github.com/rickyviking/qmlosg
> and a more recent example here: https://github.com/podsvirov/osgqtquick
>
> Ricky
>
>
> On Mon, Nov 21, 2016 at 11:52 AM, Robert Osfield  > wrote:
>
>> On 21 November 2016 at 09:12, Fabien Boco  wrote:
>> > This is why I'm looking for an OpenGL ES alternative for
>> glPush/PopAttrib which works fine on the Windows version application.
>>
>>
>> The alternative to using glPush/glPop on the OSG would be to dirty the
>> associated modes and attributes that are tracked in osg::State.  In
>> osg::State there are series of haveApplied*() methods to help with
>> tell the OSG's state tracking mechanism something has externally
>> changed.  This requires you to know what modes and attributes will
>> have been changed by the 3rd party code so it's not an easy
>> alternative to glPush/glPop.
>>
>> Personally I find Qt's approach of changing GL state problematic, I
>> much prefer windowing libraries to just create a graphics context and
>> leave GL work entirely to dedicated graphics libraries.
>>
>> Robert.
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Code Forensics • Digital Imaging • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to render the image without reducing its size.?

2016-11-22 Thread Bruno Oliveira
You should split your image in tiles!

2016-11-22 14:23 GMT+00:00 Uma Devi Selvaraj :

> Hi,
>
>Thank you all for the reply.
> ...
>
> Thank you!
>
> Cheers,
> Uma
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69474#69474
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to render the image without reducing its size.?

2016-11-22 Thread Uma Devi Selvaraj
Hi,

   Thank you all for the reply.
... 

Thank you!

Cheers,
Uma

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





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


Re: [osg-users] How to render the image without reducing its size.?

2016-11-22 Thread Robert Osfield
Hi Uma,

Given you are using texture->setResizeNonPowerOfTwoHint(false); there
isn't any need to try TextureRectangle.

Given the resize of the largest axis to 4096 it's very likely that you
are hitting up against the driver/hardwares maximum texture size.
There is nothing you can do to increase this beyond upgrading your
hardware.

The OSG_MAX_TEXTURE_SIZE env var setting only clamps the maximum
texture size is this value is lower than the max texture size reported
by the driver so won't help you.

Robert.

On 22 November 2016 at 12:58, Uma Devi Selvaraj  wrote:
> Hi,
>
>I have simple code that renders image using osgviewer. I am able to render 
> the image successfully with the code. My problem now is the size of the image 
> is reduced. for example the original size of the image is 4683 * 3035, the 
> image is reduced to 4096 * 3035. Is this expected behaviour or is there 
> anything I need to add in my code. I have added my code.
>
>
> //required header files
>
> int main(int argc,char**argv)
> {
>
> osg::ref_ptr image;
> image = 
> osgDB::readImageFile("C:\\Users\\mcw\\Desktop\\DemModel.tif.gdal");
> std::cout << "Image info are " << image->s() << "\n"  <<"\n"  if (!(image.valid()))
> {
> std::cout << "Unable to read image file " << std::endl;
> getchar();
> return 0;
> }
>
> osg::ref_ptr geode =(osg::createGeodeForImage(image));
>
> osg::Texture2D *texture = new osg::Texture2D();
> texture->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
> texture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
> texture->setWrap(osg::Texture::WRAP_R, osg::Texture::REPEAT);
> texture->setResizeNonPowerOfTwoHint(false);
> texture->setImage(image);
> texture->setBorderColor(osg::Vec4d(0.4f, 0.5f, 0.6f, 1.0f));
> osg::StateSet* stateset = new osg::StateSet;
>
> stateset->setTextureAttributeAndModes(0, texture, 
> osg::StateAttribute::ON);
>
> geode->setStateSet(stateset);
> osgViewer::Viewer viewer;
> viewer.setSceneData(geode.get());
> getchar();
> return viewer.run();
>
> }
>
> ...
>
> Thank you!
>
> Cheers,
> Uma
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69470#69470
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to render the image without reducing its size.?

2016-11-22 Thread Trajce Nikolov NICK
Hi Uma,

you can use TextureRectangle instead of Texture2D. Then your UV mapping is
in the range of s:0-imageWidth, t:0-imageHeight and the image will preserve
its original size

On Tue, Nov 22, 2016 at 2:06 PM, Christian Buchner <
christian.buch...@gmail.com> wrote:

>
> Your OpenGL implementation might signal a maximum texture size of 4096.
>
> Which is why there is no alternative to downsizing it.
>
> There is also an OSG_MAX_TEXTURE_SIZE environment variable. I am not sure
> what its default value is, or if it has a default at all. Have you tried
> forcing this to 8192?
>
> Christian
>
>
>
> 2016-11-22 13:58 GMT+01:00 Uma Devi Selvaraj :
>
>> Hi,
>>
>>I have simple code that renders image using osgviewer. I am able to
>> render the image successfully with the code. My problem now is the size of
>> the image is reduced. for example the original size of the image is 4683 *
>> 3035, the image is reduced to 4096 * 3035. Is this expected behaviour or is
>> there anything I need to add in my code. I have added my code.
>>
>>
>> //required header files
>>
>> int main(int argc,char**argv)
>> {
>>
>> osg::ref_ptr image;
>> image = osgDB::readImageFile("C:\\Users\\mcw\\Desktop\\DemModel.tif.
>> gdal");
>> std::cout << "Image info are " << image->s() << "\n" > <<"\n" > if (!(image.valid()))
>> {
>> std::cout << "Unable to read image file " << std::endl;
>> getchar();
>> return 0;
>> }
>>
>> osg::ref_ptr geode =(osg::createGeodeForImage(ima
>> ge));
>>
>> osg::Texture2D *texture = new osg::Texture2D();
>> texture->setFilter(osg::Texture::MIN_FILTER,
>> osg::Texture::LINEAR);
>> texture->setFilter(osg::Texture::MAG_FILTER,
>> osg::Texture::LINEAR);
>> texture->setWrap(osg::Texture::WRAP_R, osg::Texture::REPEAT);
>> texture->setResizeNonPowerOfTwoHint(false);
>> texture->setImage(image);
>> texture->setBorderColor(osg::Vec4d(0.4f, 0.5f, 0.6f, 1.0f));
>> osg::StateSet* stateset = new osg::StateSet;
>>
>> stateset->setTextureAttributeAndModes(0, texture,
>> osg::StateAttribute::ON);
>>
>> geode->setStateSet(stateset);
>> osgViewer::Viewer viewer;
>> viewer.setSceneData(geode.get());
>> getchar();
>> return viewer.run();
>>
>> }
>>
>> ...
>>
>> Thank you!
>>
>> Cheers,
>> Uma
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=69470#69470
>>
>>
>>
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


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


Re: [osg-users] How to render the image without reducing its size.?

2016-11-22 Thread Christian Buchner
Your OpenGL implementation might signal a maximum texture size of 4096.

Which is why there is no alternative to downsizing it.

There is also an OSG_MAX_TEXTURE_SIZE environment variable. I am not sure
what its default value is, or if it has a default at all. Have you tried
forcing this to 8192?

Christian



2016-11-22 13:58 GMT+01:00 Uma Devi Selvaraj :

> Hi,
>
>I have simple code that renders image using osgviewer. I am able to
> render the image successfully with the code. My problem now is the size of
> the image is reduced. for example the original size of the image is 4683 *
> 3035, the image is reduced to 4096 * 3035. Is this expected behaviour or is
> there anything I need to add in my code. I have added my code.
>
>
> //required header files
>
> int main(int argc,char**argv)
> {
>
> osg::ref_ptr image;
> image = osgDB::readImageFile("C:\\Users\\mcw\\Desktop\\DemModel.
> tif.gdal");
> std::cout << "Image info are " << image->s() << "\n"  <<"\n"  if (!(image.valid()))
> {
> std::cout << "Unable to read image file " << std::endl;
> getchar();
> return 0;
> }
>
> osg::ref_ptr geode =(osg::createGeodeForImage(image));
>
> osg::Texture2D *texture = new osg::Texture2D();
> texture->setFilter(osg::Texture::MIN_FILTER,
> osg::Texture::LINEAR);
> texture->setFilter(osg::Texture::MAG_FILTER,
> osg::Texture::LINEAR);
> texture->setWrap(osg::Texture::WRAP_R, osg::Texture::REPEAT);
> texture->setResizeNonPowerOfTwoHint(false);
> texture->setImage(image);
> texture->setBorderColor(osg::Vec4d(0.4f, 0.5f, 0.6f, 1.0f));
> osg::StateSet* stateset = new osg::StateSet;
>
> stateset->setTextureAttributeAndModes(0, texture,
> osg::StateAttribute::ON);
>
> geode->setStateSet(stateset);
> osgViewer::Viewer viewer;
> viewer.setSceneData(geode.get());
> getchar();
> return viewer.run();
>
> }
>
> ...
>
> Thank you!
>
> Cheers,
> Uma
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69470#69470
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to render the image without reducing its size.?

2016-11-22 Thread Uma Devi Selvaraj
Hi,

   I have simple code that renders image using osgviewer. I am able to render 
the image successfully with the code. My problem now is the size of the image 
is reduced. for example the original size of the image is 4683 * 3035, the 
image is reduced to 4096 * 3035. Is this expected behaviour or is there 
anything I need to add in my code. I have added my code.


//required header files

int main(int argc,char**argv)
{

osg::ref_ptr image;
image = osgDB::readImageFile("C:\\Users\\mcw\\Desktop\\DemModel.tif.gdal");
std::cout << "Image info are " << image->s() << "\n" setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
texture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
texture->setWrap(osg::Texture::WRAP_R, osg::Texture::REPEAT);
texture->setResizeNonPowerOfTwoHint(false);
texture->setImage(image);
texture->setBorderColor(osg::Vec4d(0.4f, 0.5f, 0.6f, 1.0f));
osg::StateSet* stateset = new osg::StateSet;

stateset->setTextureAttributeAndModes(0, texture, 
osg::StateAttribute::ON);

geode->setStateSet(stateset);
osgViewer::Viewer viewer;
viewer.setSceneData(geode.get());
getchar();
return viewer.run();

}

... 

Thank you!

Cheers,
Uma

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





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


Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2016-11-22 Thread Alberto Luaces
"Rambabu Repaka" writes:

> Hi,Can anyone have the source code of latest version of osg ocean (except osg 
> ocean 1.0).

Hi Rambabu, inspecting the available forks in github, there is one that
seems to be updated at least to OSG 3.4.0, though I have not personally
tried it:

https://github.com/repagh/osgocean

-- 
Alberto

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


Re: [osg-users] [osgPlugins] Exporting OpenFlight from OSG and DDS textures

2016-11-22 Thread Robert Osfield
On 22 November 2016 at 04:16, Rambabu Repaka  wrote:
> Hi,Can anyone provide the link for download of jpeg and png plugins for osg 
> 3.5.1 version.

Please spend more effort on crafting your posts so that has the
information that relevant to your question.

Your posts makes the assumption everyone else KNOWS what platform you
are working on.

Your posts makes the assumption everyone else KNOWS what build tools
and options you are using for your current version of the OSG that you
are using.

Thing is, NOBODY except YOU knows this information.

It really doesn't take much time to actually think about what might be
relevant to others when asking questions, it's just requires basic
programmer knowledge and a bit of consideration towards others.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org