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 

Fix for osg::Program crash


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
Colin McDonald
Guest





PostPosted: Mon Sep 11, 2017 4:43 pm    Post subject:
Fix for osg::Program crash
Reply with quote

Hi Robert,

If the glCreateProgram in osg::Program fails for any reason, then subsequently
Program::PerContextProgram::linkProgram would crash.  I've put in some
checks to prevent that.

The problem affected fixed-function applications which don't use shaders
themselves, because osgText::Font now tries to create some built-in shaders.
They are created based on compile-time defines (OSG_GL2_AVAILABLE etc),
whereas the display capability for a deployed application at run-time may
not support that.  So we need to handle the glCreateProgram failing.

Attached is an update to src/osg/Program.cpp from the current master branch.

Regards

Colin McDonald

------------------
Post generated by Mail2Forum
Back to top
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 osg::Text::setBackdropType crash with... Carlo Lanzotti - DynaD... General 2 Wed Sep 20, 2017 2:40 pm View latest post
No new posts osg::Program::isFixedFunction() shoul... Mathieu Submission 1 Mon Aug 28, 2017 8:49 am View latest post
No new posts Crash with VBO and shared context jumaroch General 0 Tue Jul 25, 2017 1:24 pm View latest post
No new posts Crash with VBO and shared context jumaroch General 10 Tue Jul 25, 2017 1:23 pm View latest post
No new posts Crash on Windows 10 with a Display Li... efson General 2 Thu Apr 27, 2017 9:03 am 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