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 

support for #extension


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10862

PostPosted: Tue Apr 18, 2017 4:17 pm    Post subject:
support for #extension
Reply with quote

Hi David,

Could you please apply your code to the OSG master and let me have the
changes as a PR or the whole modified file. Copying and pasting code
is really prone to errors so I don't merge such changes as the risks
of introducing bugs is too high.

Thanks,
Robert.

On 11 January 2017 at 17:00, David Heitbrink <> wrote:
Quote:
It looks like its the openscenegraph-3.5.5, I based it off a recent pull from:

https://github.com/openscenegraph/OpenSceneGraph

The modified code start at line 1228, it is here:

<code>
if ( declPos != std::string::npos )
{
declPos = source.find(" ", declPos); // move to the first space after "#version"
declPos = source.find_first_not_of(std::string(" "), declPos); // skip all the spaces until you reach the version number
std::string versionNumber(source, declPos, 3);
int glslVersion = atoi(versionNumber.c_str());
OSG_INFO<<"shader version found: "<< glslVersion <<std::endl;
if (glslVersion >= 130) attributeQualifier = "in ";
// found the string, now find the next linefeed and set the insertion point after it.
declPos = source.find( '\n', declPos );
declPos = declPos != std::string::npos ? declPos+1 : source.length();
}
else
{
declPos = 0;
}

std::string::size_type extPos = source.rfind( "#extension " );
if ( extPos != std::string::npos )
{
// found the string, now find the next linefeed and set the insertion point after it.
declPos = source.find( '\n', extPos );
declPos = declPos != std::string::npos ? declPos+1 : source.length();
}
</code>

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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission 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 Support for Windows Universal Platform tomhog General 5 Fri Apr 21, 2017 11:07 pm View latest post
No new posts OSG 3.5.1 doesn&#39;t support GL3... 来恩 General 0 Sat Apr 15, 2017 7:54 am View latest post
No new posts OSG 3.5.1 doesn't support GL3 well 来恩 General 0 Sat Apr 15, 2017 7:27 am View latest post
No new posts More FBX map support Farshid Lashkari Submission 1 Wed Mar 15, 2017 6:35 pm View latest post
No new posts support for #extension d_a_heitbrink Submission 2 Wed Jan 11, 2017 3:16 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