apple10 发表于 2015-7-9 00:17:56

【求助】OSG for Android ive模型纹理无法渲染的问题

本帖最后由 apple10 于 2015-7-9 00:21 编辑

我使用的版本是

OpenSceneGraph-3.2.1-rc3  + OpenGL ES2 + Android

使用的程序是 examples\osgAndroidExampleGLES2, 该Viewer程序加载cow.ive 模型,无法显示纹理


Logcat 有如下出错信息

07-08 11:24:59.921: I/Osg Viewer(1166): Warning: TexGen::apply(State&) - not supported.
07-08 11:24:59.931: I/Osg Viewer(1166): Warning: Material::apply(State&) - not supported.

TexGen::apply(State&) - not supported. 对应的是 纹理坐标自动生成

void TexGen::apply(State&) const
{
#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) && !defined(OSG_GLES1_AVAILABLE)
...
glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, _mode );
      glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, _mode );
#else
    OSG_NOTICE<<"Warning: TexGen::apply(State&) - not supported."<<std::endl;
#endif

对于使用GLES的 Android来说显然TexGen::apply 被跳过了

另外,使用Osg直接渲染纹理是没有问题的, 如CSDN 的 这篇文章:osg for android (二) 几何物体的颜色显示以及纹理贴图

但是ive模型如何渲染出来,怎样可以在Android上看到和PC颜色一致的牛



Charles_0320 发表于 2015-8-3 18:45:04

你好,请问你的这个问题解决了吗?我也遇到这个问题,头疼中

zhl45l 发表于 2021-11-25 17:13:27

不光牛没有纹理,osgearth 加载.earth文件 只有个黑地球,。。。。求解
页: [1]
查看完整版本: 【求助】OSG for Android ive模型纹理无法渲染的问题