当前位置: 首页>>代码示例>>Java>>正文


Java GLES30.glDeleteShader方法代码示例

本文整理汇总了Java中android.opengl.GLES30.glDeleteShader方法的典型用法代码示例。如果您正苦于以下问题:Java GLES30.glDeleteShader方法的具体用法?Java GLES30.glDeleteShader怎么用?Java GLES30.glDeleteShader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.opengl.GLES30的用法示例。


在下文中一共展示了GLES30.glDeleteShader方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadShader

import android.opengl.GLES30; //导入方法依赖的package包/类
public static int loadShader ( int type, String shaderSrc )
{
   int shader;
   int[] compiled = new int[1];

   // Create the shader object
   shader = GLES30.glCreateShader ( type );

   if ( shader == 0 )
   {
      return 0;
   }
   // Load the shader source
   GLES30.glShaderSource ( shader, shaderSrc );

   // Compile the shader
   GLES30.glCompileShader ( shader );

   // Check the compile status
   GLES30.glGetShaderiv ( shader, GLES30.GL_COMPILE_STATUS, compiled, 0 );

   if ( compiled[0] == 0 )
   {
      Log.e ( "ESShader", GLES30.glGetShaderInfoLog ( shader ) );
      GLES30.glDeleteShader ( shader );
      return 0;
   }

   return shader;
}
 
开发者ID:zhuangzaiku,项目名称:AndroidCollection,代码行数:31,代码来源:ESShader.java

示例2: LoadShader

import android.opengl.GLES30; //导入方法依赖的package包/类
public static int LoadShader(int type, String shaderSrc) {
    int shader;
    int[] compiled = new int[1];

    // Create the shader object
    shader = GLES30.glCreateShader(type);

    if (shader == 0) {
        return 0;
    }

    // Load the shader source
    GLES30.glShaderSource(shader, shaderSrc);

    // Compile the shader
    GLES30.glCompileShader(shader);

    // Check the compile status
    GLES30.glGetShaderiv(shader, GLES30.GL_COMPILE_STATUS, compiled, 0);

    if (compiled[0] == 0) {
        Log.e(TAG, "Erorr!!!!");
        Log.e(TAG, GLES30.glGetShaderInfoLog(shader));
        GLES30.glDeleteShader(shader);
        return 0;
    }

    return shader;
}
 
开发者ID:JimSeker,项目名称:CardBoardVR,代码行数:30,代码来源:myStereoRenderer.java

示例3: LoadShader

import android.opengl.GLES30; //导入方法依赖的package包/类
private int LoadShader(int type, String shaderSrc) {
    int shader;
    int[] compiled = new int[1];

    // Create the shader object
    shader = GLES30.glCreateShader(type);

    if (shader == 0) {
        return 0;
    }

    // Load the shader source
    GLES30.glShaderSource(shader, shaderSrc);

    // Compile the shader
    GLES30.glCompileShader(shader);

    // Check the compile status
    GLES30.glGetShaderiv(shader, GLES30.GL_COMPILE_STATUS, compiled, 0);

    if (compiled[0] == 0) {
        Log.e(TAG, GLES30.glGetShaderInfoLog(shader));
        GLES30.glDeleteShader(shader);
        return 0;
    }

    return shader;
}
 
开发者ID:JimSeker,项目名称:opengl,代码行数:29,代码来源:HelloTriangleRenderer.java

示例4: loadProgram

import android.opengl.GLES30; //导入方法依赖的package包/类
public static int loadProgram ( String vertShaderSrc, String fragShaderSrc )
{
   int vertexShader;
   int fragmentShader;
   int programObject;
   int[] linked = new int[1];

   // Load the vertex/fragment shaders
   vertexShader = loadShader ( GLES30.GL_VERTEX_SHADER, vertShaderSrc );

   if ( vertexShader == 0 )
   {
      return 0;
   }

   fragmentShader = loadShader ( GLES30.GL_FRAGMENT_SHADER, fragShaderSrc );

   if ( fragmentShader == 0 )
   {
      GLES30.glDeleteShader ( vertexShader );
      return 0;
   }

   // Create the program object
   programObject = GLES30.glCreateProgram();

   if ( programObject == 0 )
   {
      return 0;
   }

   GLES30.glAttachShader ( programObject, vertexShader );
   GLES30.glAttachShader ( programObject, fragmentShader );

   // Link the program
   GLES30.glLinkProgram ( programObject );

   // Check the link status
   GLES30.glGetProgramiv ( programObject, GLES30.GL_LINK_STATUS, linked, 0 );

   if ( linked[0] == 0 )
   {
      Log.e ( "ESShader", "Error linking program:" );
      Log.e ( "ESShader", GLES30.glGetProgramInfoLog ( programObject ) );
      GLES30.glDeleteProgram ( programObject );
      return 0;
   }

   // Free up no longer needed shader resources
   GLES30.glDeleteShader ( vertexShader );
   GLES30.glDeleteShader ( fragmentShader );

   return programObject;
}
 
开发者ID:zhuangzaiku,项目名称:AndroidCollection,代码行数:55,代码来源:ESShader.java

示例5: loadProgramFromAsset

import android.opengl.GLES30; //导入方法依赖的package包/类
public static int loadProgramFromAsset ( Context context, String vertexShaderFileName, String fragShaderFileName )
{
   int vertexShader;
   int fragmentShader;
   int programObject;
   int[] linked = new int[1];

   String vertShaderSrc = null;
   String fragShaderSrc = null;

   // Read vertex shader from assets
   vertShaderSrc = readShader ( context, vertexShaderFileName );

   if ( vertShaderSrc == null )
   {
      return 0;
   }

   // Read fragment shader from assets
   fragShaderSrc = readShader ( context, fragShaderFileName );

   if ( fragShaderSrc == null )
   {
      return 0;
   }

   // Load the vertex shader
   vertexShader = loadShader ( GLES30.GL_VERTEX_SHADER, vertShaderSrc );

   if ( vertexShader == 0 )
   {
      return 0;
   }

   // Load the fragment shader
   fragmentShader = loadShader ( GLES30.GL_FRAGMENT_SHADER, fragShaderSrc );

   if ( fragmentShader == 0 )
   {
      GLES30.glDeleteShader ( vertexShader );
      return 0;
   }

   // Create the program object
   programObject = GLES30.glCreateProgram();

   if ( programObject == 0 )
   {
      return 0;
   }

   GLES30.glAttachShader ( programObject, vertexShader );
   GLES30.glAttachShader ( programObject, fragmentShader );

   // Link the program
   GLES30.glLinkProgram ( programObject );

   // Check the link status
   GLES30.glGetProgramiv ( programObject, GLES30.GL_LINK_STATUS, linked, 0 );

   if ( linked[0] == 0 )
   {
      Log.e ( "ESShader", "Error linking program:" );
      Log.e ( "ESShader", GLES30.glGetProgramInfoLog ( programObject ) );
      GLES30.glDeleteProgram ( programObject );
      return 0;
   }

   // Free up no longer needed shader resources
   GLES30.glDeleteShader ( vertexShader );
   GLES30.glDeleteShader ( fragmentShader );

   return programObject;
}
 
开发者ID:zhuangzaiku,项目名称:AndroidCollection,代码行数:75,代码来源:ESShader.java

示例6: glDeleteShader

import android.opengl.GLES30; //导入方法依赖的package包/类
@Override
public void glDeleteShader(int... shaders)
{
    for (int shader : shaders)
        GLES30.glDeleteShader(shader);
}
 
开发者ID:sriharshachilakapati,项目名称:SilenceEngine,代码行数:7,代码来源:AndroidGraphicsDevice.java


注:本文中的android.opengl.GLES30.glDeleteShader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。