|
From: Jonathan R <leg...@gm...> - 2021-03-01 13:37:24
|
Interestingly on next I now see VERTEX glCompileShader "" FAILED 154.50 [WARN]:OSG VERTEX Shader "" infolog: 0(10) : error C7616: global variable gl_ModelViewProjectionMatrix is removed after version 140 0(10) : error C7616: global variable gl_Vertex is removed after version 140 0(11) : error C7616: global variable gl_MultiTexCoord0 is removed after version 140 0(12) : error C7616: global variable gl_Color is removed after version 140 And tooltips are now showing very odd results: https://i.imgur.com/oM57FJt.png Jonathan On Mon, Mar 1, 2021 at 11:48 AM James Turner <ja...@fl...> wrote: > > > > On 25 Feb 2021, at 09:46, James Turner <ja...@fl...> wrote: > > > > > > A helpful person on the OSG list suggested their approach: subclass > osg::Program, override apply(), and check if the program actually applied > correctly or not. (That’s only one pointer check per call to > Program::apply, so should be tolerable) > > > > This feels like it should work in our codebase, based on my reading of > Effect.cxx, but if anyone can spot a problem with this approach, please > speak up! > > Update on this, and a question / notification: > > I’m doing this approach now, and it seems to work well, based on my > breaking some shaders on purpose. Very little intrusion on the Effects > code, no performance difference that I can see. Will push to next soon for > others to verify that. > > What I am noticing is that within Effect.cxx, we’re not well placed to > attribute the origin of a shader to an Effect; specifically we might know > the name of the .eff file but not the pass or technique. Actually we know > their indices, but that’s not nice from a debugging point of view. So I’m > thinking to support a <name> element on both techniques and passes. > > This would allow us to know the problem is caused by Shader foo_bar.frag, > in pass “blah” of technique “wibble’ in Effect buildings.eff. There is a > risk of confusion because some shaders are re-used by multiple effects, but > I think it’s worth trying, to see if it’s useful. Am I missing anything > which makes this a bad idea? (I can’t imaging adding a ’name’ to the XML > for technique/pass is going to break anything, but, stranger things have > happened. > > Kind regards, > James] > > > > > _______________________________________________ > Flightgear-devel mailing list > Fli...@li... > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > |