OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

OsgText compile issue with the newer versions of OSG


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 75
Location: Melbourne, FL USA

PostPosted: Wed Nov 15, 2017 7:29 pm    Post subject:
OsgText compile issue with the newer versions of OSG
Reply with quote

Hello community,

I was attempting to test the latest release of OSG 3.5.8 and am now getting
some compiler errors.

error: ‘const struct osgText::Text::GlyphQuads’ has no member named ‘getCoords’
coords.insert(coords.end(),gq.getCoords()->begin(),gq.getCoords()->end());

Snippet of the code in question:
Code:


std::vector<osg::Vec2>            coords;

osgText::Text::TextureGlyphQuadMap& tgqm = const_cast<osgText::Text::TextureGlyphQuadMap&>(_text->getTextureGlyphQuadMap());

const osgText::Text::GlyphQuads& gq = tgqmi->second;

coords.insert(coords.end(),gq.getCoords()->begin(),gq.getCoords()->end());



We are using this code to control onscreen text command line input.
What would be the proper way to fix this code under the newer versions of OSG to
accomplish the same, if it is still possible in some way?

Any hints would be appreciated.

Thank you all as always...

Cheers,
Curtis[/code]
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11971

PostPosted: Wed Nov 15, 2017 9:37 pm    Post subject:
OsgText compile issue with the newer versions of OSG
Reply with quote

Hi Curtis,

It might be that we need to add some extra API to osgText to help you
do what you want to do. As a general trend I would much rather have
users no need to grapple with the internal implementation details of
classes to do their work, if this requires some amendments to the
public interface or just providing some advice to solve it another way
then this will be preferable.

At this point I can't really provide any specific advice as to what
would be appropriate in hour case as the small code snippet really
doesn't tell me anything about the what you are and why. Could you
provide a small compilable code example that illustrates what you were
doing with older versions of the OSG. From this I should be able to
work out what you were doing and why, and then work out what would be
appropriate to do next.

Robert.

On 15 November 2017 at 19:29, Curtis Rubel <> wrote:
Quote:
Hello community,

I was attempting to test the latest release of OSG 3.5.8 and am now getting
some compiler errors.

error: ‘const struct osgText::Text::GlyphQuads’ has no member named ‘getCoords’
coords.insert(coords.end(),gq.getCoords()->begin(),gq.getCoords()->end());

Snippet of the code in question:

Code:


std::vector<osg::Vec2> coords;

osgText::Text::TextureGlyphQuadMap& tgqm = const_cast<osgText::Text::TextureGlyphQuadMap&>(_text->getTextureGlyphQuadMap());

const osgText::Text::GlyphQuads& gq = tgqmi->second;

coords.insert(coords.end(),gq.getCoords()->begin(),gq.getCoords()->end());





We are using this code to control onscreen text command line input.
What would be the proper way to fix this code under the newer versions of OSG to
accomplish the same, if it is still possible in some way?

Any hints would be appreciated.

Thank you all as always...

Cheers,
Curtis[/code]

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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Trajce Nikolov NICK
Guest





PostPosted: Thu Nov 16, 2017 4:56 pm    Post subject:
OsgText compile issue with the newer versions of OSG
Reply with quote

Hi Robert,

that is part of a code I wrote that has history Smile and now is part of the OpenIG project. Originally this was written like 6-7 (???) years ago and was part of the osgWidget::Input too ( I had submission then for this ). The purpose was to have a Line Edit as is known in any UI. OpenIG is using it for typing commands as from terminal and here is the whole code https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Core-OpenIG/Terminal.cpp ....


This particular snippet Curtis is mentioning was changed over time (simple changes that are handled with #ifdefs) and now we have the same case - I am aware of the recent osgText refactors but don't know the details. The purpose of this snippet is to get the glyphs coords of the edited text in order to set the cursor position. That simple Smile.


The mentioned snippet is using the API for a decade that now become broken, so I will vote to make it back compatible again - if it will be a simple addition what I believe it is the case


Please let me know your thoughts and what will be the best effort to fix this issue


Thanks a bunch as always!


Cheers,
NIck


On Wed, Nov 15, 2017 at 10:35 PM, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Curtis,

It might be that we need to add some extra API to osgText to help you
do what you want to do.  As a general trend I would much rather have
users no need to grapple with the internal implementation details of
classes to do their work, if this requires some amendments to the
public interface or just providing some advice to solve it another way
then this will be preferable.

At this point I can't really provide any specific advice as to what
would be appropriate in hour case as the small code snippet really
doesn't tell me anything about the what you are and why.  Could you
provide a small compilable code example that illustrates what you were
doing with older versions of the OSG.  From this I should be able to
work out what you were doing and why, and then work out what would be
appropriate to do next.

Robert.

On 15 November 2017 at 19:29, Curtis Rubel < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hello community,

    I was attempting to test the latest release of OSG 3.5.8 and am now getting
some compiler errors.

error: ‘const struct osgText::Text::GlyphQuads’ has no member named ‘getCoords’
              coords.insert(coords.end(),gq.getCoords()->begin(),gq.getCoords()->end());

Snippet of the code in question:

Code:


std::vector<osg::Vec2>                          coords;

osgText::Text::TextureGlyphQuadMap& tgqm = const_cast<osgText::Text::TextureGlyphQuadMap&>(_text->getTextureGlyphQuadMap());

const osgText::Text::GlyphQuads& gq = tgqmi->second;

coords.insert(coords.end(),gq.getCoords()->begin(),gq.getCoords()->end());





We are using this code to control onscreen text command line input.
What would be the proper way to fix this code under the newer versions of OSG to
accomplish the same, if it is still possible in some way?

Any hints would be appreciated.

Thank you all as always...

Cheers,
Curtis[/code]

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





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org






--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11971

PostPosted: Thu Nov 16, 2017 5:04 pm    Post subject:
OsgText compile issue with the newer versions of OSG
Reply with quote

Hi Nick,

Thanks for the links and explanation.

The new implementation is completely different, it simply not an issue
of making an old API public again, there is no way you can map the old
to the new implementation for backwards compatibility as they are so
different. The new implementation shares a single vertex array for
the whole osgText::Text object, the old implementation uses mutliple
vertex arrays for different texture atlas and view combinations.

Getting the coords of glyphs is something we'd need to add to
osgText::Text, such as Text::getGlyphCorners(int characterPosition,
osg::Vec3& bottomLeft, osg::Vec3& bottomRight etc.).

Robert.

On 16 November 2017 at 16:54, Trajce Nikolov NICK
<> wrote:
Quote:
Hi Robert,

that is part of a code I wrote that has history Smile and now is part of the
OpenIG project. Originally this was written like 6-7 (???) years ago and was
part of the osgWidget::Input too ( I had submission then for this ). The
purpose was to have a Line Edit as is known in any UI. OpenIG is using it
for typing commands as from terminal and here is the whole code
https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Core-OpenIG/Terminal.cpp
....

This particular snippet Curtis is mentioning was changed over time (simple
changes that are handled with #ifdefs) and now we have the same case - I am
aware of the recent osgText refactors but don't know the details. The
purpose of this snippet is to get the glyphs coords of the edited text in
order to set the cursor position. That simple Smile.

The mentioned snippet is using the API for a decade that now become broken,
so I will vote to make it back compatible again - if it will be a simple
addition what I believe it is the case

Please let me know your thoughts and what will be the best effort to fix
this issue

Thanks a bunch as always!

Cheers,
NIck

On Wed, Nov 15, 2017 at 10:35 PM, Robert Osfield <>
wrote:
Quote:

Hi Curtis,

It might be that we need to add some extra API to osgText to help you
do what you want to do. As a general trend I would much rather have
users no need to grapple with the internal implementation details of
classes to do their work, if this requires some amendments to the
public interface or just providing some advice to solve it another way
then this will be preferable.

At this point I can't really provide any specific advice as to what
would be appropriate in hour case as the small code snippet really
doesn't tell me anything about the what you are and why. Could you
provide a small compilable code example that illustrates what you were
doing with older versions of the OSG. From this I should be able to
work out what you were doing and why, and then work out what would be
appropriate to do next.

Robert.

On 15 November 2017 at 19:29, Curtis Rubel <> wrote:
Quote:
Hello community,

I was attempting to test the latest release of OSG 3.5.8 and am now
getting
some compiler errors.

error: ‘const struct osgText::Text::GlyphQuads’ has no member named
‘getCoords’

coords.insert(coords.end(),gq.getCoords()->begin(),gq.getCoords()->end());

Snippet of the code in question:

Code:


std::vector<osg::Vec2> coords;

osgText::Text::TextureGlyphQuadMap& tgqm =
const_cast<osgText::Text::TextureGlyphQuadMap&>(_text->getTextureGlyphQuadMap());

const osgText::Text::GlyphQuads& gq = tgqmi->second;


coords.insert(coords.end(),gq.getCoords()->begin(),gq.getCoords()->end());





We are using this code to control onscreen text command line input.
What would be the proper way to fix this code under the newer versions
of OSG to
accomplish the same, if it is still possible in some way?

Any hints would be appreciated.

Thank you all as always...

Cheers,
Curtis[/code]

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











--
trajce nikolov nick





------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Trajce Nikolov NICK
Guest





PostPosted: Thu Nov 16, 2017 5:06 pm    Post subject:
OsgText compile issue with the newer versions of OSG
Reply with quote

Thanks Robert,

Quote:
 Getting the coords of glyphs is something we'd need to add to
osgText::Text, such as Text::getGlyphCorners(int characterPosition,osg::Vec3& bottomLeft,   osg::Vec3& bottomRight etc.).

Right. This will do it.


On Thu, Nov 16, 2017 at 6:03 PM, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Nick,

Thanks for the links and explanation.

The new implementation is completely different, it simply not an issue
of making an old API public again, there is no way you can map the old
to the new implementation for backwards compatibility as they are so
different.  The new implementation shares a single vertex array for
the whole osgText::Text object, the old implementation uses mutliple
vertex arrays for different texture atlas and view combinations.

Getting the coords of glyphs is something we'd need to add to
osgText::Text, such as Text::getGlyphCorners(int characterPosition,
osg::Vec3& bottomLeft,   osg::Vec3& bottomRight etc.).

Robert.

On 16 November 2017 at 16:54, Trajce Nikolov NICK
< (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert,

that is part of a code I wrote that has history Smile and now is part of the
OpenIG project. Originally this was written like 6-7 (???) years ago and was
part of the osgWidget::Input too ( I had submission then for this ). The
purpose was to have a Line Edit as is known in any UI. OpenIG is using it
for typing commands as from terminal and here is the whole code
https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Core-OpenIG/Terminal.cpp
....

This particular snippet Curtis is mentioning was changed over time (simple
changes that are handled with #ifdefs) and now we have the same case - I am
aware of the recent osgText refactors but don't know the details. The
purpose of this snippet is to get the glyphs coords of the edited text in
order to set the cursor position. That simple Smile.

The mentioned snippet is using the API for a decade that now become broken,
so I will vote to make it back compatible again - if it will be a simple
addition what I believe it is the case

Please let me know your thoughts and what will be the best effort to fix
this issue

Thanks a bunch as always!

Cheers,
NIck

On Wed, Nov 15, 2017 at 10:35 PM, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
wrote:
Quote:

Hi Curtis,

It might be that we need to add some extra API to osgText to help you
do what you want to do.  As a general trend I would much rather have
users no need to grapple with the internal implementation details of
classes to do their work, if this requires some amendments to the
public interface or just providing some advice to solve it another way
then this will be preferable.

At this point I can't really provide any specific advice as to what
would be appropriate in hour case as the small code snippet really
doesn't tell me anything about the what you are and why.  Could you
provide a small compilable code example that illustrates what you were
doing with older versions of the OSG.  From this I should be able to
work out what you were doing and why, and then work out what would be
appropriate to do next.

Robert.

On 15 November 2017 at 19:29, Curtis Rubel < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hello community,

    I was attempting to test the latest release of OSG 3.5.8 and am now
getting
some compiler errors.

error: ‘const struct osgText::Text::GlyphQuads’ has no member named
‘getCoords’

coords.insert(coords.end(),gq.getCoords()->begin(),gq.getCoords()->end());

Snippet of the code in question:

Code:


std::vector<osg::Vec2>                          coords;

osgText::Text::TextureGlyphQuadMap& tgqm =
const_cast<osgText::Text::TextureGlyphQuadMap&>(_text->getTextureGlyphQuadMap());

const osgText::Text::GlyphQuads& gq = tgqmi->second;


coords.insert(coords.end(),gq.getCoords()->begin(),gq.getCoords()->end());





We are using this code to control onscreen text command line input.
What would be the proper way to fix this code under the newer versions
of OSG to
accomplish the same, if it is still possible in some way?

Any hints would be appreciated.

Thank you all as always...

Cheers,
Curtis[/code]

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





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




--
trajce nikolov nick

_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org






--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11971

PostPosted: Tue Nov 21, 2017 2:10 pm    Post subject:
OsgText compile issue with the newer versions of OSG
Reply with quote

Hi Nick,

On 16 November 2017 at 17:05, Trajce Nikolov NICK
<> wrote:
Quote:
Quote:
Getting the coords of glyphs is something we'd need to add to
osgText::Text, such as Text::getGlyphCorners(int characterPosition,
osg::Vec3& bottomLeft, osg::Vec3& bottomRight etc.).

Right. This will do it.

I have checked in:

/** Get the coordinates of the character corners in local
coordinates. Use Text::getMatrix() or Text::computeMatrix(..) to get
the transform into model coordinates (see TextBase header.) */
bool getCharacterCorners(unsigned int index, osg::Vec3&
bottomLeft, osg::Vec3& bottomRight, osg::Vec3& topLeft, osg::Vec3&
topRight) const;

Note the comment about needing to transform this coords - this is
required to handle the overall positioning of the text in model
coordinates.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Trajce Nikolov NICK
Guest





PostPosted: Tue Nov 21, 2017 10:43 pm    Post subject:
OsgText compile issue with the newer versions of OSG
Reply with quote

Thanks Robert !!!

On Tue, Nov 21, 2017 at 3:01 PM, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Nick,

On 16 November 2017 at 17:05, Trajce Nikolov NICK
< (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Quote:
Getting the coords of glyphs is something we'd need to add to
osgText::Text, such as Text::getGlyphCorners(int characterPosition,
osg::Vec3& bottomLeft,   osg::Vec3& bottomRight etc.).

Right. This will do it.

I have checked in:

    /** Get the coordinates of the character corners in local
coordinates. Use Text::getMatrix() or Text::computeMatrix(..) to get
the transform into model coordinates (see TextBase header.) */
    bool getCharacterCorners(unsigned int index, osg::Vec3&
bottomLeft, osg::Vec3& bottomRight, osg::Vec3& topLeft, osg::Vec3&
topRight) const;

Note the comment about needing to transform this coords - this is
required to handle the overall positioning of the text in model
coordinates.

Robert.
_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org






--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Why is osgText::Text very slow when i... OmegaDoom General 1 Wed Jul 04, 2018 5:31 am View latest post
No new posts Build error under Windows? Need feedb... robertosfield General 3 Wed Jun 27, 2018 11:11 am View latest post
No new posts setAxisAlignment(osgText::Text::SCREE... OmegaDoom General 1 Tue Jun 26, 2018 9:40 pm View latest post
No new posts OSG + Qt performance issue Ale General 1 Wed May 30, 2018 3:13 pm View latest post
No new posts Which character encoding is used by o... wernerM General 1 Tue May 29, 2018 2:53 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP