nativepipeline.java

来自「JAVA3D矩陈的相关类」· Java 代码 · 共 1,878 行 · 第 1/5 页

JAVA
1,878
字号
            int[] value) {        return setGLSLUniform4i(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                value);    }        native ShaderError setGLSLUniform4f(long ctx,            long shaderProgramId,            long uniformLocation,            float[] value);        ShaderError setGLSLUniform4f(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            float[] value) {        return setGLSLUniform4f(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                value);    }        native ShaderError setGLSLUniformMatrix3f(long ctx,            long shaderProgramId,            long uniformLocation,            float[] value);        ShaderError setGLSLUniformMatrix3f(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            float[] value) {        return setGLSLUniformMatrix3f(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                value);    }        native ShaderError setGLSLUniformMatrix4f(long ctx,            long shaderProgramId,            long uniformLocation,            float[] value);        ShaderError setGLSLUniformMatrix4f(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            float[] value) {        return setGLSLUniformMatrix4f(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                value);    }        // ShaderAttributeArray methods        native ShaderError setGLSLUniform1iArray(long ctx,            long shaderProgramId,            long uniformLocation,            int numElements,            int[] value);        ShaderError setGLSLUniform1iArray(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            int numElements,            int[] value) {        return setGLSLUniform1iArray(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                numElements,                value);    }        native ShaderError setGLSLUniform1fArray(long ctx,            long shaderProgramId,            long uniformLocation,            int numElements,            float[] value);        ShaderError setGLSLUniform1fArray(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            int numElements,            float[] value) {        return setGLSLUniform1fArray(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                numElements,                value);    }        native ShaderError setGLSLUniform2iArray(long ctx,            long shaderProgramId,            long uniformLocation,            int numElements,            int[] value);        ShaderError setGLSLUniform2iArray(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            int numElements,            int[] value) {        return setGLSLUniform2iArray(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                numElements,                value);    }        native ShaderError setGLSLUniform2fArray(long ctx,            long shaderProgramId,            long uniformLocation,            int numElements,            float[] value);        ShaderError setGLSLUniform2fArray(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            int numElements,            float[] value) {        return setGLSLUniform2fArray(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                numElements,                value);    }        native ShaderError setGLSLUniform3iArray(long ctx,            long shaderProgramId,            long uniformLocation,            int numElements,            int[] value);        ShaderError setGLSLUniform3iArray(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            int numElements,            int[] value) {        return setGLSLUniform3iArray(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                numElements,                value);    }        native ShaderError setGLSLUniform3fArray(long ctx,            long shaderProgramId,            long uniformLocation,            int numElements,            float[] value);        ShaderError setGLSLUniform3fArray(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            int numElements,            float[] value) {        return setGLSLUniform3fArray(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                numElements,                value);    }        native ShaderError setGLSLUniform4iArray(long ctx,            long shaderProgramId,            long uniformLocation,            int numElements,            int[] value);        ShaderError setGLSLUniform4iArray(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            int numElements,            int[] value) {        return setGLSLUniform4iArray(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                numElements,                value);    }        native ShaderError setGLSLUniform4fArray(long ctx,            long shaderProgramId,            long uniformLocation,            int numElements,            float[] value);        ShaderError setGLSLUniform4fArray(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            int numElements,            float[] value) {        return setGLSLUniform4fArray(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                numElements,                value);    }        native ShaderError setGLSLUniformMatrix3fArray(long ctx,            long shaderProgramId,            long uniformLocation,            int numElements,            float[] value);        ShaderError setGLSLUniformMatrix3fArray(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            int numElements,            float[] value) {        return setGLSLUniformMatrix3fArray(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                numElements,                value);    }        native ShaderError setGLSLUniformMatrix4fArray(long ctx,            long shaderProgramId,            long uniformLocation,            int numElements,            float[] value);        ShaderError setGLSLUniformMatrix4fArray(Context ctx,            ShaderProgramId shaderProgramId,            ShaderAttrLoc uniformLocation,            int numElements,            float[] value) {        return setGLSLUniformMatrix4fArray(unbox(ctx),                unbox(shaderProgramId),                unbox(uniformLocation),                numElements,                value);    }        // native interfaces for shader compilation, etc.    native ShaderError createGLSLShader(long ctx, int shaderType, long[] shaderId);        ShaderError createGLSLShader(Context ctx, int shaderType, ShaderId[] shaderId) {        long[] nativeId = new long[1];        ShaderError err = createGLSLShader(unbox(ctx), shaderType, nativeId);        shaderId[0] = boxShaderId(nativeId[0]);        return err;    }    native ShaderError destroyGLSLShader(long ctx, long shaderId);        ShaderError destroyGLSLShader(Context ctx, ShaderId shaderId) {        return destroyGLSLShader(unbox(ctx), unbox(shaderId));    }    native ShaderError compileGLSLShader(long ctx, long shaderId, String program);        ShaderError compileGLSLShader(Context ctx, ShaderId shaderId, String program) {        return compileGLSLShader(unbox(ctx), unbox(shaderId), program);    }        native ShaderError createGLSLShaderProgram(long ctx, long[] shaderProgramId);        ShaderError createGLSLShaderProgram(Context ctx, ShaderProgramId[] shaderProgramId) {        long[] nativeId = new long[1];        ShaderError err = createGLSLShaderProgram(unbox(ctx), nativeId);        shaderProgramId[0] = boxShaderProgramId(nativeId[0]);        return err;    }    native ShaderError destroyGLSLShaderProgram(long ctx, long shaderProgramId);        ShaderError destroyGLSLShaderProgram(Context ctx, ShaderProgramId shaderProgramId) {        return destroyGLSLShaderProgram(unbox(ctx), unbox(shaderProgramId));    }    native ShaderError linkGLSLShaderProgram(long ctx, long shaderProgramId,            long[] shaderId);        ShaderError linkGLSLShaderProgram(Context ctx, ShaderProgramId shaderProgramId,            ShaderId[] shaderIds) {        assert shaderIds != null;        long[] nativeIds = new long[shaderIds.length];        for (int i = 0; i < shaderIds.length; i++) {            nativeIds[i] = unbox(shaderIds[i]);        }        return linkGLSLShaderProgram(unbox(ctx), unbox(shaderProgramId),                nativeIds);    }    native ShaderError bindGLSLVertexAttrName(long ctx, long shaderProgramId,            String attrName, int attrIndex);        ShaderError bindGLSLVertexAttrName(Context ctx, ShaderProgramId shaderProgramId,            String attrName, int attrIndex) {        return bindGLSLVertexAttrName(unbox(ctx), unbox(shaderProgramId),                attrName, attrIndex);    }    native void lookupGLSLShaderAttrNames(long ctx, long shaderProgramId,            int numAttrNames, String[] attrNames, long[] locArr,            int[] typeArr, int[] sizeArr, boolean[] isArrayArr);        void lookupGLSLShaderAttrNames(Context ctx, ShaderProgramId shaderProgramId,            int numAttrNames, String[] attrNames, ShaderAttrLoc[] locArr,            int[] typeArr, int[] sizeArr, boolean[] isArrayArr) {                assert numAttrNames == locArr.length;        long[] nativeLocArr = new long[numAttrNames];        for (int i = 0; i < numAttrNames; i++) {            // Initialize to invalid native location            nativeLocArr[i] = -1;        }        lookupGLSLShaderAttrNames(unbox(ctx), unbox(shaderProgramId),                numAttrNames, attrNames, nativeLocArr,                typeArr, sizeArr, isArrayArr);        for (int i = 0; i < numAttrNames; i++) {            locArr[i] = boxShaderAttrLoc(nativeLocArr[i]);        }    }        native ShaderError useGLSLShaderProgram(long ctx, long shaderProgramId);        ShaderError useGLSLShaderProgram(Context ctx, ShaderProgramId shaderProgramId) {        return useGLSLShaderProgram(unbox(ctx), unbox(shaderProgramId));    }            // ---------------------------------------------------------------------        //    // Renderer methods    //        native void cleanupRenderer();            // ---------------------------------------------------------------------        //    // ColoringAttributesRetained methods    //        native void updateColoringAttributes(long ctx,            float dRed, float dGreen, float dBlue,            float red, float green, float blue,            float alpha,            boolean lEnable,            int shadeModel);        void updateColoringAttributes(Context ctx,            float dRed, float dGreen, float dBlue,            float red, float green, float blue,            float alpha,            boolean lEnable,            int shadeModel) {        updateColoringAttributes(unbox(ctx),                dRed, dGreen, dBlue,                red, green, blue,                alpha,                lEnable,                shadeModel);    }            // ---------------------------------------------------------------------        //    // DirectionalLightRetained methods    //        native void updateDirectionalLight(long ctx,            int lightSlot, float red, float green,            float blue, float x, float y, float z);        void updateDirectionalLight(Context ctx,            int lightSlot, float red, float green,            float blue, float x, float y, float z) {        updateDirectionalLight(unbox(ctx),                lightSlot, red, green,                blue, x, y, z);    }            // -------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?