Re: [osg-users] opengl version and graphics card

2020-02-15 Thread OpenSceneGraph Users
thank you sir,

 i wish, i will also become a good osg programmer with your all
guidances.
i hope, you people are helping me to become a osg programmer.

thank you for ur responces

On Sat, Feb 15, 2020 at 4:50 PM Robert Osfield 
wrote:

> Hi Nagendra?
>
> On Saturday, 15 February 2020 05:37:53 UTC, Nagendra Babu Yeruva wrote:
>>
>> hii...
>> i am new to opengl and openscenegraph. i am doing mtech in avionics
>> stream.
>> my mtech project is related to aircraft HUD symbology and Terrain
>> creation and terrain rendering.
>>
>> in my computer the opengl version is 1.1
>> how can i upgrade this version and is it depends on os or graphics card.
>>
>> To creat terrain using textures and elevation data, which graphics card
>> is sufficient?
>>
>
> Microsoft only provide out of date OpenGL headers because... well they are
> monopoly and get to make it hard for competitors to work well on Windows.
>
> There are workarounds, and the OSG builds these in so where the modern
> OpenGL features are missing from the headers the OSG defines these
> automatically for you, and also at runtime queries for the modern
> features+extensions, this means you can effectively use all the features of
> the hardware without worrying about the limitations of what Microsoft
> provides.
>
> The properties dialog you provide doesn't mention that actual hardware you
> have so there is no way for me to provide advice on just how capable it
> is.  All modern hardware is capable of running quite advanced OpenGL
> features, included embedded GPUs, some OpenGL drivers provided by the
> hardware manufactures can be a buggy though.
>
> Mostly I think you should be OK, just try our applications that have the
> features you want and if they work on your hardware you are good to go.  If
> you hardware is a real limit that using a add in card from NVidia or AMD is
> a way to go.
>
> Cheers,
> Robert.
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/fa7bbf86-c79f-44db-ad5d-9bd3c9330d48%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFBPPpOXmNp%3DQRNh-HwqD%3DPDKDGVf9WmEtVzZvHhf_jRZ%2Bpsng%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] opengl version and graphics card

2020-02-15 Thread OpenSceneGraph Users
Hi Nagendra?

On Saturday, 15 February 2020 05:37:53 UTC, Nagendra Babu Yeruva wrote:
>
> hii...
> i am new to opengl and openscenegraph. i am doing mtech in avionics stream.
> my mtech project is related to aircraft HUD symbology and Terrain creation 
> and terrain rendering.
>
> in my computer the opengl version is 1.1
> how can i upgrade this version and is it depends on os or graphics card.
>
> To creat terrain using textures and elevation data, which graphics card is 
> sufficient?
>

Microsoft only provide out of date OpenGL headers because... well they are 
monopoly and get to make it hard for competitors to work well on Windows.  

There are workarounds, and the OSG builds these in so where the modern 
OpenGL features are missing from the headers the OSG defines these 
automatically for you, and also at runtime queries for the modern 
features+extensions, this means you can effectively use all the features of 
the hardware without worrying about the limitations of what Microsoft 
provides.

The properties dialog you provide doesn't mention that actual hardware you 
have so there is no way for me to provide advice on just how capable it 
is.  All modern hardware is capable of running quite advanced OpenGL 
features, included embedded GPUs, some OpenGL drivers provided by the 
hardware manufactures can be a buggy though.  

Mostly I think you should be OK, just try our applications that have the 
features you want and if they work on your hardware you are good to go.  If 
you hardware is a real limit that using a add in card from NVidia or AMD is 
a way to go.  

Cheers,
Robert.

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/fa7bbf86-c79f-44db-ad5d-9bd3c9330d48%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] opengl version and graphics card

2020-02-14 Thread OpenSceneGraph Users
hii...
i am new to opengl and openscenegraph. i am doing mtech in avionics stream.
my mtech project is related to aircraft HUD symbology and Terrain creation 
and terrain rendering.

in my computer the opengl version is 1.1
how can i upgrade this version and is it depends on os or graphics card.

To creat terrain using textures and elevation data, which graphics card is 
sufficient?

please help me...
my system properties are given in below image:

[image: opengl version.JPG]



-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/d32b1b85-b80a-400f-8fb7-d01e9754ecbc%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OpenGL 4.4 and ARB_buffer_storage

2019-11-05 Thread Trajce Nikolov NICK
Hi Community,

I am trying to implement 4.4 Persistent Mapping Streaming, within the
context  of OSG. Bellow is from the spec. I am struggling at the moment
with making the buffer object sections, with the current OSG implementation
and not sure if it is possible so I am asking here for hints if any of you
have done something similar. Thanks a bunch as always!

Persistent mapped streaming

Given the availability of OpenGL 4.4 or ARB_buffer_storage
, the use of
persistent mapping of buffers becomes a possibility.

The idea here is to allocate an immutable buffer 2-3x the size you need,
and while you're executing operations from one region of the buffer while
you are writing to a different region. The difference between the prior
mapping scheme is that you are not frequently mapping and unmapping the
buffer. You map it persistently when you create the buffer, and keep it
mapped until it's time to delete the buffer.

This requires using glBufferStorage
 with the
GL_MAP_WRITE and GL_PERSISTENT_BITs. It also requires using glMapBufferRange
 with those
same bits when mapping it.

The general algorithm is as follows. The buffer is logically divided into 3
sections: the section you're writing to, and two sections that could
currently be in use.

The first step is to write to section 1 of the buffer. Once you have
finished writing, you must make this range of data visible to OpenGL by
flushing it (if you aren't mapping coherently). Then, you do whatever you
need to in order to ensure that this data is visible to OpenGL
.
Once the data is visible, you issue some number of Rendering Commands
 that read from that
section of the buffer. After issuing all of the commands that read from the
buffer, you create a fence sync object
.

Next frame, you start writing to buffer section 2. You do all of the above,
and create a new fence sync object. Keep each buffer section's sync objects
separate.

You do the same with buffer section 3 on the next frame.

On the fourth frame, you want to start using section 1 again. However, you
need to check section 1's sync object to see if it has completed *before* you
can start. You can only start writing to a section if that section's sync
object has completed.

-- 
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] OpenGL Error 'invalid value' when using osg::LineWidth

2019-06-27 Thread Voerman, L.
Hi Brett,
if getHandle()->getLineWidth() returns 0 or a negative value that would
explain all. Can you write out the problematic node to an osg file and see
if the invalid value error occurs in the osgviewer as well?
That would help to narrow down the options.
Laurens.

On Thu, Jun 27, 2019 at 2:19 AM Brett Sackstein 
wrote:

> Hello, I'm using osg and osgEarth to create a program. I try to draw a
> path that follows another node in the scene such that when I set its
> position, I add an additional GL_POINT vertex and a pair of LINE_STRIP
> vertices for a new anchor point for two geodes. However, I'm constantly
> being spammed in my application output with the invalid value error.
>
> I have been pulling my hair out because I spent hours figuring out which
> geometry was causing it. This is the format of my code upon construction:
>
>
> Code:
> PathNode::PathNode(IPathObject *pathObject, osgEarth::MapNode* mapNode) :
> CommonMapNode(pathObject, mapNode), osg::Group(), m_crossedDateLine(false),
> m_offset(0.0){
>
> m_lineColorArray = new osg::Vec4Array;
> m_glPointColorArray = new osg::Vec4Array;
>
> m_lineVertexArray = new osg::Vec3Array;
> m_glPointVertexArray = new osg::Vec3Array;
>
> m_lineGeom = new osg::Geometry;
> m_lineGeom->setUseDisplayList(false);
> m_lineGeom->setUseVertexArrayObject(true);
> m_lineGeom->setUseVertexBufferObjects(true);
> m_lineGeom->setDataVariance(osg::Object::DataVariance::DYNAMIC);
>
> m_glPointGeom = new osg::Geometry;
> m_glPointGeom->setUseDisplayList(false);
> m_glPointGeom->setUseVertexArrayObject(true);
> m_glPointGeom->setUseVertexBufferObjects(true);
> m_glPointGeom->setDataVariance(osg::Object::DataVariance::DYNAMIC);
>
> m_lineStripGeode = new osg::Geode;
> m_glPointGeode = new osg::Geode;
>
> m_lineStripGeode->getOrCreateStateSet()->setRenderBinDetails(0,
> "RenderBin", osg::StateSet::OVERRIDE_PROTECTED_RENDERBIN_DETAILS);
> m_glPointGeode->getOrCreateStateSet()->setRenderBinDetails(0, "RenderBin",
> osg::StateSet::OVERRIDE_PROTECTED_RENDERBIN_DETAILS);
>
> m_lineStripGeode->getOrCreateStateSet()->setMode(GL_BLEND,
> osg::StateAttribute::ON);
> m_glPointGeode->getOrCreateStateSet()->setMode(GL_BLEND,
> osg::StateAttribute::ON);
>
> //Line Geometry
> m_lineGeom->setVertexArray(m_lineVertexArray);
> m_lineGeom->setDataVariance(osg::Object::DataVariance::DYNAMIC);
> m_lineDrawArray = new osg::DrawArrays(osg::PrimitiveSet::LINE_STRIP, 0,
> m_lineVertexArray->size());
> m_lineDrawArray->setDataVariance(osg::Object::DataVariance::DYNAMIC);
> m_lineGeom->addPrimitiveSet(m_lineDrawArray);
> m_lineWidth = new osg::LineWidth(getHandle()->getLineWidth());
> m_lineGeom->getOrCreateStateSet()->setMode(GL_LINE_SMOOTH,
> osg::StateAttribute::ON);
> m_lineGeom->getOrCreateStateSet()->setAttributeAndModes(m_lineWidth,
> osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON |
> osg::StateAttribute::PROTECTED);
> m_lineGeom->setColorArray(m_lineColorArray, osg::Array::BIND_PER_VERTEX);
>
> //Line Geode
> m_lineStripGeode->addDrawable(m_lineGeom);
> m_lineStripGeode->setDataVariance(osg::Object::DataVariance::DYNAMIC);
> m_lineStripGeode->getOrCreateStateSet()->setMode(GL_LIGHTING,
> osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF |
> osg::StateAttribute::PROTECTED);
> m_lineStripGeode->getOrCreateStateSet()->setMode(GL_BLEND,
> osg::StateAttribute::ON);
> m_lineStripGeode->getOrCreateStateSet()->setMode(GL_LINE_SMOOTH,
> osg::StateAttribute::ON);
> m_lineStripGeode->addCullCallback(new osgEarth::HorizonCullCallback);
>
> //GL Point Geometry
> m_glPointGeom->setColorArray(m_glPointColorArray,
> osg::Array::BIND_OVERALL);
> m_glPointGeom->setVertexArray(m_glPointVertexArray);
>
> m_glPointsDrawArray = new osg::DrawArrays(osg::PrimitiveSet::POINTS, 0,
> m_glPointVertexArray->size());
> m_glPointGeom->addPrimitiveSet(m_glPointsDrawArray);
> m_glPointGeom->getOrCreateStateSet()->setMode(GL_LIGHTING,
> osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF |
> osg::StateAttribute::PROTECTED);
> osg::ref_ptr pointAttributes = new osg::Point(5);
> m_glPointGeom->getOrCreateStateSet()->setAttributeAndModes(pointAttributes,
> osg::StateAttribute::ON);
> m_glPointGeom->setColorArray(m_glPointColorArray,
> osg::Array::BIND_PER_VERTEX);
>
> //GL Point Geode
> m_glPointGeode->addDrawable(m_glPointGeom);
>
> addChild(m_lineStripGeode);
> addChild(m_glPointGeode);
> }
>
>
>
>
> It turns out the lines:
>
>
> Code:
> m_lineWidth = new osg::LineWidth(getHandle()->getLineWidth());
> m_lineGeom->getOrCreateStateSet()->setAttributeAndModes(m_lineWidth,
> osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON |
> osg::StateAttribute::PROTECTED);
>
>
>
>
> Is what is causing this error to spam my output. Nothing visually seems
> incorrect. All colors and points are correct. Nothing is blinking or acting
> strange. What I don't understand with this "path" that I've created is that
> I actually have a "line" equivalent class that literally does the same
> thing, but with only 2 points and not 

[osg-users] OpenGL Error 'invalid value' when using osg::LineWidth

2019-06-26 Thread Brett Sackstein
Hello, I'm using osg and osgEarth to create a program. I try to draw a path 
that follows another node in the scene such that when I set its position, I add 
an additional GL_POINT vertex and a pair of LINE_STRIP vertices for a new 
anchor point for two geodes. However, I'm constantly being spammed in my 
application output with the invalid value error. 

I have been pulling my hair out because I spent hours figuring out which 
geometry was causing it. This is the format of my code upon construction:


Code:
PathNode::PathNode(IPathObject *pathObject, osgEarth::MapNode* mapNode) : 
CommonMapNode(pathObject, mapNode), osg::Group(), m_crossedDateLine(false), 
m_offset(0.0){

m_lineColorArray = new osg::Vec4Array;
m_glPointColorArray = new osg::Vec4Array;

m_lineVertexArray = new osg::Vec3Array;
m_glPointVertexArray = new osg::Vec3Array;

m_lineGeom = new osg::Geometry;
m_lineGeom->setUseDisplayList(false);
m_lineGeom->setUseVertexArrayObject(true);
m_lineGeom->setUseVertexBufferObjects(true);
m_lineGeom->setDataVariance(osg::Object::DataVariance::DYNAMIC);

m_glPointGeom = new osg::Geometry;
m_glPointGeom->setUseDisplayList(false);
m_glPointGeom->setUseVertexArrayObject(true);
m_glPointGeom->setUseVertexBufferObjects(true);
m_glPointGeom->setDataVariance(osg::Object::DataVariance::DYNAMIC);

m_lineStripGeode = new osg::Geode;
m_glPointGeode = new osg::Geode;

m_lineStripGeode->getOrCreateStateSet()->setRenderBinDetails(0, "RenderBin", 
osg::StateSet::OVERRIDE_PROTECTED_RENDERBIN_DETAILS);
m_glPointGeode->getOrCreateStateSet()->setRenderBinDetails(0, "RenderBin", 
osg::StateSet::OVERRIDE_PROTECTED_RENDERBIN_DETAILS);

m_lineStripGeode->getOrCreateStateSet()->setMode(GL_BLEND, 
osg::StateAttribute::ON);
m_glPointGeode->getOrCreateStateSet()->setMode(GL_BLEND, 
osg::StateAttribute::ON);

//Line Geometry
m_lineGeom->setVertexArray(m_lineVertexArray);
m_lineGeom->setDataVariance(osg::Object::DataVariance::DYNAMIC);
m_lineDrawArray = new osg::DrawArrays(osg::PrimitiveSet::LINE_STRIP, 0, 
m_lineVertexArray->size());
m_lineDrawArray->setDataVariance(osg::Object::DataVariance::DYNAMIC);
m_lineGeom->addPrimitiveSet(m_lineDrawArray);
m_lineWidth = new osg::LineWidth(getHandle()->getLineWidth());
m_lineGeom->getOrCreateStateSet()->setMode(GL_LINE_SMOOTH, 
osg::StateAttribute::ON);
m_lineGeom->getOrCreateStateSet()->setAttributeAndModes(m_lineWidth, 
osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON | 
osg::StateAttribute::PROTECTED);
m_lineGeom->setColorArray(m_lineColorArray, osg::Array::BIND_PER_VERTEX);

//Line Geode
m_lineStripGeode->addDrawable(m_lineGeom);
m_lineStripGeode->setDataVariance(osg::Object::DataVariance::DYNAMIC);
m_lineStripGeode->getOrCreateStateSet()->setMode(GL_LIGHTING, 
osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF | 
osg::StateAttribute::PROTECTED);
m_lineStripGeode->getOrCreateStateSet()->setMode(GL_BLEND, 
osg::StateAttribute::ON);
m_lineStripGeode->getOrCreateStateSet()->setMode(GL_LINE_SMOOTH, 
osg::StateAttribute::ON);
m_lineStripGeode->addCullCallback(new osgEarth::HorizonCullCallback);

//GL Point Geometry
m_glPointGeom->setColorArray(m_glPointColorArray, osg::Array::BIND_OVERALL);
m_glPointGeom->setVertexArray(m_glPointVertexArray);

m_glPointsDrawArray = new osg::DrawArrays(osg::PrimitiveSet::POINTS, 0, 
m_glPointVertexArray->size());
m_glPointGeom->addPrimitiveSet(m_glPointsDrawArray);
m_glPointGeom->getOrCreateStateSet()->setMode(GL_LIGHTING, 
osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF | 
osg::StateAttribute::PROTECTED);
osg::ref_ptr pointAttributes = new osg::Point(5);
m_glPointGeom->getOrCreateStateSet()->setAttributeAndModes(pointAttributes, 
osg::StateAttribute::ON);
m_glPointGeom->setColorArray(m_glPointColorArray, osg::Array::BIND_PER_VERTEX);

//GL Point Geode
m_glPointGeode->addDrawable(m_glPointGeom);

addChild(m_lineStripGeode);
addChild(m_glPointGeode);
}




It turns out the lines:


Code:
m_lineWidth = new osg::LineWidth(getHandle()->getLineWidth());
m_lineGeom->getOrCreateStateSet()->setAttributeAndModes(m_lineWidth, 
osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON | 
osg::StateAttribute::PROTECTED);




Is what is causing this error to spam my output. Nothing visually seems 
incorrect. All colors and points are correct. Nothing is blinking or acting 
strange. What I don't understand with this "path" that I've created is that I 
actually have a "line" equivalent class that literally does the same thing, but 
with only 2 points and not 1 to n points and doesn't use GL_POINT at all for 
the end points. 

I figured out if I just don't add the osg::LineWidth to the m_lineGeom 
variable, then the error disappears, but I need the ability to set the line's 
width. Can anybody explain what may be causing this to print even though 
nothing about my lines look ill-formed? Thanks for any help.

- Blanky

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






Re: [osg-users] openGL error 'stack overflow' at after RenderBin::draw(..)

2019-01-07 Thread Chris Hanson
Well, it's hard to say because I don't really know how you are doing it
now, but it seems to me like you're spending a lot of effort rotating and
positioning each text element individually. Normally, I don't go through
that process.

Normally, I make a hierarchy of a few groups, each with various children
individually positioned. Then, I can adjust the overall position and
rotation of the whole set by applying position and rotation transforms to
the Group node, not to each text or other sub-element.

>From your description (maybe I misinterpreted what you were saying) it
didn't sound like you were doing it this way, and I worried that you were
making unnecessary work for yourself as a result.



On Mon, Jan 7, 2019 at 8:40 AM Nebi Sarikaya  wrote:

> Hi Chris;
>
> Can you be more specific on "I usually put all of the text and HUD
> elements into a group and position them relative to the group and then
> rotate and shift that group. All the sub-children will rotate properly. " ?
>
> Thank you!
>
> Cheers,
> Nebi
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75394#75394
>
>
>
>
>
> ___
> 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 • Forensics • Imaging • UAVs • 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] openGL error 'stack overflow' at after RenderBin::draw(..)

2019-01-06 Thread Nebi Sarikaya
Hi Chris;

Can you be more specific on "I usually put all of the text and HUD elements 
into a group and position them relative to the group and then rotate and shift 
that group. All the sub-children will rotate properly. " ?

Thank you!

Cheers,
Nebi

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





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


Re: [osg-users] openGL error 'stack overflow' at after RenderBin::draw(..)

2018-12-30 Thread Chris Hanson
I'm not totally clear on how you're doing things, but I think it's probably
more cumbersome than it should be.

I usually put all of the text and HUD elements into a group and position
them relative to the group and then rotate and shift that group. All the
sub-children will rotate properly.

On Sun, Dec 30, 2018 at 9:49 AM Nebi Sarikaya  wrote:

> At last I managed to do somethings using osgText::Text, but I had to
> create a new class called "TextMod" means modified text derived from
> osgText::Text class, and I created a function setting offset to TextMod
> class. By setting different offset values to each text I could set all the
> positions of the texts at the center origin point. So when I rotate the
> pitch ladders all text labels rotate aligned with the pitch ladders.
>
> Actually I did a similar HUD using NASA World Wind Java. There is a
> TextRenderer class in WWJ API and by that way a text can be rendered on
> GLCanvas. So when the matrix is rotated all drawings and texts rotates.
> That was actually more easy to implement.
>
> If anyone knows an easier way please let me know.
>
> Thank you!
>
> Cheers,
> Nebi
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75362#75362
>
>
>
> ___
> 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 • Forensics • Imaging • UAVs • 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] openGL error 'stack overflow' at after RenderBin::draw(..)

2018-12-24 Thread Nebi Sarikaya
Chris,

Thank you for your interest and answer. I need glPushMatrix and glPopMatrix 
since as you may see on the screenshot some of the drawings are static on the 
other hand positions of some of the drawings dinamically change.

Know I need to put text inside the boxes and next to the pitch lines. I know 
that osg::Text can work for me for the static ones. Bu what souls I do for the 
dynamic ones? Is there any way to rotate osg::Text just like we rotate in 
openGL. What I mean is, I need to rotate text just beside the pitch lines and 
aligned next to them. These texts will show the pitch degrees.

Thank you!

Cheers,
Nebi

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





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


Re: [osg-users] openGL error 'stack overflow' at after RenderBin::draw(..)

2018-12-24 Thread Chris Hanson
You are doing two PushMatrix operations per draw call, but you never
PopMatrix, so the OpenGL matrix stack gets more and more full and
eventually overflows.

At this point, functionally, you can either add two PopMatrix calls
somewhere at the end of the draw function, or if you don't need the matrix
stack (your current code isn't using the data you pushed, so it won't
change functionality) just remove the two pushmatrix calls.

On Sun, Dec 23, 2018 at 11:44 PM Nebi Sarikaya  wrote:

> Hi,
>
> I am trying to draw lines on the screen. And I am trying to use pure
> openGL to draw lines.The lines can be drawn on the screen. But I get openGL
> error 'stack overflow' at after RenderBin::draw(..) message. My code is
> below:
>
>
> Code:
>
> void draw::drawImplementation(osg::RenderInfo& renderInfo) const
> {
>
>
>
> Viewport* viewPort =
> renderInfo.getCurrentCamera()->getViewport();
>
> double width = viewPort->width();
> double height = viewPort->height();
>
> double orgX = width / 2;
> double orgY = height / 2;
>
> osg::Quat matrix =
> renderInfo.getCurrentCamera()->getViewMatrix().getRotate();
>
> glEnable(GL_LINE_SMOOTH);
> glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
> glEnable(GL_BLEND);
> glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
>
> glMatrixMode(GL_PROJECTION);
> glPushMatrix();
> glLoadIdentity();
> glOrtho(0.0, width, 0.0, height, -1, 1);
>
> glMatrixMode(GL_MODELVIEW);
> glPushMatrix();
> glLoadIdentity();
>
> glTranslated(orgX, orgY, 0);
> glRotated(rotate, 0, 0, 1);
> glTranslated(-orgX, -orgY, 0);
>
>
> glLineWidth(2.0f);
> glColor4d(0, 255, 0, 255);
> glBegin(GL_LINES);
> if (orgY < height && orgY > 0) {
> glVertex2d(orgX + 25, orgY);
> glVertex2d(orgX + 260, orgY);
> glVertex2d(orgX - 25, orgY);
> glVertex2d(orgX - 260, orgY);
> }
>
> glEnd();
>
> glLineWidth(5.0f);
> glColor4d(0, 0, 0, 255);
> glBegin(GL_LINES);
> if (orgY < height && orgY > 0) {
> glVertex2d(orgX + 23, orgY);
> glVertex2d(orgX + 262, orgY);
> glVertex2d(orgX - 23, orgY);
> glVertex2d(orgX - 262, orgY);
> }
> glEnd();
>
>
> glLineWidth(2.0f);
> glColor4d(0, 255, 0, 255);
> glBegin(GL_LINES);
>
> int yLoc = orgY + 250;
> for (int i = 0; i < 17; i++) {
> if (yLoc < height && yLoc > 0) {
> glVertex2d(orgX + 25, yLoc);
> glVertex2d(orgX + 165, yLoc);
> glVertex2d(orgX - 25, yLoc);
> glVertex2d(orgX - 165, yLoc);
>
> glVertex2d(orgX - 165, yLoc);
> glVertex2d(orgX - 165, yLoc - 20);
> glVertex2d(orgX + 165, yLoc);
> glVertex2d(orgX + 165, yLoc - 20);
>
> }
> yLoc = yLoc + 250;
> }
>
> glEnd();
>
> glLineWidth(5.0f);
> glColor4d(0, 0, 0, 255);
> glBegin(GL_LINES);
>
> yLoc = (int)orgY + 250;
> for (int i = 0; i < 17; i++) {
> if (yLoc < height && yLoc > 0) {
> glVertex2d(orgX + 23, yLoc);
> glVertex2d(orgX + 165, yLoc);
> glVertex2d(orgX - 23, yLoc);
> glVertex2d(orgX - 165, yLoc);
>
> glVertex2d(orgX - 165, yLoc);
> glVertex2d(orgX - 165, yLoc - 22);
> glVertex2d(orgX + 165, yLoc);
> glVertex2d(orgX + 165, yLoc - 22);
>
> }
>
> yLoc = yLoc + 250;
> }
> glEnd();
>
>
> }
>
>
>
>
> Thank you!
>
> Cheers,
> Nebi[/code]
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75339#75339
>
>
>
>
>
> ___
> 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. 

[osg-users] openGL error 'stack overflow' at after RenderBin::draw(..)

2018-12-23 Thread Nebi Sarikaya
Hi,

I am trying to draw lines on the screen. And I am trying to use pure openGL to 
draw lines.The lines can be drawn on the screen. But I get openGL error 'stack 
overflow' at after RenderBin::draw(..) message. My code is below:


Code:

void draw::drawImplementation(osg::RenderInfo& renderInfo) const
{   



Viewport* viewPort = 
renderInfo.getCurrentCamera()->getViewport();

double width = viewPort->width();
double height = viewPort->height();

double orgX = width / 2;
double orgY = height / 2;

osg::Quat matrix = 
renderInfo.getCurrentCamera()->getViewMatrix().getRotate();

glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glOrtho(0.0, width, 0.0, height, -1, 1);

glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();

glTranslated(orgX, orgY, 0);
glRotated(rotate, 0, 0, 1);
glTranslated(-orgX, -orgY, 0);


glLineWidth(2.0f);
glColor4d(0, 255, 0, 255);
glBegin(GL_LINES);
if (orgY < height && orgY > 0) {
glVertex2d(orgX + 25, orgY);
glVertex2d(orgX + 260, orgY);
glVertex2d(orgX - 25, orgY);
glVertex2d(orgX - 260, orgY);
}

glEnd();

glLineWidth(5.0f);
glColor4d(0, 0, 0, 255);
glBegin(GL_LINES);
if (orgY < height && orgY > 0) {
glVertex2d(orgX + 23, orgY);
glVertex2d(orgX + 262, orgY);
glVertex2d(orgX - 23, orgY);
glVertex2d(orgX - 262, orgY);
}
glEnd();


glLineWidth(2.0f);
glColor4d(0, 255, 0, 255);
glBegin(GL_LINES);

int yLoc = orgY + 250;
for (int i = 0; i < 17; i++) {
if (yLoc < height && yLoc > 0) {
glVertex2d(orgX + 25, yLoc);
glVertex2d(orgX + 165, yLoc);
glVertex2d(orgX - 25, yLoc);
glVertex2d(orgX - 165, yLoc);

glVertex2d(orgX - 165, yLoc);
glVertex2d(orgX - 165, yLoc - 20);
glVertex2d(orgX + 165, yLoc);
glVertex2d(orgX + 165, yLoc - 20);

}
yLoc = yLoc + 250;
}

glEnd();

glLineWidth(5.0f);
glColor4d(0, 0, 0, 255);
glBegin(GL_LINES);

yLoc = (int)orgY + 250;
for (int i = 0; i < 17; i++) {
if (yLoc < height && yLoc > 0) {
glVertex2d(orgX + 23, yLoc);
glVertex2d(orgX + 165, yLoc);
glVertex2d(orgX - 23, yLoc);
glVertex2d(orgX - 165, yLoc);

glVertex2d(orgX - 165, yLoc);
glVertex2d(orgX - 165, yLoc - 22);
glVertex2d(orgX + 165, yLoc);
glVertex2d(orgX + 165, yLoc - 22);

}

yLoc = yLoc + 250;
}
glEnd();


}




Thank you!

Cheers,
Nebi[/code]

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





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


Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-20 Thread Grigoriy Mylnikov
Thank you, it works.

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





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


Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-20 Thread Chris Hanson
http://alphapixel.com/faqs/

src\osgUtil\SceneView.cpp(422): osg::Uniform* uniform =
_localStateSet->getOrCreateUniform(“osg_ViewMatrix”,osg::Uniform::FLOAT_MAT4);

src\osgUtil\SceneView.cpp(428): osg::Uniform* uniform =
_localStateSet->getOrCreateUniform(“osg_ViewMatrixInverse”,osg::Uniform::FLOAT_MAT4);
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-20 Thread Grigoriy Mylnikov
Hi,

One more question. If I use gl_ModelViewMatrix in shaders to transform Light 
position, it gets transformed by both camera matrix and current node's matrix, 
that is not right.
Is there some build-in OSG uniform that holds only camera matrix or only model 
matrix? Or I should compute it and pass as my own uniform?

Thank you!

Cheers,
Grigoriy

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





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


Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-19 Thread Chris Hanson
Let me check with Thomas.

On Mon, Nov 19, 2018 at 5:46 PM Grigoriy Mylnikov 
wrote:

> At the moment, I implemented ShaderLight class that extends osg::Light and
> allows to use several point lights with per-pixel lighting (using my
> shaders). It works on android emulator.
>
> I'm not sure about where is a best place to add that lights' uniforms to
> scene graph (e.g. rootStateSet->addUniform(myLight0->positionUniform); ).
> For now, I just call it after creating every light. I think ShaderLight
> object should do it itself, but how can it get a StateSet to which uniforms
> should be added?
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75213#75213
>
>
>
>
>
> ___
> 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 • Forensics • Imaging • UAVs • 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] OpenGL ES 2.0 and LIGHTING

2018-11-19 Thread Grigoriy Mylnikov
At the moment, I implemented ShaderLight class that extends osg::Light and 
allows to use several point lights with per-pixel lighting (using my shaders). 
It works on android emulator.

I'm not sure about where is a best place to add that lights' uniforms to scene 
graph (e.g. rootStateSet->addUniform(myLight0->positionUniform); ). For now, I 
just call it after creating every light. I think ShaderLight object should do 
it itself, but how can it get a StateSet to which uniforms should be added?

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





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


Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-18 Thread Grigoriy Mylnikov
I tried to use osgUtil/ShaderGen. As far as I understand, it does not supports 
GLES2/3: it references gl_LightSource, gl_FrontLightProduct etc. in shader 
code, and I could not find such uniforms created. Also, it assumes only one 
light source.
Maybe there is some more advanced version of ShaderGen? I have seen somebody 
mentioned it somewhere on this forum.
Does anyone work on supporting GLES in OSG? I could try to help with this, if 
somebody will point me in right direction

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





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


Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-16 Thread Grigoriy Mylnikov
After some trial and errors, I managed to do it in shader. But this means one 
redundant matrix multiplication per each vertex. Isn't it more effective to 
compute it once per frame on cpu side?

What's the purpose of state.getModelViewMatrix()? I expected to get a 
camera*model matrix there. Or it is not yet defined at the moment lights are 
applied?

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





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


Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-16 Thread Werner Modenbach
Hi Grigoriy,

why don't you do the multiply in the shader like you do with gl_vertex?

- Werner -

Am 16.11.2018 um 12:29 schrieb Grigoriy Mylnikov:
> Sorry for delayed reply.
>
> My goal is to open and display .osgt files on android the same way they can 
> be opened on desktop. This includes using several lights inside a model, both 
> directional and point lights.
>
> I have some progress with writing shaders, but I have troubles with 
> understanding OSG states. I've updated osg::Light apply() code to pass light 
> position (relative to camera) as uniform:
>
>
> Code:
> void LightShader::apply(osg::State& state) const
> {
> #ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE
> ... // Original code
> #else
> ...
> osg::Vec4 relPos = state.getModelViewMatrix() * _position;
> lightPosUniform.get()->set(relPos);
> ...
> #endif
> }
>
>
>
>
> But it seems that state.getModelViewMatrix() does not gives me valid view 
> matrix.
>
> If I could get light position (relative to camera), I can use it in shaders 
> like this:
>
>
> Code:
> vec3 APos = vec3(gl_ModelViewMatrix * gl_Vertex);
> ...
> vec3 fromPointToLight = lightPos.xyz - APos;
>
>
>
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75204#75204
>
>
>
>
>
> ___
> 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] OpenGL ES 2.0 and LIGHTING

2018-11-16 Thread Grigoriy Mylnikov
Sorry for delayed reply.

My goal is to open and display .osgt files on android the same way they can be 
opened on desktop. This includes using several lights inside a model, both 
directional and point lights.

I have some progress with writing shaders, but I have troubles with 
understanding OSG states. I've updated osg::Light apply() code to pass light 
position (relative to camera) as uniform:


Code:
void LightShader::apply(osg::State& state) const
{
#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE
... // Original code
#else
...
osg::Vec4 relPos = state.getModelViewMatrix() * _position;
lightPosUniform.get()->set(relPos);
...
#endif
}




But it seems that state.getModelViewMatrix() does not gives me valid view 
matrix.

If I could get light position (relative to camera), I can use it in shaders 
like this:


Code:
vec3 APos = vec3(gl_ModelViewMatrix * gl_Vertex);
...
vec3 fromPointToLight = lightPos.xyz - APos;




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





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


Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-12 Thread Chris Hanson
I think the osgUtil/ShaderGen code might be GLES2 compatible now. Try
running it on your model, and dump the shader that it creates to see if
it's creating Uniforms for lighting or not.

It might or might not be using the osg::Light as a basis. Do you HAVE to
use osg::Light or could you get by with some light Uniforms?

Describe to us your lighting requirements better and maybe we can suggest
solutions.

On Mon, Nov 12, 2018 at 1:45 PM Grigoriy Mylnikov 
wrote:

> Hi,
>
> Is this issue solved in OSG somehow? I need to use some basic lighting on
> Android (GLESv3). It should use parameters from osg::Light. Are there any
> ready-made solutions?
> if not, where can I get some shaders/shader generator to start with? I'm
> new in shaders.
>
> Thank you!
>
> Cheers,
> Grigoriy
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75183#75183
>
>
>
>
>
> ___
> 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 • Forensics • Imaging • UAVs • 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] OpenGL ES 2.0 and LIGHTING

2018-11-12 Thread Grigoriy Mylnikov
Hi,

Is this issue solved in OSG somehow? I need to use some basic lighting on 
Android (GLESv3). It should use parameters from osg::Light. Are there any 
ready-made solutions?
if not, where can I get some shaders/shader generator to start with? I'm new in 
shaders.

Thank you!

Cheers,
Grigoriy

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





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


Re: [osg-users] OpenGL viewport error (with Oculus)

2018-10-22 Thread Riccardo Corsi
Hi Robert,

yes, it's single context, single thread, all GL calls are done by osg and
osgOculusViewer in the various camera draw callbacks.

On Fri, Oct 19, 2018 at 4:55 PM Robert Osfield 
wrote:

> Hi Riccardo,
>
> On Fri, 19 Oct 2018 at 15:38, Riccardo Corsi 
> wrote:
>
>> I've tracked the issue down to the fact that it is necessary to call
>> viewer.setReleaseContextAtEndOfFrameHint(false);
>> for the Oculus to work properly.
>>
>
> Is it running single context, single threading and then using GL calls in
> the main thread?
>
> 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


Re: [osg-users] OpenGL viewport error (with Oculus)

2018-10-19 Thread Robert Osfield
Hi Riccardo,

On Fri, 19 Oct 2018 at 15:38, Riccardo Corsi 
wrote:

> I've tracked the issue down to the fact that it is necessary to call
> viewer.setReleaseContextAtEndOfFrameHint(false);
> for the Oculus to work properly.
>

Is it running single context, single threading and then using GL calls in
the main thread?

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


Re: [osg-users] OpenGL viewport error (with Oculus)

2018-10-19 Thread Riccardo Corsi
I've tracked the issue down to the fact that it is necessary to call
viewer.setReleaseContextAtEndOfFrameHint(false);
for the Oculus to work properly.

Thanks,
Riccardo



On Wed, Oct 17, 2018 at 2:33 PM Robert Osfield 
wrote:

> On Wed, 17 Oct 2018 at 12:17, Riccardo Corsi 
> wrote:
>
>> the error I've reported is what I get with the env var already ON.
>> Unfortunately it doesn't add any more details.
>>
>
> Try adding GL checks around any of the Oculus related code.
>
> 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


Re: [osg-users] OpenGL viewport error (with Oculus)

2018-10-17 Thread Robert Osfield
On Wed, 17 Oct 2018 at 12:17, Riccardo Corsi 
wrote:

> the error I've reported is what I get with the env var already ON.
> Unfortunately it doesn't add any more details.
>

Try adding GL checks around any of the Oculus related code.

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


Re: [osg-users] OpenGL viewport error (with Oculus)

2018-10-17 Thread Riccardo Corsi
Hi Robert,

the error I've reported is what I get with the env var already ON.
Unfortunately it doesn't add any more details.
Riccardo

On Wed, Oct 17, 2018 at 12:56 PM Robert Osfield 
wrote:

> Hi Riccardo,
>
> The OSG doesn't do fine grained GL error checking by default so when it
> does check for a GL error this error may have occurred many GL operations
> before, so while the error may have been reported just after a viewport is
> set it could well be prior operations that are the cause.
>
> You can enable finer grained GL error checking by setting the
> OSG_GL_ERROR_CHECKING env var to ON i.e.
>
> set OSG_GL_ERROR_CHECKING=ON
>
> This will hopefully give you a more precise location of the error.
>
> Robert.
>
> On Wed, 17 Oct 2018 at 11:43, Riccardo Corsi 
> wrote:
>
>> Hi all,
>>
>> when using my application with the Oculus I get the following GL error at
>> every frame:
>> *Warning: detected OpenGL error 'invalid operation' after applying
>> attribute Viewport *
>>
>> This error is coming from the call RenderStage::drawImplementation()
>> 
>>  but
>> the _viewport is valid. I'm not so familiar with the backend to understand
>> where this error might come from.
>> Any hint to debug this?
>>
>> Note: I'm using the Oculus through osgOculusViewer
>> .
>> The sample Oculus viewer works fine without GL errors.
>> My app is setup the same way, I cannot spot any sensible difference.
>>
>> I'm using win10, osg 3.6.3
>>
>> Thanks,
>> Riccardo
>> ___
>> 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenGL viewport error (with Oculus)

2018-10-17 Thread Robert Osfield
Hi Riccardo,

The OSG doesn't do fine grained GL error checking by default so when it
does check for a GL error this error may have occurred many GL operations
before, so while the error may have been reported just after a viewport is
set it could well be prior operations that are the cause.

You can enable finer grained GL error checking by setting the
OSG_GL_ERROR_CHECKING env var to ON i.e.

set OSG_GL_ERROR_CHECKING=ON

This will hopefully give you a more precise location of the error.

Robert.

On Wed, 17 Oct 2018 at 11:43, Riccardo Corsi 
wrote:

> Hi all,
>
> when using my application with the Oculus I get the following GL error at
> every frame:
> *Warning: detected OpenGL error 'invalid operation' after applying
> attribute Viewport *
>
> This error is coming from the call RenderStage::drawImplementation()
> 
>  but
> the _viewport is valid. I'm not so familiar with the backend to understand
> where this error might come from.
> Any hint to debug this?
>
> Note: I'm using the Oculus through osgOculusViewer
> .
> The sample Oculus viewer works fine without GL errors.
> My app is setup the same way, I cannot spot any sensible difference.
>
> I'm using win10, osg 3.6.3
>
> Thanks,
> Riccardo
> ___
> 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] OpenGL viewport error (with Oculus)

2018-10-17 Thread Riccardo Corsi
Hi all,

when using my application with the Oculus I get the following GL error at
every frame:
*Warning: detected OpenGL error 'invalid operation' after applying
attribute Viewport *

This error is coming from the call RenderStage::drawImplementation()

but
the _viewport is valid. I'm not so familiar with the backend to understand
where this error might come from.
Any hint to debug this?

Note: I'm using the Oculus through osgOculusViewer
.
The sample Oculus viewer works fine without GL errors.
My app is setup the same way, I cannot spot any sensible difference.

I'm using win10, osg 3.6.3

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


Re: [osg-users] OpenGL function does not return on Titan Xp

2018-06-11 Thread Voerman, L.
Hi Lionel,
as this seems to be a driver issue, the operating system and driver version
info would be useful to compare.
Regards, Laurens.

On Mon, Jun 11, 2018 at 3:01 PM, Lionel Lagarde 
wrote:

> Hi,
>
> We have a set of products based on OSG that run well on common hardware.
>
> Recently a customer bought a NVidia Titan Xp. Our software do not work on
> this graphics card.
> The software do not crash, it stop responding to any event.
>
> The software is always stuck in the middle of a glGenTexture call
> (osg::Texture2D::apply).
>
> We use OSG 3.0.1 but I tested with OSG 3.6.1 and the 2 have the same issue
>
> Other graphics tools, like COIN based software or the demos that come with
> GPU Caps Viewer work fine.
>
> The behavior is reproducible using the command "osgviewer cow.osg", and
> display the rendering stats using "s".
> The stats use text, that use textures for the glyph of the characters. The
> GL function used to reserve the texture
> ID  (which I think is a pure CPU/driver job) never returns.
>
> I wonder if somebody that have a Titan Xp (I know it is a very rare and
> useless card, a 1080 Ti does the job pretty well) have a similar issue
>
> ___
> 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] OpenGL function does not return on Titan Xp

2018-06-11 Thread Lionel Lagarde

Hi,

We have a set of products based on OSG that run well on common hardware.

Recently a customer bought a NVidia Titan Xp. Our software do not work 
on this graphics card.

The software do not crash, it stop responding to any event.

The software is always stuck in the middle of a glGenTexture call 
(osg::Texture2D::apply).


We use OSG 3.0.1 but I tested with OSG 3.6.1 and the 2 have the same issue

Other graphics tools, like COIN based software or the demos that come 
with GPU Caps Viewer work fine.


The behavior is reproducible using the command "osgviewer cow.osg", and 
display the rendering stats using "s".
The stats use text, that use textures for the glyph of the characters. 
The GL function used to reserve the texture

ID  (which I think is a pure CPU/driver job) never returns.

I wonder if somebody that have a Titan Xp (I know it is a very rare and 
useless card, a 1080 Ti does the job pretty well) have a similar issue


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


Re: [osg-users] OpenGL

2017-07-24 Thread David Heitbrink
yes this is possible, but I am afraid its likely not going to be simple, 
depending on how much integration between the two you are looking for. 

Most likely the easiest path for you is to just create a OSG program, and 
create your python program, and use sockets 
(https://docs.python.org/2/howto/sockets.html), to have your python program 
tell your OSG program what to do. 

Other than that you can setup your c++ program to compile to a DLL, then call 
the C++ dll from Python, and have it create your OSG window, and handle 
everything OSG. Or you can progress further and look at say the MFC OSG 
example, assuming you are working in windows, and look at how the device 
context are used, and look to pass the DC between your python and c++ sides. 

I would just recommend making two separate programs, particularly if you are 
new to programming, or at least just to start with.

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





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


Re: [osg-users] OpenGL

2017-07-05 Thread Alberto Luaces
"Mottaghi, Arman" writes:

> Hi all,
>
> I have a general question. I’ve googled this before, but I haven’t had
> any luck. I am new to programming world, so I decided to give it a
> shot on this forum/mailing list.
>
> I have a program written in C++ and it uses OSG and OpenGL for its
> visual graphics. I have a simple GUI code in Python that says “Hello
> my friend” on the left side and I’d like to have my OSG program on the
> right side.
>
> Is this possible? The thing I am confused about is whether Python is
> capable of displaying my C++/OSG program or not. Basically, imagine my
> main program has some buttons, texts, menus, and a graphic OSG part
> inside it—let’s say as a small window.  The best outcome would only
> display that OSG window. I am not interested in displaying the entire
> program in my python GUI window. Would that be possible? I don’t care
> if I have to run the program alongside my python program or if I can
> embed my main program or at least part of it in my python. Again, I’ve
> never done programming before, so sorry for my bad description.
>

Hi Arman,

indeed is a very open question: both Python and C++ —actually almost any
general purpose languages— are able to open console (text), graphics or
GUI windows on their own.

The lowest effort path could be letting each part of the program open
their own window and then use the window manager to arrange them in a
tiling fashion, side by side.

Other more complex solution would be to open a 3D context in the Python
GUI, and call the C++ routines from Python in other to update it.  In
the examples section of OSG you can find programs that embed 3D windows
inside GUIs, but as far as I recall, none of them with a mixed language
strategy.  Nevertheless, that is not the difficult part, since there are
many projects that can help you with the task of interfacing Python and
C++: SWIG, Boost.Python, pybind11, Python ctypes...

-- 
Alberto

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


Re: [osg-users] OpenGL warning

2017-05-25 Thread Alberto Luaces
"Qiaokun Lefei" writes:

> Hi,
>
> I always come across this warning "Warning: detected OpenGL error
> 'invalid operation' after RenderBin::draw(..)" in my osg project. Mybe
> it's just the problem of the driver. I want to know how to make this
> warning disappear or just shield it.

Hi Qiaokun, as you say it can be your program or the driver's fault.
You can check what it happening through the use of an OpenGL debugger.

You can also mute that warning by setting OSG_NOTIFY_LEVEL not to
display WARN-level messages.

-- 
Alberto

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


[osg-users] OpenGL warning

2017-05-24 Thread Qiaokun Lefei
Hi,

I always come across this warning "Warning: detected OpenGL error 'invalid 
operation' after RenderBin::draw(..)" in my osg project. Mybe it's just the 
problem of the driver. I want to know how to make this warning disappear or 
just shield it.


Thank you!

Cheers,
Qiaokun

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





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


Re: [osg-users] OpenGL error when using TextureBuffer

2017-05-22 Thread Glenn Waldron
When using an osg::TextureBuffer, be sure to call setTextureAttribute(...)
instead of setTextureAttributeAndModes(...).



Glenn Waldron

On Mon, May 22, 2017 at 9:40 AM, Marius Dransfeld <
marius.dransf...@gmail.com> wrote:

> Hi,
>
> I'm getting the following error when using osg::TextureBuffer (current OSG
> git):
> Warning: detected OpenGL error 'invalid enumerant' after applying GLMode
> 0x8c2a
>
> According to CodeXL this occurs because glEnable(GL_TEXTURE_BUFFER) is
> called. Looks like this is a bug in OSG?
>
> Thank you!
>
> Cheers,
> Marius
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70952#70952
>
>
>
>
>
> ___
> 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] OpenGL error when using TextureBuffer

2017-05-22 Thread Marius Dransfeld
Hi,

I'm getting the following error when using osg::TextureBuffer (current OSG git):
Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0x8c2a

According to CodeXL this occurs because glEnable(GL_TEXTURE_BUFFER) is called. 
Looks like this is a bug in OSG?

Thank you!

Cheers,
Marius

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





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


Re: [osg-users] OpenGL Support in Windows Remote Desktop Protocol

2016-09-29 Thread Alberto Luaces
Robert Osfield writes:

> On 29 September 2016 at 10:32, Alberto Luaces wrote:
>> I was precisely searching yesterday in the OSG examples directory to seee
>> if there were any program printing the detected GL characteristics
>> (similar to what glxinfo does on linux), but found none so far.
>
> If you set the OSG_NOTIFY_LEVEL to DEBUG then run an OSG example that
> opens up a graphics context and starts rendering it'll output all the
> extensions/GL versions etc to the console.

Great!  Thanks for the pointer, Robert!

-- 
Alberto

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


Re: [osg-users] OpenGL Support in Windows Remote Desktop Protocol

2016-09-29 Thread Robert Osfield
On 29 September 2016 at 10:32, Alberto Luaces  wrote:
> I was precisely searching yesterday in the OSG examples directory to seee
> if there were any program printing the detected GL characteristics
> (similar to what glxinfo does on linux), but found none so far.

If you set the OSG_NOTIFY_LEVEL to DEBUG then run an OSG example that
opens up a graphics context and starts rendering it'll output all the
extensions/GL versions etc to the console.

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


Re: [osg-users] OpenGL Support in Windows Remote Desktop Protocol

2016-09-29 Thread Alberto Luaces
Alistair Baxter writes:

> I’ve just discovered that my Windows 10 (Version 1511, last year’s
> November Update) desktop machine now supports OpenGL 4.5 over RDP!
>
> Apparently this has been in the pipeline for some time, but the only
> official word about it has been this post on an MS sysadmin blog with
> regard to a preview version of Windows Server:
>
> https://blogs.technet.microsoft.com/enterprisemobility/2016/01/11/remote-desktop-protocol-rdp-10-avch-264-improvements-in-windows-10-and-windows-server-2016-technical-preview/
>
> But it’s certainly working for me, using both the built-in Windows
> desktop RDP client, and the UWP store app. Anything that supports
> RemoteFX should work, I expect.
>
> Perhaps somebody else ought to confirm that this isn’t just me.
>
>

Thanks for the heads up, Alistair.  It is certainly interesting.

I wonder how did you check that.  Is it just the absence of the usual
notice output to the console saying that only OpenGL 1.x was found?

I was precisely searching yesterday in the OSG examples directory to seee
if there were any program printing the detected GL characteristics
(similar to what glxinfo does on linux), but found none so far.

-- 
Alberto

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


[osg-users] OpenGL Support in Windows Remote Desktop Protocol

2016-09-28 Thread Alistair Baxter
I've just discovered that my Windows 10 (Version 1511, last year's November 
Update) desktop machine now supports OpenGL 4.5 over RDP!

Apparently this has been in the pipeline for some time, but the only official 
word about it has been this post on an MS sysadmin blog with regard to a 
preview version of Windows Server:

https://blogs.technet.microsoft.com/enterprisemobility/2016/01/11/remote-desktop-protocol-rdp-10-avch-264-improvements-in-windows-10-and-windows-server-2016-technical-preview/


But it's certainly working for me, using both the built-in Windows desktop RDP 
client, and the UWP store app. Anything that supports RemoteFX should work, I 
expect.

Perhaps somebody else ought to confirm that this isn't just me.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenGL CoreProfile / error in on OS X

2016-05-06 Thread Florent Berthaut

Hi all,

Any feedback on that issue ?
Is there something I need to change in my code to get OpenGL > 3 with 
OpenSceneGraph on OS X ?


Regards,

Florent



Le 28/04/2016 18:21, Florent Berthaut a écrit :

Hi all,

I am trying to port my GNU/Linux project (with OSG 3.4.0) to OS X.
I first installed OSG with Macports.

However the glsl shaders do not compile with anything above version 
110, whereas i need at least version 3 and when available 4.2 (for 
image load store features).


I saw this post, which relates to the same issue (choosing OpenGL Core 
Profile instead of Compatibility profile):

http://forum.openscenegraph.org/viewtopic.php?t=9992=osx

It would seem that the issue has been fixed, but looking at the source 
code of OSG 3.4.0, 3.5.0 and 3.5.1, it does not seem that the correct 
calls have been added.
I tried adding them before recompiling OSG but then i get a bunch of 
errors.


If i change the shaders syntax and use version 110, in order to match 
compatibility profile on OSX, they compile but the application then 
crashes.

Here is backtrace of the crash :

0 com.apple.driver.AppleIntelHD4000GraphicsGLDriver 0x00010f85dd5c 
IntelVertexArray::setElemData(unsigned int, unsigned int, unsigned 
short, unsigned int) + 308
1   com.apple.driver.AppleIntelHD4000GraphicsGLDriver 
0x00010f85dc1a 
IntelVertexArray::extractState(GLDVertexArrayDataRec const*, unsigned 
long long) + 170
2   libGPUSupportMercury.dylib0x7fff92e075bb 
gpusLoadCurrentVertexArray + 195
3   com.apple.driver.AppleIntelHD4000GraphicsGLDriver 
0x00010f85b179 Gen7::updateDispatch(GLDContextRec*, 
GLDRenderDispatch*, unsigned int*) + 1393
4   GLEngine  0x7fff8ee5dad4 
gleDoDrawDispatchCore + 533
5   GLEngine  0x7fff8ee00636 
gleSetupAndDrawArraysOrElementsOutOfLine_ListExec + 886

6   GLEngine  0x7fff8ed8aa6a gleCallList + 170
7   libosgUtil.130.dylib  0x00010779085d 
osgUtil::RenderLeaf::render(osg::RenderInfo&, osgUtil::RenderLeaf*)



Is there something specific I need to do in my code in order to 
activate the OpenGL Core Profile ?



Thanks in advance,

Regards,

Florent


--
http://hitmuri.net


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



--
http://hitmuri.net

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


[osg-users] OpenGL CoreProfile / error in on OS X

2016-04-28 Thread Florent Berthaut

Hi all,

I am trying to port my GNU/Linux project (with OSG 3.4.0) to OS X.
I first installed OSG with Macports.

However the glsl shaders do not compile with anything above version 110, 
whereas i need at least version 3 and when available 4.2 (for image load 
store features).


I saw this post, which relates to the same issue (choosing OpenGL Core 
Profile instead of Compatibility profile):

http://forum.openscenegraph.org/viewtopic.php?t=9992=osx

It would seem that the issue has been fixed, but looking at the source 
code of OSG 3.4.0, 3.5.0 and 3.5.1, it does not seem that the correct 
calls have been added.

I tried adding them before recompiling OSG but then i get a bunch of errors.

If i change the shaders syntax and use version 110, in order to match 
compatibility profile on OSX, they compile but the application then crashes.

Here is backtrace of the crash :

0 com.apple.driver.AppleIntelHD4000GraphicsGLDriver 0x00010f85dd5c 
IntelVertexArray::setElemData(unsigned int, unsigned int, unsigned 
short, unsigned int) + 308
1   com.apple.driver.AppleIntelHD4000GraphicsGLDriver 0x00010f85dc1a 
IntelVertexArray::extractState(GLDVertexArrayDataRec const*, unsigned 
long long) + 170
2   libGPUSupportMercury.dylib0x7fff92e075bb 
gpusLoadCurrentVertexArray + 195
3   com.apple.driver.AppleIntelHD4000GraphicsGLDriver 0x00010f85b179 
Gen7::updateDispatch(GLDContextRec*, GLDRenderDispatch*, unsigned int*) 
+ 1393
4   GLEngine  0x7fff8ee5dad4 
gleDoDrawDispatchCore + 533
5   GLEngine  0x7fff8ee00636 
gleSetupAndDrawArraysOrElementsOutOfLine_ListExec + 886

6   GLEngine  0x7fff8ed8aa6a gleCallList + 170
7   libosgUtil.130.dylib  0x00010779085d 
osgUtil::RenderLeaf::render(osg::RenderInfo&, osgUtil::RenderLeaf*)



Is there something specific I need to do in my code in order to activate 
the OpenGL Core Profile ?



Thanks in advance,

Regards,

Florent


--
http://hitmuri.net

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


[osg-users] OpenGL jobs

2016-01-22 Thread Chris Hanson
  In the last week I've had a couple of different companies contact me
about recruiting for OpenGL-centric jobs in the US.

  I have a few people already in mind, but I figured I'd spread the net a
little wider in case they aren't the right candidates.

  These aren't entry level, and we all know that modern C++ and modern
OpenGL require some dedication to really be proficient at -- these aren't
learn-on-the-job positions. They are all full-time on-site employee
positions at solid companies, not contract/startup type situations.

  If anybody is interested in this sort of work and feels they're qualified
for it, shoot me a message privately and we can discuss it further.
Obviously, I believe experience using OSG is a potentially good filter for
finding folks with OpenGL and modern C++ experience. Sorry if this is too
commercial or off-topic.

-- 
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] OpenGL OSG Rendering 19 tessellation + LOD + tiles

2015-08-05 Thread valerian merkling
Really nice ! It's seems to get all that I need.

Thank a lot !


valerian

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





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


Re: [osg-users] OpenGL OSG Rendering 19 tessellation + LOD + tiles

2015-08-04 Thread Trajce Nikolov NICK
Hi Valerian,

I use for such purpose the osgEarth project ... It is OSG based

Nick

On Tue, Aug 4, 2015 at 5:05 PM, valerian merkling val.merkl...@gmail.com
wrote:

 Hi,

 To make it short (and cause my english is not good enough), there is a
 youtube video called OpenGL OSG Rendering 19 tessellation + LOD + tiles
 that show exactly what I need (but i cannot post links yet)

 I need to make the same :
 - map
 - with elevation
 - resolution of both changing with zoom

 How hard is it to make it with OSG ? What is already done ?

 I (could) want to make a game, and i liked the idea of playing on real
 maps !
 But i don't want to rush right into the coding part, and I would like to
 have more precision on what OSG can do for me.

 Thank you!

 Cheers,
 Valerian[/url]

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





 ___
 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


[osg-users] OpenGL OSG Rendering 19 tessellation + LOD + tiles

2015-08-04 Thread valerian merkling
Hi,

To make it short (and cause my english is not good enough), there is a youtube 
video called OpenGL OSG Rendering 19 tessellation + LOD + tiles that show 
exactly what I need (but i cannot post links yet)

I need to make the same :
- map
- with elevation
- resolution of both changing with zoom

How hard is it to make it with OSG ? What is already done ? 

I (could) want to make a game, and i liked the idea of playing on real maps ! 
But i don't want to rush right into the coding part, and I would like to have 
more precision on what OSG can do for me.

Thank you!

Cheers,
Valerian[/url]

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





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


Re: [osg-users] OpenGL Shader Compile Problem: repeated #version directive

2015-07-20 Thread Elias Tarasov
That would be great if you contact osgHimmel authors :) 
Meanwhile of course i try to fix it by myself.

... 

Thank you!

Cheers,
Elias

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





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


Re: [osg-users] OpenGL Shader Compile Problem: repeated #version directive

2015-07-20 Thread Sebastian Messerschmidt

Hi Elias,

First of all, please try to condense the error logs to a minimum when 
posting them. (and maybe attach them if you think someone wants to read 
them ;-))



Hi!

1.




/snip
0(5) : error C0204: version directive must be first statement and may not be 
repeated


Where is this line of code? Inside your code?



No, that line is in osgHimmel code.

2.


Have you tried to comment out the line above?



Yes, and in this case the error is:

Atmopshere Precomputed (took 7.45826 s)
Warning, can't assign attribute binding as no has been array assigned to set 
binding for.
PNG lib warning : iCCP: known incorrect sRGB profile
PNG lib warning : iCCP: known incorrect sRGB profile
VERTEX glCompileShader  FAILED
VERTEX Shader  infolog:
0(27) : error C5060: out can't be used with non-varying m_eye
0(28) : error C5060: out can't be used with non-varying m_ray

Okay that means you really need version 1.5 or above.

...
3.


Have you debugged with geDebugger or glIntercept to see which shader
source is sent to the driver? (You can also check the osg::Shader apply
i think).



Here is the header pattern of all osgHimmel shaders under gDEBugger:

#ifndef __version__
#define __version__

#version 150 compatibility

#endif // __version__
Okay if I understand your initial error message correctly, the above 
code is the troublemaker

the first line is #ifndef and not the #version ...
I believe the above construct might be considered invalid as #version 
and #ifdef are both preprocessor tags. So first line literally means 
first line of the source.

4.


Also check the osgShader example. Is it running as expected?



Yes, osgShaders works fine.

5. Also, i found that link:
https://www.opengl.org/discussion_boards/showthread.php/185603-Managing-several-versions-in-a-single-shader-file
There is a solution that maybe works: somehow pass version number through API.
I would contact the author of osgHimmel to fix the above problem. You 
could try yourself by removing the #ifdef and put the version in the 
first line for a quick check.
Unfortunately I cannot help you further with this as it seems specific 
to osgHimmel.


Cheers
Sebastian


Or something else maybe?

Thanks for help and patience!

Cheers,
Elias

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





___
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] OpenGL Shader Compile Problem: repeated #version directive

2015-07-20 Thread Sebastian Messerschmidt

Am 20.07.2015 um 09:42 schrieb Elias Tarasov:

That would be great if you contact osgHimmel authors :)
Meanwhile of course i try to fix it by myself.
Can't you do this yourself? I can delay some information to them or 
explain what might be the problem, but you should establish the contact


Cheers
Sebastian


...

Thank you!

Cheers,
Elias

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





___
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] OpenGL Shader Compile Problem: repeated #version directive

2015-07-20 Thread Elias Tarasov
Fixed!  :) 
The solution (in that particular case) is straightforward.
The code:

Code:

const std::string glsl_version_150()
{
static const std::string source(PRAGMA_ONCE(version,#version 150 
compatibility\n\n));
return source;
};




must be replaced by:


Code:

const std::string glsl_version_150()
{
static const std::string source(#version 150 compatibility\n\n);
return source;
};




Thank you for help and great patience!

Cheers,
Elias

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





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


Re: [osg-users] OpenGL Shader Compile Problem: repeated #version directive

2015-07-19 Thread Elias Tarasov
Hi!

1.

 
 
  
  /snip
  0(5) : error C0204: version directive must be first statement and may not 
  be repeated 
  
 
 Where is this line of code? Inside your code?
 


No, that line is in osgHimmel code.

2.

 
 Have you tried to comment out the line above? 
 


Yes, and in this case the error is:

Atmopshere Precomputed (took 7.45826 s)
Warning, can't assign attribute binding as no has been array assigned to set 
binding for.
PNG lib warning : iCCP: known incorrect sRGB profile
PNG lib warning : iCCP: known incorrect sRGB profile
VERTEX glCompileShader  FAILED
VERTEX Shader  infolog:
0(27) : error C5060: out can't be used with non-varying m_eye
0(28) : error C5060: out can't be used with non-varying m_ray

glLinkProgram  FAILED
Program  infolog:
Vertex info
---
0(27) : error C5060: out can't be used with non-varying m_eye
0(28) : error C5060: out can't be used with non-varying m_ray

Fragment info
-
0(106) : warning C7011: implicit cast from int to float
0(106) : warning C7011: implicit cast from int to float

VERTEX glCompileShader  FAILED
VERTEX Shader  infolog:
0(90) : error C5060: out can't be used with non-varying v_k
0(91) : error C5060: out can't be used with non-varying v_color
0(98) : warning C7011: implicit cast from int to float
0(113) : warning C7011: implicit cast from int to float
0(113) : warning C7011: implicit cast from int to float
0(119) : warning C7011: implicit cast from int to float
0(124) : warning C7548: '^' requires #extension GL_EXT_gpu_shader4 : enable 
before use
0(124) : warning C7011: implicit cast from int to float
0(124) : warning C7011: implicit cast from int to float
0(125) : warning C7532: global function texture requires #version 130 or later

GEOMETRY glCompileShader  FAILED
GEOMETRY Shader  infolog:
0(46) : error C: syntax error, unexpected '(', expecting :: at token (
0(54) : error C5060: out can't be used with non-varying g_color
0(58) : warning C7011: implicit cast from int to float
0(63) : warning C7532: global variable gl_in requires #version 150 or later
0(63) : warning C7532: global variable gl_Position requires #version 150 or 
later

glLinkProgram  FAILED
Program  infolog:
Vertex info
---
0(90) : error C5060: out can't be used with non-varying v_k
0(91) : error C5060: out can't be used with non-varying v_color
0(98) : warning C7011: implicit cast from int to float
0(113) : warning C7011: implicit cast from int to float
0(113) : warning C7011: implicit cast from int to float
0(119) : warning C7011: implicit cast from int to float
0(124) : warning C7548: '^' requires #extension GL_EXT_gpu_shader4 : enable 
before use
0(124) : warning C7011: implicit cast from int to float
0(124) : warning C7011: implicit cast from int to float
0(125) : warning C7532: global function texture requires #version 130 or later

Geometry info
-
0(46) : error C: syntax error, unexpected '(', expecting :: at token (
0(54) : error C5060: out can't be used with non-varying g_color
0(58) : warning C7011: implicit cast from int to float
0(63) : warning C7532: global variable gl_in requires #version 150 or later
0(63) : warning C7532: global variable gl_Position requires #version 150 or 
later

Fragment info
-
0(18) : warning C7011: implicit cast from int to float
0(20) : warning C7011: implicit cast from int to float
0(27) : warning C7011: implicit cast from int to float
0(28) : warning C7011: implicit cast from int to float

VERTEX glCompileShader  FAILED
VERTEX Shader  infolog:
0(8) : error C5060: out can't be used with non-varying m_tangent
0(9) : error C5060: out can't be used with non-varying m_eye

glLinkProgram  FAILED
Program  infolog:
Vertex info
---
0(8) : error C5060: out can't be used with non-varying m_tangent
0(9) : error C5060: out can't be used with non-varying m_eye

Fragment info
-
0(114) : warning C7011: implicit cast from int to float
0(118) : warning C7011: implicit cast from int to float
0(120) : warning C7011: implicit cast from int to float
0(120) : warning C7011: implicit cast from int to float
0(120) : warning C7011: implicit cast from int to float
0(120) : warning C7011: implicit cast from int to float
0(120) : warning C7011: implicit cast from int to float
0(122) : warning C7011: implicit cast from int to float
0(123) : warning C7011: implicit cast from int to float
0(123) : warning C7011: implicit cast from int to float
0(127) : warning C7011: implicit cast from int to float
0(129) : warning C7011: implicit cast from int to float
0(135) : warning C7011: implicit cast from int to float
0(144) : warning C7011: implicit cast from int to float
0(171) : warning C7011: implicit cast from int to float
0(171) : warning C7011: implicit cast from int to float
0(171) : warning C7011: implicit cast from int to float
0(171) : warning C7011: implicit cast from int to float
0(187) : warning C7011: implicit cast from int to float
0(187) : warning C7011: implicit cast from int to float
0(198) : 

Re: [osg-users] OpenGL Shader Compile Problem: repeated #version directive

2015-07-19 Thread Sebastian Messerschmidt

Am 18.07.2015 um 16:32 schrieb Elias Tarasov:

Hello!

GPU: nVidia 540M
Driver: 353.30
OpenGL version: 4.3.
OS Windows 7

I intend to use osgHimmel library in my project.
However, when i run the app, i get the shader's compile error:

Atmopshere Precomputed (took 7.95881 s)
Warning, can't assign attribute binding as no has been array assigned to set 
binding
PNG lib warning : iCCP: known incorrect sRGB profile
PNG lib warning : iCCP: known incorrect sRGB profile



/snip
0(5) : error C0204: version directive must be first statement and may not be 
repeated

Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: detected OpenGL error 'invalid value' at after RenderBin::draw(..)

I have several objects, each of which uses Vertex, Fragment, and Geometry 
shaders.
With a help of community's members here, i found the place where the error 
might be:

const std::string glsl_version_150()
{
static const std::string source(PRAGMA_ONCE(version,#version 150 
compatibility\n\n));
return source;
};


Where is this line of code? Inside your code?


This function is called every time to create any shader. And therefore #version 
directive is realy called multiple times.
According to OpenGL SL #version must be the first line and cannot be repeated.
However, this definition is unclear: Is #version must be the one and only one 
for the entire host OpenGL program? For the host object that uses shader? Or 
for every single main() entry of the shader?
Each source string needs to have the version line once and at the 
beginning. Basically everything you load via loadShaderSource or 
setShaderSource. (glShaderSource basically)


Can anybody pointed out how to solve that issue?
I'm afraid you will need to check the osgHimmel code for this if it is 
setting up the shaders. Have you tried to comment out the line above? 
Have you debugged with geDebugger or glIntercept to see which shader 
source is sent to the driver? (You can also check the osg::Shader apply 
i think).

Also check the osgShader example. Is it running as expected?

As long as you don't provide more information on what is going wrong on 
your side, chances are slim we can help you


Thank you!

Cheers,
Elias

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





___
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] OpenGL Shader Compile Problem: repeated #version directive

2015-07-18 Thread Elias Tarasov
Hello!

GPU: nVidia 540M
Driver: 353.30
OpenGL version: 4.3.
OS Windows 7

I intend to use osgHimmel library in my project.
However, when i run the app, i get the shader's compile error:

Atmopshere Precomputed (took 7.95881 s)
Warning, can't assign attribute binding as no has been array assigned to set 
binding
PNG lib warning : iCCP: known incorrect sRGB profile
PNG lib warning : iCCP: known incorrect sRGB profile
VERTEX glCompileShader  FAILED
VERTEX Shader  infolog:
0(5) : error C0204: version directive must be first statement and may not be 
repeated

FRAGMENT glCompileShader  FAILED
FRAGMENT Shader  infolog:
0(5) : error C0204: version directive must be first statement and may not be 
repeated

glLinkProgram  FAILED
Program  infolog:
Vertex info
---
0(5) : error C0204: version directive must be first statement and may not be 
repeated

Fragment info
-
0(5) : error C0204: version directive must be first statement and may not be 
repeated

VERTEX glCompileShader  FAILED
VERTEX Shader  infolog:
0(5) : error C0204: version directive must be first statement and may not be 
repeated

GEOMETRY glCompileShader  FAILED
GEOMETRY Shader  infolog:
0(5) : error C0204: version directive must be first statement and may not be 
repeated

FRAGMENT glCompileShader  FAILED
FRAGMENT Shader  infolog:
0(5) : error C0204: version directive must be first statement and may not be 
repeated

glLinkProgram  FAILED
Program  infolog:
Vertex info
---
0(5) : error C0204: version directive must be first statement and may not be 
repeated

Geometry info
-
0(5) : error C0204: version directive must be first statement and may not be 
repeated

Fragment info
-
0(5) : error C0204: version directive must be first statement and may not be 
repeated

VERTEX glCompileShader  FAILED
VERTEX Shader  infolog:
0(5) : error C0204: version directive must be first statement and may not be 
repeated

FRAGMENT glCompileShader  FAILED
FRAGMENT Shader  infolog:
0(5) : error C0204: version directive must be first statement and may not be 
repeated

glLinkProgram  FAILED
Program  infolog:
Vertex info
---
0(5) : error C0204: version directive must be first statement and may not be 
repeated

Fragment info
-
0(5) : error C0204: version directive must be first statement and may not be 
repeated

VERTEX glCompileShader  FAILED
VERTEX Shader  infolog:
0(5) : error C0204: version directive must be first statement and may not be 
repeated

FRAGMENT glCompileShader  FAILED
FRAGMENT Shader  infolog:
0(5) : error C0204: version directive must be first statement and may not be 
repeated

glLinkProgram  FAILED
Program  infolog:
Vertex info
---
0(5) : error C0204: version directive must be first statement and may not be 
repeated

Fragment info
-
0(5) : error C0204: version directive must be first statement and may not be 
repeated

Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: detected OpenGL error 'invalid value' at after RenderBin::draw(..)

I have several objects, each of which uses Vertex, Fragment, and Geometry 
shaders.
With a help of community's members here, i found the place where the error 
might be:

const std::string glsl_version_150()
{
static const std::string source(PRAGMA_ONCE(version,#version 150 
compatibility\n\n));
return source;
};

This function is called every time to create any shader. And therefore #version 
directive is realy called multiple times.
According to OpenGL SL #version must be the first line and cannot be repeated.
However, this definition is unclear: Is #version must be the one and only one 
for the entire host OpenGL program? For the host object that uses shader? Or 
for every single main() entry of the shader?

Can anybody pointed out how to solve that issue?

Thank you!

Cheers,
Elias

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





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


Re: [osg-users] OpenGL ES 2.0 can not load texture of model, OpenGL ES 1.0 can load smoothly

2014-11-09 Thread Liu Xiao
Hi Xia, I also met this problem, will please provide the details of how you 
solve this problem?
Thank you!


xiaqingran wrote:
 Hi,
 I have solved this. Thanks everyone.
 ... 
 
 Thank you!
 
 Cheers,
 Xia


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





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


Re: [osg-users] OpenGL ES 2.0 can not load texture of model, OpenGL ES 1.0 can load smoothly

2014-10-09 Thread Xia Qingran
Hi,
I have solved this. Thanks everyone.
... 

Thank you!

Cheers,
Xia

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





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


[osg-users] OpenGL ES 2.0 can not load texture of model, OpenGL ES 1.0 can load smoothly

2014-10-03 Thread Xia Qingran
Hi,

I have built the osgAndroidExampleGLES2 of examples and installed the apk on my 
Android phone.


It can not load the model's texutre. But the osgAndroidExampleGLES1 can load 
the texture smoothly.


I built the osg from the stable release 3.2.1 on windows7 x64 box with cygwin 
and Android NDK r10b.

Thanks for any help!

... 

Thank you!

Cheers,
Xia

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





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


Re: [osg-users] OpenGL error 'invalid operation' when adding 'unsigned int' Uniform

2014-09-15 Thread Sebastian Messerschmidt

Hi Selmar,

The type of the Sampler uniform must be _int_. If you change it, it 
should work as expected.

(usually the OpenGL  are signed and float-precision by default)

Cheers
Sebastian

Hi,

I encountered something peculiar. Everything seems to work fine, though.

I get the following warning message:



Warning: detected OpenGL error 'invalid operation' at After Renderer::compile



Investigating the issue (and stripping it down somewhat), I found that the 
error message disappears when I change 'unsigned int' in the following piece of 
code to 'int':


Code:

unsigned int texUnit = 0;
ref_ptrUniform uniform = new Uniform(sampler, texUnit);
stateSet-addUniform(uniform);




I'm curious if this is a bug or something I'm forgetting?

For completeness, here's the code that replicates the 'issue' for me:


Code:

#include osgViewer/Viewer

using namespace osg;

int main(int argc, char** argv)
{
 osgViewer::Viewer viewer;

 viewer.setUpViewInWindow(50, 50, 640, 480);

 ref_ptrGroup root = new Group;
 ref_ptrGeode geode = new Geode;
 ref_ptrGeometry geometry = new Geometry;

 root-addChild(geode);
 geode-addChild(geometry);

 geometry-setUseDisplayList(false);
 geometry-setUseVertexBufferObjects(true);

 ref_ptrStateSet stateSet = geometry-getOrCreateStateSet();

 ref_ptrProgram program = new Program();
 program-setName(TestProgram);
 stateSet-setAttributeAndModes( program, StateAttribute::ON );

 ref_ptrShader vertShader = new Shader(osg::Shader::Type::VERTEX);
 ref_ptrShader fragShader = new Shader(osg::Shader::Type::FRAGMENT);
 program-addShader(vertShader);
 program-addShader(fragShader);

 vertShader-setShaderSource(
 void main(void){\n
 gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;\n
 }\n
 );
 fragShader-setShaderSource(
 uniform sampler2D sampler;\n
 void main (void){\n
 gl_FragColor = vec4(1, 1, 1, 1) + texture2D(sampler, vec2(0, 
0)).rgba;\n
 }\n
 );

 osg::Vec3 quadVerts[] = {
 osg::Vec3(-1, -1, 1),
 osg::Vec3(1, -1, 1),
 osg::Vec3(1, 1, -1),
 osg::Vec3(-1, 1, -1)};

 geometry-setVertexArray( new Vec3Array(4, quadVerts) );
 geometry-addPrimitiveSet( new DrawArrays(PrimitiveSet::QUADS, 0, 1) );

 unsigned int texUnit = 0;
 ref_ptrUniform uniform = new Uniform(sampler, texUnit);
 stateSet-addUniform(uniform);

 viewer.setSceneData(root);

 viewer.run();
}




Thanks,

Selmar[/code]

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





___
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] OpenGL error 'invalid operation' when adding 'unsigned int' Uniform

2014-09-14 Thread Selmar Kok
Hi,

I encountered something peculiar. Everything seems to work fine, though.

I get the following warning message:


 
 Warning: detected OpenGL error 'invalid operation' at After Renderer::compile
 


Investigating the issue (and stripping it down somewhat), I found that the 
error message disappears when I change 'unsigned int' in the following piece of 
code to 'int':


Code:

unsigned int texUnit = 0;
ref_ptrUniform uniform = new Uniform(sampler, texUnit);
stateSet-addUniform(uniform);




I'm curious if this is a bug or something I'm forgetting?

For completeness, here's the code that replicates the 'issue' for me:


Code:

#include osgViewer/Viewer

using namespace osg;

int main(int argc, char** argv)
{
osgViewer::Viewer viewer;

viewer.setUpViewInWindow(50, 50, 640, 480);

ref_ptrGroup root = new Group;
ref_ptrGeode geode = new Geode;
ref_ptrGeometry geometry = new Geometry;

root-addChild(geode);
geode-addChild(geometry);

geometry-setUseDisplayList(false);
geometry-setUseVertexBufferObjects(true);

ref_ptrStateSet stateSet = geometry-getOrCreateStateSet();

ref_ptrProgram program = new Program();
program-setName(TestProgram);
stateSet-setAttributeAndModes( program, StateAttribute::ON );

ref_ptrShader vertShader = new Shader(osg::Shader::Type::VERTEX);
ref_ptrShader fragShader = new Shader(osg::Shader::Type::FRAGMENT);
program-addShader(vertShader);
program-addShader(fragShader);

vertShader-setShaderSource(
void main(void){\n
gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;\n
}\n
);
fragShader-setShaderSource(
uniform sampler2D sampler;\n
void main (void){\n
gl_FragColor = vec4(1, 1, 1, 1) + texture2D(sampler, vec2(0, 
0)).rgba;\n
}\n
);

osg::Vec3 quadVerts[] = {
osg::Vec3(-1, -1, 1),
osg::Vec3(1, -1, 1),
osg::Vec3(1, 1, -1),
osg::Vec3(-1, 1, -1)};

geometry-setVertexArray( new Vec3Array(4, quadVerts) );
geometry-addPrimitiveSet( new DrawArrays(PrimitiveSet::QUADS, 0, 1) );

unsigned int texUnit = 0;
ref_ptrUniform uniform = new Uniform(sampler, texUnit);
stateSet-addUniform(uniform);

viewer.setSceneData(root);

viewer.run();
}




Thanks,

Selmar[/code]

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





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


Re: [osg-users] OpenGL NG: thoughts?

2014-08-13 Thread Alistair Baxter
I think a key issue with OpenGL 3 was that it implemented Cool New Stuff, but 
froze out people from integrating that with the code they'd already written. 
OpenGL NG seems to be about just more efficient access to and control of the 
same old stuff.

If there is any new stuff, then for a while, I expect they will continue to 
include it in minor revisions of OpenGL 4. Mirroring this policy in 
OpenSceneGraph and a new successor seems to be the sensible approach.


As regards the existing device/OS-specific APIs, I'd expect AMD to sideline 
their API in favour of both DirectX 12 and OpenGL NG, and Apple to take up NS 
as a standard alternative to Metal, too. Microsoft? I'm sure they'll keep on 
with DirectX, but they caved on WebGL in IE the end, so they might be persuaded 
to let OpenGL ES or NG on to their mobile/console/store platforms, especially 
if more people are going to just use ANGLE anyway.


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


Re: [osg-users] OpenGL NG: thoughts?

2014-08-12 Thread Paul Martz
I like the idea of revamping the OpenGL API.

In fact, I liked that idea when it was originally proposed in 2007 as
OpenGL 3. Unfortunately, most other developers did not like what Khronos
and the ARB put forth in that design. It was not well-received. The final
OpenGL v3.0 spec came out a year later with almost no mention of the
previous year's promised sweeping API changes. Most hardware vendors found
themselves doing a mea culpa, recommitting to the FFP and promising
software vendors continued support and backwards compatibility. Will OpenGL
NG suffer the same fate? Let's see how it's marketed. They'll have to do
something different this time, that's for certain.

OpenGL v3.1 subsequently introduced the concepts of compatibility and core
profiles. Most of my recent work has been directly with OpenGL v4.x core
profile, and I've found it to be an amazingly flexible and powerful API. I
like the idea that I'm writing code for a state-of-the-art API and not
depending on deprecated functionality.

But apparently this was a false sense of security for me. Little is known
about OpenGL NG at this time, but one thing is almost certain: It will bear
little resemblance to OpenGL core profile. So, while I thought I was
writing state-of-the-art code, and was telling my clients it was the right
thing to do for a long-term investment, it now appears that OpenGL NG is
going to invalidate that.

I've been in the 3D graphics industry for almost 30 years and I've seen
APIs come and go. If you would've told me back in 1994 that I'd still be
working with OpenGL today, I would've laughed in your face. OpenGL FFP has
had an unprecedented run -- testimony to a great API. But there are new
kids in charge now, and they want to take OpenGL in a new direction, to
make it a better fir for today's chips, systems, and programming use cases.

Thus, my first point: Change is going to happen. OpenGL has been very
stable, but maintaining that stability forever would probably be harmful to
the API in the long run. As developers, we like stability. But we also jump
on new technologies as they come out. OpenGL NG? Some of us will like it,
some of us won't.


Secondly: Note that OpenGL NG is just vaporware at this point. The
announcement mentions several other new APIs that have been recently become
available. In my career, I have seen a lot of marketing FUD. I don't know
whether OpenGL NG will ever be a reality or not, but right now it smells a
little like FUD, dangling the promise of a shiny new redesigned OpenGL API
in front of any OpenGL developers considering jumping ship to another API.


Third, and finally. I'm tired of the OpenGL versus DirectX debate. I am so
tired of it. If Khronos feels it needs to churn out an OpenGL NG solely for
the purposes of competing with DirectX, then that is a sad statement.
OpenGL's evolution should not be driven by team mentality.

I hate what Microsoft has done to try to kill OpenGL. Every time I start a
new OpenGL-based project that must be cross-platform, I have to re-evaluate
which one of the crappy GLEW-like kludges I'm going to use to get the code
running on Windows.

Has anyone from Khronos approached Microsoft regarding a single unified
API? I doubt it. Remember Fahrenheit, yeah, yeah. But I have to wonder if
Microsoft is also getting tired of this particular API war. They are in an
especially vulnerable spot now, given the prevalence of OpenGL on embedded
devices, and their recent disastrous Windows 8. They might see some benefit
to contributing to OpenGL, rather than continue to fight it. This is not
the first time I've publicly stated that Khronos/ARB and Microsoft should
work together. It benefits us, and it benefits them. Call me an idealist.


If you've read this far, then you've indulged me much further than I
deserve. Go back to work. :-)


On Mon, Aug 11, 2014 at 5:13 PM, Ethan Fahy ethanf...@gmail.com wrote:

 OpenGL NG was announced today and is a complete API break.  It's not clear
 what the timeframe is on this project, but it does seem like a big deal
 long-term with major implications for OSG.  I'd be curious to hear any
 opinions on this development from the OSG community.


 http://www.anandtech.com/show/8363/khronos-announces-next-generation-opengl-initiative

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





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




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


Re: [osg-users] OpenGL NG: thoughts?

2014-08-12 Thread Robert Osfield
Hi Ethan, Paul, et. al.

Having been around OpenGL for a long time and seen various claims of revamp
come and go I'm inclined to like wait and see what happens.  The only
certainty will be that it'd be yet another API that hardware and software
vendors will need to support.  It only really helps if it can replace other
existing or proposed API's, what we want is less API's for hardware and
software vendors to work on so we can all concentrate on making what we
have perform well and work reliably.

In terms of replacing other new/proposed API's it'd need to replace MS's
Direct3D 12, AMD's Mantel and Apple's Metal in terms of the hardware
vendors focus.  Unfortunately MS, AMD and Apple all have their own agendas
and ego's so it's unlikely they'd just drop their own efforts on
concentrate on OpennGL NG.  This really means it'll be market forces that
will need to force their hand, i.e. the software vendor world needs to tell
MS, AMD and Apple no thanks, please just concentrate on OpenGL as we aren't
going to code for your API.  With OpenGL NG being just vapour-ware right
now it's kinda unlikely that we'll see any real movement away from this
competing for mid-share API's.

For OpenGL NG to work well it also needs to be back-ported to old OS's,
NVidia's recent promo on OpenGL 4.5 and Windows XP support gives me a
little encouragement in this direction, as I it sounds like OpenGL NG might
also fit in this role.

Having one OpenGL API across mobile and desktop just makes sense for
everyone, hardware vendors and software developers, but the difficulty
initially will be that vendors will need to maintain multiple driver teams
for a good deal longer.  Perhaps if adapter libraries could be written that
do OpenGL NG to ES drivers and OpenGL ES to NG drivers would help, a bit
like what ANGLE is doing right now for GLES - Direct3D.

Making an open source reference implementation of OpenGL NG would also be
something that would be useful.  The planned conformance suite is something
that could easily fit into this open source framework.

--

What it means for the OSG and users of the OSG is not something we can make
judgements on right now.  If the new library is major break from OpenGL and
ES in design then it may be an awkard fit for the OSG design, so just
adding into the GL, ES mix would not be easy or elegant to achieve.

Personally I'd love to be able to write a new clean scene graph API in
modern C++ an fully portable OpenGL NG library without need for lots of
platform specific code.  The OSG itself has traditionally retained  a
significant level of backwards compatibility so just like OpenGL itself -
the consequence is an API is bigger and more complex that a clean slate
scene graph would be.  Just like in OpenGL to OpenGL NG, one could also
envisage an OSG NG, however, it's essentially a new project, the old OSG
would still need to live on for a good deal longer simple because it's
needed.

Last year I started talking a little about a new scene graph project to
follow on from the OSG, I labelled it LSG (Lightweight Scene Graph) for
want of better name, and I've continued to think about it over the last
year but haven't done any coding on it.  I was thinking of LSG separating
the scene graph nodes from the graphics implementation in a way that would
allow multiple graphics implementations - so an OpenGL backend, and
separate OpenGL ES backend etc.  OpenGL NG could make the need for multiple
backends mute, which would simply development, but unless OpenGL NG was
quickly rolled out across all platforms, including old ones like XP, old
versions of Android etc., it would heavily limit LSG's use.

Another aspect to the LSG development is that I was looking at ways that
one could utilize LSG objects and rendering from within an existing OSG
application.  A OSG adapter node could enable a LSG scene graph to be added
to an OSG application and have the LSG take over rendering.  This approach
would enable one to retain existing OSG application code and move across to
LSG in a piece wise fashion rather than having to throw out the all the OSG
specific code in your application.  I don't know how seamlessly it could be
made to work, but if you have developers in both camps then it'd be much
easier to make it work.

If I were to spearhead an LSG effort I'd obviously want to make sure it's
leveraged as much as it can from the OSG community and code base.  All the
OSG's viewer and loaders you could potentially leveraged if one had an OSG
adapter node written very early in the projects inception.  If this
integration is their from the start then maintaining it long term becomes
much easier.

Perhaps one could envisage the OSG development slowing to become a
maintenance model, primarily adapting for platform changes rather than new
core features, and then focus new development work on the LSG.  Such a
model might see the last OSG release being finally tagged in a decade or
two's time... I suspect just like fixed function pipeline 

Re: [osg-users] OpenGL NG: thoughts?

2014-08-12 Thread Chris Hanson
I will merely throw in secondary comments because Paul and Robert have said
many of the major points.

I welcome our new direct-state overlords. I think OpenGL NG could be a
great idea. Apple and AMD have clearly seen the light with their own Mantle
and Metal efforts and Microsoft has been pushing this way with DX12. But
they are likely to suffer NIH-syndrome because no competitor wants to sign
on to an API that their opponent controls completely  (cf CUDA, DirectX,
etc).

I too, am wary of past failures like Fahrenheit and the original OpenGL 3.
But recent events (these new APIs, the change in market share to OpenGL ES
devices) have changed a lot of the landscape. Perhaps today they can
succeed where they failed in the past, if properly supported. I suspect
Microsoft might even have a teeny bit of interest in it, but they are so
internally conflicted that who knows. The fact that they are shipping
Office for iPad is a sea change over there and Satya Nadella could be the
difference.

Robert, what you describe as LSG sounds VERY much like the JAG project Paul
has been working on for a couple of years. Right down to the using OSG as a
transitional loader. JAG currently works pretty nicely with OpenGL 4 and
OpenGL ES, leaving out support for legacy/FFP features and leveraging
mature modern library dependencies (BOOST, POCO, GL3W, GMTL).

I can't comment on how JAG's current architecture might map to a NG API,
especially since we have no idea what that API might be. But I think it's
probably adaptable to it somehow, and is a good base to work from in the
future.

I am actually excited about the future potential of the OpenGL NG API. I
hope it goes good places and I'm looking forward to going there with it.

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


[osg-users] OpenGL NG: thoughts?

2014-08-11 Thread Ethan Fahy
OpenGL NG was announced today and is a complete API break.  It's not clear what 
the timeframe is on this project, but it does seem like a big deal long-term 
with major implications for OSG.  I'd be curious to hear any opinions on this 
development from the OSG community.

http://www.anandtech.com/show/8363/khronos-announces-next-generation-opengl-initiative

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





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


[osg-users] OpenGL 3.x and OSG

2014-03-20 Thread Boon Wah
Hi,

I managed to compile OSG 3.2 with GL3.h header. In CMAKE, I have checked 
only OSG_GL3_AVAILABLE .

However, when I run osgviewer.exe cow.osg, I get the following problem.
Warning: TexGen::apply(State) - not supported.
Warning: Material::apply(State) - not supported.

I am using Intel HD4000 graphics on Windows 8, with the latest 9.x drivers. 
I have checked that all OpenGL 3.x features are supported.

Can somebody help me explain this problem?

Thank you!

Boon

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





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


Re: [osg-users] OpenGL 3.x and OSG

2014-03-20 Thread Sebastian Messerschmidt

Hi Boon,

This topic has been discussed before. It boils down to the fact, that 
Materials/TexGen are fixed function pipeline features. So they are 
disabled with GL3.

Long story short: Materials are not support, neither is TexGen.
You will have to write your own shaders and define materials via 
uniforms to get the functionality back. I wrote a visitor for this which 
would remove the material states from the scene graph and replace them 
with uniforms to be sent to a shader (which has to be tailored to your 
needs)


cheers
Sebastian


Hi,

 I managed to compile OSG 3.2 with GL3.h header. In CMAKE, I have checked 
only OSG_GL3_AVAILABLE .

 However, when I run osgviewer.exe cow.osg, I get the following problem.
 Warning: TexGen::apply(State) - not supported.
 Warning: Material::apply(State) - not supported.

 I am using Intel HD4000 graphics on Windows 8, with the latest 9.x 
drivers. I have checked that all OpenGL 3.x features are supported.

 Can somebody help me explain this problem?

 Thank you!

Boon

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





___
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] OpenGL 3.x and OSG

2014-03-20 Thread Alistair Baxter
If you're only running on Windows, you'd be just as well not trying to build an 
OpenGL 3 core profile version of OSG, since by default it will use the most 
up-to-date version of OpenGL your card supports (probably 4.something), with 
the compatibility profile.

That way you can get all of the new functionality, and all of the old 
functionality too.

OpenGL's deprecation is only really enforced on OSX, so unless you are doing a 
mac port, it's probably easier to ignore it.

Alistair Baxter
Software Engineer

We'll be exhibiting at PDAC 2014 from booth #1607, 2nd - 5th March 2014.
For further information please visit http://www.mve.com/calendar

Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] OpenGL 3.x and OSG

2014-03-20 Thread Boon Wah
Hi,

Noted with thanks!


Thank you!

Cheers,
Boon

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





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


Re: [osg-users] OpenGL 3.x and OSG

2014-03-20 Thread Paul Martz
Unless, of course, you're actually trying to create a modern application.
Then you really do want core profile and must build OSG for GL3. Otherwise,
deprecated OpenGL usage will inevitably creep into your app code.

The OSG warnings in the OP's post really do serve a purpose. They alert you
to the fact that you're accessing outdated functionality, so that you can
proactively remove it.
   -Paul


On Thu, Mar 20, 2014 at 5:47 AM, Alistair Baxter alist...@mve.com wrote:

 If you're only running on Windows, you'd be just as well not trying to
 build an OpenGL 3 core profile version of OSG, since by default it will use
 the most up-to-date version of OpenGL your card supports (probably
 4.something), with the compatibility profile.

 That way you can get all of the new functionality, and all of the old
 functionality too.

 OpenGL's deprecation is only really enforced on OSX, so unless you are
 doing a mac port, it's probably easier to ignore it.

 Alistair Baxter
 Software Engineer

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


Re: [osg-users] opengl errors in compiling Openscenegraph 3.1.8 with Qt 5.0.2

2014-02-25 Thread Karim Elessawy
Hi,

Add the folloing in your .pro file

DEFINES += QT_NO_OPENGL

If you are using VS add in, then add QT_NO_OPENGL to your preprocessor defines

Hope this helps

... 

Thank you!

Cheers,
Karim

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





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


Re: [osg-users] OpenGL 4 support

2013-08-01 Thread Alistair Baxter
 Am i missing something here or is it a real pain to get GL3+ working with 
 OSG? 
 How does OSG support OpenGL 4.2 (as mentioned on the website) if it 
 isn't in sync with the glcorearb.h file and is still looking for gl3.h?


In order to build osg for Windows with OpenGL 3.x features, I needed to make 
the following change on Windows

In include/osg/GL

I replaced

#include GL3/gl3.h

with

#define GL_GLEXT_PROTOTYPES 1
#include GL/glcorearb.h
#include GL/glext.h
#define __gl_h_


And, obviously, I also needed to put the khronos.org headers where the osg 
build process could find them.


I should probably see about making those changes made to the trunk, since you 
can no longer get gl3.h from the official website.


Alistair Baxter
Software Engineer


Midland Valley's next public training events are:
13th - 15th August 2013 in Glasgow, UK
20th - 22nd August 2013 in Houston, USA

For further information please visit www.mve.com
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel: +44 (0) 141 332 2681
Fax:+44 (0) 141 332 6792
The structural geology experts 

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


Re: [osg-users] OpenGL 4 support

2013-08-01 Thread Robert Osfield
Hi Roger,

Are you wanting to just use some OpenGL 4.x with the compatibility
profile or do you want to core profile and avoid all the fuxed
function pipeline?

The OSG itself defines missing parts of various GL extensions that
aren't available in gl.h headers, including handling of MS's OpenGL
anceint headers so you can use advanced GL features without needing to
modify the systems gl.h.  Also at runtime the advanced
features/extensions are check for dynamically and switch on/off as
required.  This means that OSG users shouldn't ever have to touch core
gl.h headers.

Robert.


On 27 June 2013 09:08, Roger Floydman roger.floyd...@gmail.com wrote:
 Hi,

 I'd heard lots of good things about OpenSceneGraph so decided to give it a 
 try. On the 'features' page it says OpenGL 1.0 through to OpenGL 4.2, and 
 OpenGL ES 1.1 and 2.0 are supported which is good as i wanted to use 'modern 
 GL techniques'

 I decided to build from source as i wanted to integrate with Qt and it seems 
 there's been some work related to this in the osgQt module which i thought 
 would be good to have.

 The problems started when i wanted to use a newer GL version. In CMake the 
 option was to used GL3 so i selected that and deselected all the other GL 
 options. When trying to build OSG it complained that gl3.h couldn't be found. 
 So i went on a hunt for that and found the file no longer exists. It has been 
 replaced by glcorearb.h.

 I made a work around to get passed that error but creating my own gl3.h file 
 and including the glcorearb.h file  defining GLCOREARB_PROTOTYPES 1

 Later in the build though i come across another error as GL/gl.h is included 
 via osgQt/GraphicsWindowQt and this file cannot be mixed with glcorearb.h

 Am i missing something here or is it a real pain to get GL3+ working with 
 OSG? How does OSG support OpenGL 4.2 (as mentioned on the website) if it 
 isn't in sync with the glcorearb.h file and is still looking for gl3.h?

 Any help much appreciated.

 Thanks,

 Roger

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





 ___
 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] OpenGL 4 support

2013-08-01 Thread Paul Martz
If you don't build OSG with the GL3_AVAILABLE CMake flag, then OSG
supports GL3 and GL4 functionality via a GL 2.1 context and the OpenGL
extension interface.

Selecting the GL3_AVAILABLE flag allows you to open GL3/4 contexts. This
functionality was added in the OSG 2.9.x series. To my knowledge, there has
been little or no development of GL3/4 contexts since; that's why OSG still
includes gl3.h instead of glcorearb.h. You might consider contributing an
update.

To my knowledge, the osgQt library was never tested with a GL3/4 context.

There is an example osgsimplegl3 to test/demo an OpenGL 3.1 context. This
example works fine on Windows last time I checked. The example source has
some comments at the bottom of the file.

There is a known issue with core profile contexts because core profile
requires use of vertex array objects. As far as I know, OSG has no support
for vertex array objects. This is a roadblock to using OSG/GL3 on OSX.

Much of this has been discussed in the past, so I'd recommend searching the
osg-users archives for additional information.


On Thu, Jun 27, 2013 at 3:08 AM, Roger Floydman roger.floyd...@gmail.comwrote:

 Hi,

 I'd heard lots of good things about OpenSceneGraph so decided to give it a
 try. On the 'features' page it says OpenGL 1.0 through to OpenGL 4.2, and
 OpenGL ES 1.1 and 2.0 are supported which is good as i wanted to use
 'modern GL techniques'

 I decided to build from source as i wanted to integrate with Qt and it
 seems there's been some work related to this in the osgQt module which i
 thought would be good to have.

 The problems started when i wanted to use a newer GL version. In CMake the
 option was to used GL3 so i selected that and deselected all the other GL
 options. When trying to build OSG it complained that gl3.h couldn't be
 found. So i went on a hunt for that and found the file no longer exists. It
 has been replaced by glcorearb.h.

 I made a work around to get passed that error but creating my own gl3.h
 file and including the glcorearb.h file  defining GLCOREARB_PROTOTYPES 1

 Later in the build though i come across another error as GL/gl.h is
 included via osgQt/GraphicsWindowQt and this file cannot be mixed with
 glcorearb.h

 Am i missing something here or is it a real pain to get GL3+ working with
 OSG? How does OSG support OpenGL 4.2 (as mentioned on the website) if it
 isn't in sync with the glcorearb.h file and is still looking for gl3.h?

 Any help much appreciated.

 Thanks,

 Roger

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





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




-- 
Paul Martz
Skew Matrix Software LLC
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenGL 4 support

2013-08-01 Thread Roger Floydman
Hi Robert,

I would like to use some of the OpenGL 4.x features with the compatibility 
profile. To do that, do i need to use the setGLExtensionFuncPtr method to get 
access to the GL funtions i wish to use? (E.g. glGenVertexArrays )

Thanks,

Roger


robertosfield wrote:
 Hi Roger,
 
 Are you wanting to just use some OpenGL 4.x with the compatibility
 profile or do you want to core profile and avoid all the fuxed
 function pipeline?
 
 The OSG itself defines missing parts of various GL extensions that
 aren't available in gl.h headers, including handling of MS's OpenGL
 anceint headers so you can use advanced GL features without needing to
 modify the systems gl.h.  Also at runtime the advanced
 features/extensions are check for dynamically and switch on/off as
 required.  This means that OSG users shouldn't ever have to touch core
 gl.h headers.
 
 Robert.
 
 
 On 27 June 2013 09:08, Roger Floydman  wrote:
 
  Hi,
  
  I'd heard lots of good things about OpenSceneGraph so decided to give it a 
  try. On the 'features' page it says OpenGL 1.0 through to OpenGL 4.2, and 
  OpenGL ES 1.1 and 2.0 are supported which is good as i wanted to use 
  'modern GL techniques'
  
  I decided to build from source as i wanted to integrate with Qt and it 
  seems there's been some work related to this in the osgQt module which i 
  thought would be good to have.
  
  The problems started when i wanted to use a newer GL version. In CMake the 
  option was to used GL3 so i selected that and deselected all the other GL 
  options. When trying to build OSG it complained that gl3.h couldn't be 
  found. So i went on a hunt for that and found the file no longer exists. It 
  has been replaced by glcorearb.h.
  
  I made a work around to get passed that error but creating my own gl3.h 
  file and including the glcorearb.h file  defining GLCOREARB_PROTOTYPES 1
  
  Later in the build though i come across another error as GL/gl.h is 
  included via osgQt/GraphicsWindowQt and this file cannot be mixed with 
  glcorearb.h
  
  Am i missing something here or is it a real pain to get GL3+ working with 
  OSG? How does OSG support OpenGL 4.2 (as mentioned on the website) if it 
  isn't in sync with the glcorearb.h file and is still looking for gl3.h?
  
  Any help much appreciated.
  
  Thanks,
  
  Roger
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=54943#54943
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 ___
 osg-users mailing list
 
 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=55697#55697





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


[osg-users] OpenGL 4 support

2013-07-31 Thread Roger Floydman
Hi,

I'd heard lots of good things about OpenSceneGraph so decided to give it a try. 
On the 'features' page it says OpenGL 1.0 through to OpenGL 4.2, and OpenGL ES 
1.1 and 2.0 are supported which is good as i wanted to use 'modern GL 
techniques'

I decided to build from source as i wanted to integrate with Qt and it seems 
there's been some work related to this in the osgQt module which i thought 
would be good to have.

The problems started when i wanted to use a newer GL version. In CMake the 
option was to used GL3 so i selected that and deselected all the other GL 
options. When trying to build OSG it complained that gl3.h couldn't be found. 
So i went on a hunt for that and found the file no longer exists. It has been 
replaced by glcorearb.h. 

I made a work around to get passed that error but creating my own gl3.h file 
and including the glcorearb.h file  defining GLCOREARB_PROTOTYPES 1

Later in the build though i come across another error as GL/gl.h is included 
via osgQt/GraphicsWindowQt and this file cannot be mixed with glcorearb.h

Am i missing something here or is it a real pain to get GL3+ working with OSG? 
How does OSG support OpenGL 4.2 (as mentioned on the website) if it isn't in 
sync with the glcorearb.h file and is still looking for gl3.h?

Any help much appreciated.

Thanks,

Roger

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





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


[osg-users] opengl errors in compiling Openscenegraph 3.1.8 with Qt 5.0.2

2013-07-31 Thread Lokesh Kumar
Hi,

 
I'm trying to compile openscenegraph-3.1.8 with Qt 5.0.2 using mingw-32 
compiler after configuring with cmake 2.8.11 on windows 7 (basic).

But, in the compilation process i got the following errors :-


Code:
In file included from 
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtGui/qopengl.h:55:0,
 from C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/qgl.h:47,
 from 
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/QGLWidget:1,
 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:24,
 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/GLES2/gl2.h:38:26: error: conflicting 
declaration 'typedef khronos_intptr_t GLintptr'
In file included from C:/OpenSceneGraph-3.1.8/include/osg/Array:34:0,
 from C:/OpenSceneGraph-3.1.8/include/osg/Uniform:23,
 from C:/OpenSceneGraph-3.1.8/include/osg/StateSet:20,
 from C:/OpenSceneGraph-3.1.8/include/osg/State:18,
 from C:/OpenSceneGraph-3.1.8/include/osg/GraphicsContext:17,
 from 
C:/OpenSceneGraph-3.1.8/include/osgViewer/GraphicsWindow:17,
 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:17,
 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/OpenSceneGraph-3.1.8/include/osg/BufferObject:47:21: error: 'GLintptr' has a 
previous declaration as 'typedef int GLintptr'
In file included from 
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtGui/qopengl.h:55:0,
 from C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/qgl.h:47,
 from 
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/QGLWidget:1,
 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:24,
 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/GLES2/gl2.h:39:26: error: conflicting 
declaration 'typedef khronos_ssize_t GLsizeiptr'
In file included from C:/OpenSceneGraph-3.1.8/include/osg/Array:34:0,
 from C:/OpenSceneGraph-3.1.8/include/osg/Uniform:23,
 from C:/OpenSceneGraph-3.1.8/include/osg/StateSet:20,
 from C:/OpenSceneGraph-3.1.8/include/osg/State:18,  
 from C:/OpenSceneGraph-3.1.8/include/osg/GraphicsContext:17,
 from 
C:/OpenSceneGraph-3.1.8/include/osgViewer/GraphicsWindow:17,
 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:17,
 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/OpenSceneGraph-3.1.8/include/osg/BufferObject:48:21: error: 'GLsizeiptr' has 
a previous declaration as 'typedef int GLsizeiptr'



I searched google as well google regarding these conflicting declaration errors 
on google errors, but didn't find anything. 
Please help me.

Thank you!

Cheers,
Lokesh[/code]

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




Attachments: 
http://forum.openscenegraph.org//files/compilation_errors_935.txt


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


[osg-users] OpenGL ES 2.0 on windows

2013-07-30 Thread Sergey Kurdakov
Hi Robert,

working with OpenGL ES 2.0 with Angle ( I also checked ATI OpenGL ES SDK )
with osg 3.2
I have a warning Detected OpenGL error invalid enumerant on this line in
State.cpp

 glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);

( in following part of  code in function void
State::initializeExtensionProcs()  )

 if ( osg::getGLVersionNumber() = 2.0 ||
osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) ||
OSG_GLES2_FEATURES)
{

glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits);
glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);
}



I asked Angle project list that maybe they are wrong here ( but still ATI
ES SDK also lacks GL_MAX_TEXTURE_COORDS ) and they responded they are not,
the  GL_MAX_TEXTURE_COORDS is underfined for OpenGL ES 2.0


So, possibly here there should be a code like

if ( osg::getGLVersionNumber() = 2.0 ||
osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) ||
OSG_GLES2_FEATURES)
{

glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits);
if(OSG_GLES2_FEATURES)
{
_glMaxTextureCoords = _glMaxTextureUnits;
}
else
glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);
}

?

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


Re: [osg-users] OpenGL ES 2.0 on windows

2013-07-30 Thread Robert Osfield
Hi Sergey,

You suggested change looks reasonable.  Curious that others including
myself haven't spotted this error so I can only presume that quite a
few GLES implementations do indeed included support for
GL_MAX_TEXTURE_COORDS.  Once you have the code working cleanly could
you post the modified file to osg-submissions.

Thanks,
Robert.

On 31 July 2013 04:18, Sergey Kurdakov sergey.fo...@gmail.com wrote:
 Hi Robert,

 working with OpenGL ES 2.0 with Angle ( I also checked ATI OpenGL ES SDK )
 with osg 3.2
 I have a warning Detected OpenGL error invalid enumerant on this line in
 State.cpp

  glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);

 ( in following part of  code in function void
 State::initializeExtensionProcs()  )

  if ( osg::getGLVersionNumber() = 2.0 ||
 osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) ||
 OSG_GLES2_FEATURES)
 {

 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits);
 glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);
 }



 I asked Angle project list that maybe they are wrong here ( but still ATI ES
 SDK also lacks GL_MAX_TEXTURE_COORDS ) and they responded they are not, the
 GL_MAX_TEXTURE_COORDS is underfined for OpenGL ES 2.0


 So, possibly here there should be a code like

 if ( osg::getGLVersionNumber() = 2.0 ||
 osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) ||
 OSG_GLES2_FEATURES)
 {

 glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits);
 if(OSG_GLES2_FEATURES)
 {
 _glMaxTextureCoords = _glMaxTextureUnits;
 }
 else
 glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);
 }

 ?

 Best regards
 Sergey





 ___
 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] OpenGL ES 2.0 on windows

2013-07-30 Thread Sergey Kurdakov
Hi Robert,

Once you have the code working cleanly could
you post the modified file to osg-submissions.

ok,

checking now.

Regards
Sergey

On Wed, Jul 31, 2013 at 9:29 AM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Sergey,

 You suggested change looks reasonable.  Curious that others including
 myself haven't spotted this error so I can only presume that quite a
 few GLES implementations do indeed included support for
 GL_MAX_TEXTURE_COORDS.  Once you have the code working cleanly could
 you post the modified file to osg-submissions.

 Thanks,
 Robert.


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


[osg-users] opengl errors in compiling Openscenegraph 3.1.8 with Qt 5.0.2

2013-07-05 Thread Lokesh
I'm trying to compile openscenegraph-3.1.8 with Qt 5.0.2 using mingw-32
compiler after configuring with cmake 2.8.11 on windows 7 (basic).

But, in the compilation process i got the following errors :-


In file included from
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtGui/qopengl.h:55:0,
 from C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/qgl.h:47,
 from
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/QGLWidget:1,
 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:24,
 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/GLES2/gl2.h:38:26: error: conflicting
declaration 'typedef khronos_intptr_t GLintptr'
In file included from C:/OpenSceneGraph-3.1.8/include/osg/Array:34:0,
 from C:/OpenSceneGraph-3.1.8/include/osg/Uniform:23,
 from C:/OpenSceneGraph-3.1.8/include/osg/StateSet:20,
 from C:/OpenSceneGraph-3.1.8/include/osg/State:18,
 from C:/OpenSceneGraph-3.1.8/include/osg/GraphicsContext:17,
 from
C:/OpenSceneGraph-3.1.8/include/osgViewer/GraphicsWindow:17,
 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:17,
 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/OpenSceneGraph-3.1.8/include/osg/BufferObject:47:21: error: 'GLintptr'
has a previous declaration as 'typedef int GLintptr'
In file included from
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtGui/qopengl.h:55:0,
 from C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/qgl.h:47,
 from
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtOpenGL/QGLWidget:1,
 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:24,
 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/GLES2/gl2.h:39:26: error: conflicting
declaration 'typedef khronos_ssize_t GLsizeiptr'
In file included from C:/OpenSceneGraph-3.1.8/include/osg/Array:34:0,
 from C:/OpenSceneGraph-3.1.8/include/osg/Uniform:23,
 from C:/OpenSceneGraph-3.1.8/include/osg/StateSet:20,
 from C:/OpenSceneGraph-3.1.8/include/osg/State:18,  
 from C:/OpenSceneGraph-3.1.8/include/osg/GraphicsContext:17,
 from
C:/OpenSceneGraph-3.1.8/include/osgViewer/GraphicsWindow:17,
 from C:/OpenSceneGraph-3.1.8/include/osgQt/GraphicsWindowQt:17,
 from C:\OpenSceneGraph-3.1.8\src\osgQt\GraphicsWindowQt.cpp:15:
C:/OpenSceneGraph-3.1.8/include/osg/BufferObject:48:21: error: 'GLsizeiptr'
has a previous declaration as 'typedef int GLsizeiptr'


i googled regarding these conflicting declaration errors, but didn't find
anything. 

Please help me.

Regards
Lokesh


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


Re: [osg-users] opengl errors in compiling Openscenegraph 3.1.8 with Qt 5.0.2

2013-07-05 Thread Jan Ciger
On Fri, Jul 5, 2013 at 1:47 PM, Lokesh lokeshkumar.2...@msit.in wrote:
 I'm trying to compile openscenegraph-3.1.8 with Qt 5.0.2 using mingw-32
 compiler after configuring with cmake 2.8.11 on windows 7 (basic).

 But, in the compilation process i got the following errors :-

I assume you are not trying to use OpenGL ES with Qt on desktop. In
that case that is likely another occurrence of a Qt bug, where they
expect some things to be #defines instead of typedefs - that breaks
their macros. There were similar issues with other compilers too. Try
the latest Qt 5.1, perhaps it is fixed. If not, you can try building
with Visual Studio Express, for that one I have submitted some fixes.

Regards,

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


Re: [osg-users] opengl errors in compiling Openscenegraph 3.1.8 with Qt 5.0.2

2013-07-05 Thread Jan Ciger
On Fri, Jul 5, 2013 at 1:47 PM, Lokesh lokeshkumar.2...@msit.in wrote:
 I'm trying to compile openscenegraph-3.1.8 with Qt 5.0.2 using mingw-32
 compiler after configuring with cmake 2.8.11 on windows 7 (basic).

 But, in the compilation process i got the following errors :-

Oh another thing - http://qt-project.org/forums/viewthread/24535
Make sure that you are building against the correct version of Qt -
the one with the -opengl suffix. The normal one has its own minimal
OpenGL ES implementation using Direct3D and causes conflicts when you
try using normal OpenGL.

Regards,

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


Re: [osg-users] OpenGL 3.2 support in OS X 10.7 (Lion)

2013-06-28 Thread Robert Osfield
Hi Roman,

I'm currently looking through my archives for pending submissions and
spotted this post from you, it was never formally addressed as a
submission though, is it intended to be merged?  Could you get things
working under svn/trunk and send me the whole files zipped up to avoid
the forum mangling the attachments.

Thanks,
Robert.

On 2 November 2012 13:08, Roman Grigoriev grigor...@gosniias.ru wrote:
 Hi, I followed to advice of David Garcia
 to modify buffer object as he said but it doesn't work on linux.
 To use forward context we definitly need VAO.
 Here is my modified versions to support VAO.
 In submissions there is GraphicsContextX11.cpp to open true 3.1 and up window.
 Thank you!
 Cheers,
 Roman

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




 Attachments:
 http://forum.openscenegraph.org//files/266_1351861595._536.
 http://forum.openscenegraph.org//files/bufferobject_202.cpp


 ___
 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] OpenGL 3.x support

2013-05-30 Thread Sergey Kurdakov
Hi,

just for ref


https://hogbox.googlecode.com

has following code which might be of some use:

https://code.google.com/p/hogbox/source/browse/trunk/include/hogbox/HogBoxMaterial.h
https://code.google.com/p/hogbox/source/browse/trunk/src/hogbox/HogBoxMaterial.cpp

https://code.google.com/p/hogbox/source/browse/trunk/include/hogbox/HogBoxLight.h
https://code.google.com/p/hogbox/source/browse/trunk/src/hogbox/HogBoxLight.cpp

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


[osg-users] OpenGL 3.x support

2013-05-27 Thread Sebastian Messerschmidt

Hello folks,

What is the current status of the OpenGL 3.x, 4.x support in OSG?
I'm asking, because I'm quite unsure if it makes sense to move to the 
newer Implementations.

In detail I'd be interested in the following issues:

1. Handling of Matrices etc.
I know of the osg_* uniforms for the modelview/projection matrices.
Is there something missing, or are the replacements there completely? (a 
list would be nice)


2. Handling of glMaterial etc.
Is there some handling of materials, lights etc?
My naive expectation would be, that there are replacements for the 
glMaterial and glLight calls, which are setting uniform structs.


3. Handling of various osgXXX libraries.
What about basic support for osgParticle, osgShadow etc.? Is there 
something usable right now? Or would we have to invest further work here 
aswell?


4. Are there any other cave-eats I forgot?

cheers
Sebastian


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


[osg-users] OpenGL ES 2.0 and static libraries - compiler error (bug?)

2013-03-03 Thread Hartwig Wiesmann
Hi,

GLStaticLibrary.cpp defines the function

  void initGLES2ProcAddress();

even if GLES2 is not defined. This leads to some compiling errors because some 
functions do not exist in OpenGL ES 1.

I think initGLES2ProcAddrees() should be surrounded by 

#ifdef OSG_GLES2_AVAILABLE

...

#endif

Thank you!

Cheers,
Hartwig

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





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


[osg-users] OpenGL ES 2.0 and shaders

2013-03-02 Thread Hartwig Wiesmann
Hi,

it seems to be that OSG creates in ShaderGenCache::createStateSet the shader 
statement

gl_FrontColor = gl_Color;

if the state mask is not set.

But when using OpenGL ES 2.0 gl_FrontColor does not exist. Is this a bug or am 
I missing anything?

Cheers,
Hartwig

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





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


Re: [osg-users] OpenGL 3.2 support in OS X 10.7 (Lion)

2012-11-02 Thread Roman Grigoriev
Hi, I followed to advice of David Garcia
to modify buffer object as he said but it doesn't work on linux.
To use forward context we definitly need VAO.
Here is my modified versions to support VAO.
In submissions there is GraphicsContextX11.cpp to open true 3.1 and up window.
Thank you!
Cheers,
Roman

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




Attachments: 
http://forum.openscenegraph.org//files/266_1351861595._536.
http://forum.openscenegraph.org//files/bufferobject_202.cpp


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


Re: [osg-users] OpenGL 3.2 support in OS X 10.7 (Lion)

2012-10-03 Thread Craig Bosma
Robert, Paul, et. al:

Has any further discussion or work gone into adding proper VAO support
to OSG? I'm interested in contributing if I can, mostly because I'd
like to see full 3.2 support for OS X.

Craig

On Mon, Mar 5, 2012 at 8:22 AM, Robert Osfield robert.osfi...@gmail.com wrote:
 Hi David,

 On 4 March 2012 20:55, David Garcia da...@aimsun.com wrote:

 Yes, I think so too. Unfortunately Apple decides that a VAO is required. I
 can fill a radar and ask in the developer forums but, for now, what is the
 best solution?


 The think that we should implement proper VAO support. I'm not familiar with
 this new feature yet, but would guess that it should probably sit in
 osg::Array and osg::BufferData.  I'm open to suggestions.

 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


Re: [osg-users] OpenGL 3.2 support in OS X 10.7 (Lion)

2012-10-03 Thread Paul Martz

Hi Craig -- as far as I know, no one is using vertex array objects with OSG.

I am using OSG built for GL3 in an external OpenGL 3/4 project, but for file 
loading only, not for rendering. (The external project requires OSG built for 
GL3 in order to avoid including both gl.h and gl3.h in the same source.) I'm 
using OSG svn trunk HEAD for this, and it works great on both Windows and OSX 
(not yet tested on Linux). But the external project does the rendering, not OSG, 
so my work here doesn't help you with OSG's current lack of VAO support.


I think it'd be great to have VAO support in OSG. You might want to post some 
design ideas here for discussion, and review by Robert (as it would involve 
changes to core OSG).

   -Paul



On 10/3/2012 9:45 AM, Craig Bosma wrote:

Robert, Paul, et. al:

Has any further discussion or work gone into adding proper VAO support
to OSG? I'm interested in contributing if I can, mostly because I'd
like to see full 3.2 support for OS X.

Craig

On Mon, Mar 5, 2012 at 8:22 AM, Robert Osfieldrobert.osfi...@gmail.com  wrote:

Hi David,

On 4 March 2012 20:55, David Garciada...@aimsun.com  wrote:


Yes, I think so too. Unfortunately Apple decides that a VAO is required. I
can fill a radar and ask in the developer forums but, for now, what is the
best solution?



The think that we should implement proper VAO support. I'm not familiar with
this new feature yet, but would guess that it should probably sit in
osg::Array and osg::BufferData.  I'm open to suggestions.

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



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


Re: [osg-users] OpenGL ES 2 iOS 5.1 Non power of two textures

2012-09-26 Thread Thomas Hogarth
Hi Guillaume

I can confirm NPOT textures work in GLES2.

Did you try setting the wrap mode to CLAMP_TO_EDGE


Tom

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





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


Re: [osg-users] OpenGL ES 2 iOS 5.1 Non power of two textures

2012-09-25 Thread Guillaume Tazé
Hi,

I tried to use non power of two textures under iOS 5.1 with OpenGL ES 2 (on 
Ipad 2) but didn't succeed so far.. Am i missing something ?

I'm using this kind of code :

texture = new osg::Texture2D();
texture-setImage(0, image);
texture-setResizeNonPowerOfTwoHint(false);
texture-setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
texture-setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);

and then osg::createTexturedQuadGeometry to create my geometry...

I'm getting an error : Warning: detected OpenGL error 'invalid enumerant' at 
after RenderBin::draw(..).

It seems like the extension GL_APPLE_texture_2D_limited_npot is available on 
Ipad 2... ?

Can someone help me please :) ?

Thank you!

Cheers,
Guillaume

EDIT : Nevermind, i thought that the GL_APPLE_texture_2D_limited_npot was 
available in OpenGL ES 2 but it is only on OpenGL ES 1 for the Ipad. Turning to 
OpenGL ES 1 is working !

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





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


Re: [osg-users] OpenGL context and wglGetProcAddress

2012-09-18 Thread Robert Osfield
HI Peterakos,

I don't use Windows so can't answer specifically on MS issues, but in
general the OpenGL related GetProcAddress functions require a context
to be valid for them to work, so perhaps the initialization order of
your application has the external widget set being called before a
valid context has been created for that thread.

The OSG can create rendering threads in the background so it's quite
normal for the main thread never to have a graphics context current,
so any OpenGL calls in the main will fail, perhaps you code is doing
this.  The OSG has osgViewer library has RealizeOperation that you can
use to initialize OpenGL code once a graphics context has been
created. The OSG examples that use a RealizeOperation are:

~/OpenSceneGraph/examples$ grep RealizeOperation */*
osgcatch/osgcatch.cpp:viewer.setRealizeOperation(new
CompileStateCallback(seh));
osgshaderterrain/osgshaderterrain.cpp:
viewer.setRealizeOperation(testSupportOperation.get());
osgvolume/osgvolume.cpp:
viewer.setRealizeOperation(testSupportOperation.get());


Robert.

On 17 September 2012 18:01, Peterakos ppapa...@csd.uoc.gr wrote:
 Hello.

 I am trying to use an external widget library in osg.
 This library tries to load the opengl functions during initialization using
 wglGetProcAddress.

 This procedure works in opengl but not in open scene graph. It fails for
 functions in gl 1.2 and later.
 I found this: The Microsoft Windows DLL opengl32.dll only directly exposes
 OpenGL 1.1 functions. To gain access to functions from higher GL versions,
 you must load these function pointers manually with wglGetProcAddress.

 So the library cant load the functions using wglGetProcAddress.

 Is there any reason for that happening ?


 Thank you for your time.

 ___
 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] OpenGL context and wglGetProcAddress

2012-09-18 Thread Peterakos
Thank you very much.

it worked.
I added the init function of the widget toolkit in the callback.

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


[osg-users] OpenGL context and wglGetProcAddress

2012-09-17 Thread Peterakos
Hello.

I am trying to use an external widget library in osg.
This library tries to load the opengl functions during initialization using
wglGetProcAddress.

This procedure works in opengl but not in open scene graph. It fails for
functions in gl 1.2 and later.
I found this: The Microsoft Windows DLL opengl32.dll only directly
exposes *OpenGL
1.1* functions. To gain access to functions from higher GL versions, you
must load these function pointers manually with wglGetProcAddress.

So the library cant load the functions using wglGetProcAddress.

Is there any reason for that happening ?


Thank you for your time.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Opengl 3

2012-09-12 Thread Peterakos
Hello.

I did exactly what's written in comments in osgsimplegl3, except teh
CMAKE_CXX_FLAGS thing.
I created the solution, built it and worked fine except for 2 projects
which concern QT.
I managed to ran the osgsimplegl3.
The only thing i did with the gl3/gl3.h is to add this path in visual
studio's include path.

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


Re: [osg-users] Opengl 3

2012-09-12 Thread Paul Martz



On 9/12/2012 2:47 AM, Peterakos wrote:

Hello.

I did exactly what's written in comments in osgsimplegl3, except teh
CMAKE_CXX_FLAGS thing.
I created the solution, built it and worked fine except for 2 projects which
concern QT.


So the errors you posted were from OSG's Qt source? Since you did not post the 
full error text, I had no way of knowing that. Instead, I assumed you were 
seeing those errors in libosg.


I rarely build OSG with Qt and have never built OSG/GL3 with Qt, so this is 
completely untested as far as I know. Qt 4.8.x does have GL3 context creation 
support, so it should be possible to make it work with OSG/GL3, but all the GL3 
development efforts to date have been with osgViewer on Windows. If you need Qt 
support in OSG/GL3, please make any changes and post a submission.

   -Paul


I managed to ran the osgsimplegl3.
The only thing i did with the gl3/gl3.h is to add this path in visual studio's
include path.

thnx.


___
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] Opengl 3

2012-09-12 Thread Peterakos
Hello

These error i posted in my first post gave me a hard time. Even though I
tried everything to make them disappear they simple didnt.
I even tried to delete the whole OpenScenegraph/build directory and build
everything from scratch. But they were still there.

After that i deleted everything that had to do with openscenegraph and
build everything again. Only then they disappeared (i used the same
settings in cmake that i was using before). I cant explain it.

So now I build open scene graph with the open gl 3 cmake settings and i run
osgsimplegl3 with no problems (except for the 2 projects that relate with
qt).

Thank you for your time.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Opengl 3

2012-09-11 Thread Peterakos
Hello.

In the example you mention the is this text:

Add the path to GL3/gl3.h to the CMake compiler flags, CMAKE_CXX_FLAGS and
CMAKE_CXX_FLAGS_DEBUG (for release and debug builds; others if you use other
build configurations). The text to add should look something like this:
/I “C:\GLHeader”
The folder GLHeader should contain a subfolder GL3, which in turn
contains gl3.h.

But Cmake doesnt create any entries with these names
(CMAKE_CXX_FLAGS, CMAKE_CXX_FLAGS_DEBUG).
Do i have to create them or is it ok if i add the opengl path in the
parameter CMAKE_INCLUDE_PATH ?

thank you.


On 11 September 2012 04:58, Paul Martz pma...@skew-matrix.com wrote:

 On 9/10/2012 10:34 AM, Peterakos wrote:

 Hello.

 I face a problem trying to compile open scene graph using open gl 3.

 I get errors like these:

 error C3861: 'glLoadMatrixf': identifier not found
 error C3861: 'glMultMatrixf': identifier not found
 error C3861: 'glLoadMatrixd': identifier not found
 error C3861: 'glMultMatrixd': identifier not found


 Hm. Both v3.0.1 and also svn trunk r13140 seem to build fine for me, so
 I'm not sure why you'd encounter these errors.


  In CMake i have disabled everything that have the prefix OSG_GL
 except OSG_GL3_AVAILABLE.


 I build for GL3 using the instructions found in the osgsimplegl3.cpp
 example source code comment block.


  I also want to ask if i will be able to run the osg examples if i fully
 convert
 open scene graph in opengl 3.


 I doubt that any example other than osgsimplegl3 would work.
-Paul


 __**_
 osg-users mailing list
 osg-users@lists.**openscenegraph.org osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.**org/listinfo.cgi/osg-users-**
 openscenegraph.orghttp://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


  1   2   3   4   >