Package jni

Class JniShader


  • public class JniShader
    extends Object
    Author:
    Grégory Van den Borre
    • Constructor Detail

      • JniShader

        public JniShader()
    • Method Detail

      • delete

        public void delete​(long address)
        Delete the object in native code.
        Parameters:
        address - Address of the native object.
      • createFragmentShader

        public long createFragmentShader​(String name,
                                         String path)
        Create the shader in native code.
        Parameters:
        name - Shader name.
        path - Path to the file.
        Returns:
        The pointer address of the created object.
      • createVertexShader

        public long createVertexShader​(String name,
                                       String path)
        Create the shader in native code.
        Parameters:
        name - Shader name.
        path - Path to the file.
        Returns:
        The pointer address of the created object.
      • setParameter

        public void setParameter​(long pointer,
                                 String name,
                                 String value)
        Set parameter to pass to the shader, those parameters are meant to specify to the graphic engine how to load the shader(entry point, profile...), those are not meant to be used as shader function parameter..
        Parameters:
        pointer - Native object pointer address.
        name - Parameter name.
        value - Parameter value.
      • load

        public void load​(long pointer)