[osg-users] OSG example missing texture

Sebastian Messerschmidt sebastian.messerschmidt at gmx.de
Wed Feb 10 00:03:19 PST 2016


Hi Ge,



> Hi Sebastian,
>
> I don't need cube map to work. Please don't waste your time.
>
> I was just going through OSG examples to understand how OSG can load arbitrary models while using core profile.
Starting with core profile is surely a good idea in general, but when it 
comes to OSG, you'll need some understanding of basic concepts, as 
you'll have to manage a lot of the stuff on your own.
Simply loading a model, without post-processing will not work most of 
the time, as there is no gl_Light, gl_Material, etc.

In order to start with OSG and OpenGL simultaneously you might be better 
off learning about the fixed-pipeline and mechanism in OSG (Visitors, 
ReadCallbacks,..).

>
> I got some OSG files loaded successfully by following osgshadercomposition, basically add some directional light and enable texture0.
>
> However, when I tried some other files (see attached), my solution did not work. Since I am relatively new to OSG and OpenGL, my plan is to write a minimal example that can expose the flaws in my understanding.
It will not work for all models, and will fail in a lot of the cases 
with one set of shaders. If a model for instance has multiple textures 
active for one geometry, you'll have to create a shader which uses both.
So you have to transport these properties on your own and for instance 
use the shader-composition to account for variations.
>
> Thank you for your kind input.
>
> Cheers,
> Ge
>
> PS: I don't think the problem is in the DAE plugin, because osgviewer works using the same DAE plugin.
osgViewer uses fixed-function by default, so one should expect it to work.

Cheers
Sebastian




More information about the osg-users mailing list