Java 类org.lwjgl.opengl.ARBVertexProgram 实例源码

项目:PhET    文件:ShaderFP.java   
ShaderFP(final String vpShaderFile, final String fpShaderFile) {
    // Initialize the vertex program.
    vpFile = vpShaderFile;
    vpSource = getShaderText(vpShaderFile);

    vpID = glGenProgramsARB();

    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);
    glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, vpSource);

    checkProgramError(vpFile, vpSource);

    // Initialize the fragment program.
    fpFile = fpShaderFile;
    fpSource = getShaderText(fpShaderFile);

    fpID = glGenProgramsARB();

    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);
    glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, fpSource);

    checkProgramError(fpFile, fpSource);
}
项目:PhET    文件:ShaderFP.java   
void render() {
    glEnable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);

    glEnable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);

    glProgramLocalParameter4fARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f);

    glProgramLocalParameter4fARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f,
                                 -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f);

    ShadersTest.renderObject();

    glDisable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glDisable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
}
项目:Wolf_game    文件:ShaderFP.java   
ShaderFP(final String vpShaderFile, final String fpShaderFile) {
    // Initialize the vertex program.
    vpFile = vpShaderFile;
    vpSource = getShaderText(vpShaderFile);

    vpID = glGenProgramsARB();

    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);
    glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, vpSource);

    checkProgramError(vpFile, vpSource);

    // Initialize the fragment program.
    fpFile = fpShaderFile;
    fpSource = getShaderText(fpShaderFile);

    fpID = glGenProgramsARB();

    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);
    glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, fpSource);

    checkProgramError(fpFile, fpSource);
}
项目:Wolf_game    文件:ShaderFP.java   
void render() {
    glEnable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);

    glEnable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);

    glProgramLocalParameter4fARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f);

    glProgramLocalParameter4fARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f,
                                 -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f);

    ShadersTest.renderObject();

    glDisable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glDisable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
}
项目:GPVM    文件:ShaderFP.java   
ShaderFP(final String vpShaderFile, final String fpShaderFile) {
    // Initialize the vertex program.
    vpFile = vpShaderFile;
    vpSource = getShaderText(vpShaderFile);

    vpID = glGenProgramsARB();

    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);
    glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, vpSource);

    checkProgramError(vpFile, vpSource);

    // Initialize the fragment program.
    fpFile = fpShaderFile;
    fpSource = getShaderText(fpShaderFile);

    fpID = glGenProgramsARB();

    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);
    glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, fpSource);

    checkProgramError(fpFile, fpSource);
}
项目:GPVM    文件:ShaderFP.java   
void render() {
    glEnable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);

    glEnable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);

    glProgramLocalParameter4fARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f);

    glProgramLocalParameter4fARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f,
                                 -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f);

    ShadersTest.renderObject();

    glDisable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glDisable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
}
项目:GPVM    文件:ShaderFP.java   
ShaderFP(final String vpShaderFile, final String fpShaderFile) {
    // Initialize the vertex program.
    vpFile = vpShaderFile;
    vpSource = getShaderText(vpShaderFile);

    vpID = glGenProgramsARB();

    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);
    glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, vpSource);

    checkProgramError(vpFile, vpSource);

    // Initialize the fragment program.
    fpFile = fpShaderFile;
    fpSource = getShaderText(fpShaderFile);

    fpID = glGenProgramsARB();

    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);
    glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, fpSource);

    checkProgramError(fpFile, fpSource);
}
项目:GPVM    文件:ShaderFP.java   
void render() {
    glEnable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);

    glEnable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);

    glProgramLocalParameter4fARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f);

    glProgramLocalParameter4fARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f,
                                 -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f);

    ShadersTest.renderObject();

    glDisable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glDisable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
}
项目:SpaceStationAlpha    文件:ShaderFP.java   
ShaderFP(final String vpShaderFile, final String fpShaderFile) {
    // Initialize the vertex program.
    vpFile = vpShaderFile;
    vpSource = getShaderText(vpShaderFile);

    vpID = glGenProgramsARB();

    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);
    glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, vpSource);

    checkProgramError(vpFile, vpSource);

    // Initialize the fragment program.
    fpFile = fpShaderFile;
    fpSource = getShaderText(fpShaderFile);

    fpID = glGenProgramsARB();

    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);
    glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, fpSource);

    checkProgramError(fpFile, fpSource);
}
项目:SpaceStationAlpha    文件:ShaderFP.java   
void render() {
    glEnable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);

    glEnable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);

    glProgramLocalParameter4fARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f);

    glProgramLocalParameter4fARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f,
                                 -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f);

    ShadersTest.renderObject();

    glDisable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glDisable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
}
项目:TeacherSmash    文件:ShaderFP.java   
ShaderFP(final String vpShaderFile, final String fpShaderFile) {
    // Initialize the vertex program.
    vpFile = vpShaderFile;
    vpSource = getShaderText(vpShaderFile);

    vpID = glGenProgramsARB();

    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);
    glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, vpSource);

    checkProgramError(vpFile, vpSource);

    // Initialize the fragment program.
    fpFile = fpShaderFile;
    fpSource = getShaderText(fpShaderFile);

    fpID = glGenProgramsARB();

    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);
    glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, fpSource);

    checkProgramError(fpFile, fpSource);
}
项目:TeacherSmash    文件:ShaderFP.java   
void render() {
    glEnable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);

    glEnable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);

    glProgramLocalParameter4fARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f);

    glProgramLocalParameter4fARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f,
                                 -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f);

    ShadersTest.renderObject();

    glDisable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glDisable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
}
项目:3d-Demo    文件:ShaderFP.java   
ShaderFP(final String vpShaderFile, final String fpShaderFile) {
    // Initialize the vertex program.
    vpFile = vpShaderFile;
    vpSource = getShaderText(vpShaderFile);

    vpID = glGenProgramsARB();

    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);
    glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, vpSource);

    checkProgramError(vpFile, vpSource);

    // Initialize the fragment program.
    fpFile = fpShaderFile;
    fpSource = getShaderText(fpShaderFile);

    fpID = glGenProgramsARB();

    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);
    glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, fpSource);

    checkProgramError(fpFile, fpSource);
}
项目:3d-Demo    文件:ShaderFP.java   
void render() {
    glEnable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);

    glEnable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
    glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);

    glProgramLocalParameter4fARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f);

    glProgramLocalParameter4fARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, 0,
                                 ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f,
                                 -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f);

    ShadersTest.renderObject();

    glDisable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB);
    glDisable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB);
}