4

GLSurfaceView我在RecyclerView's项目布局中附加了我的自定义。当我向上滚动并再次向下滚动时,我GLSurfaceView的消失了。我将 Rajawali 3D 引擎用于 android OS。

这是我ViewHolderrecyclerView Adapter

class FieldViewHolder extends RecyclerView.ViewHolder {
        ISurface customizeSurfaceView;
        CardView cardView;

        public FieldViewHolder(View itemView) {
            super(itemView);
            this.customizeSurfaceView = (ISurface) itemView.findViewById(R.id.surfaceView);
            this.cardView = (CardView) itemView.findViewById(R.id.cardviewField);
            RendererClass rendererClass = new RendererClass(context);
            customizeSurfaceView.setSurfaceRenderer(rendererClass);
        }
    }

在我的 Logcat 中,我发现了这些错误:

Could not link program in org.rajawali3d.materials.Material: 
Getting location of uniform: uModelMatrix returned -1!
E/Rajawali: Getting location of uniform: uTime returned -1!

[org.rajawali3d.materials.Material] Could not compile vertex shader:
 Shader log: Vertex shader compilation failed.
ERROR: 0:7: '=' : Syntax error:  syntax error
ERROR: 1 compilation errors.  No code generated.

这是我启动应用程序时的样子 在此处输入图像描述

当我向上滚动并再次向下滚动时: 在此处输入图像描述

4

0 回答 0