Exemple #1
0
        public bool InitMeshGL()
        {
            mKeyframeTexture_GL_ID  = RenderUtils.loadTextureFromByteBuffer(mKeyframeTextureByteBuffer, mKeyframeTextureDims[0], mKeyframeTextureDims[1]);
            mIconBusyTexture_GL_ID  = RenderUtils.loadTextureFromByteBuffer(mIconBusyTextureByteBuffer, mIconBusyTextureDims[0], mIconBusyTextureDims[1]);
            mIconPlayTexture_GL_ID  = RenderUtils.loadTextureFromByteBuffer(mIconPlayTextureByteBuffer, mIconPlayTextureDims[0], mIconPlayTextureDims[1]);
            mIconErrorTexture_GL_ID = RenderUtils.loadTextureFromByteBuffer(mIconErrorTextureByteBuffer, mIconErrorTextureDims[0], mIconErrorTextureDims[1]);

            mKeyframe_Program_GL_ID = RenderUtils.createProgramFromShaderSrc(VERTEX_SHADER, KEYFRAME_FRAGMENT_SHADER);
            mVideo_Program_GL_ID    = RenderUtils.createProgramFromShaderSrc(VERTEX_SHADER, VIDEO_FRAGMENT_SHADER);

            mVideoTexture_GL_ID = RenderUtils.createVideoTexture();

            bool canFullscreen = true;

            if (mPikkartVideoPlayer != null)
            {
                if (mPikkartVideoPlayer.setupSurfaceTexture(mVideoTexture_GL_ID))
                {
                    canFullscreen = false;
                }
                mPikkartVideoPlayer.load(mMovieUrl, canFullscreen, mAutostart, mSeekPosition);
            }

            _glLoaded = true;
            return(true);
        }
Exemple #2
0
 /**
  * \brief Create a Mesh from a json file (comntaining mesh data) and a texture file.
  * @param am the app AssetManager.
  * @param mesh_file the mesh file to load
  * @param texture_file the texture file to load
  * @return true on success.
  */
 public bool InitMesh(AssetManager am, String mesh_file, String texture_file)
 {
     LoadMesh(am, mesh_file);
     mTexture_GL_ID = RenderUtils.loadTextureFromApk(am, texture_file);
     mProgram_GL_ID = RenderUtils.createProgramFromShaderSrc(MESH_VERTEX_SHADER, MESH_FRAGMENT_SHADER);
     return(true);
 }
 public bool InitMeshGL()
 {
     mTexture_GL_ID = RenderUtils.loadTextureFromByteBuffer(texture, textureDims[0], textureDims[1]);
     mProgram_GL_ID = RenderUtils.createProgramFromShaderSrc(MESH_VERTEX_SHADER, MESH_FRAGMENT_SHADER);
     _glLoaded      = true;
     return(true);
 }