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


Java GL4.glCreateVertexArrays方法代码示例

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


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

示例1: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        gl4.glCreateVertexArrays(1, vertexArrayName);
        // Setup the formats
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
        // Setup the buffer source
        gl4.glVertexArrayVertexBuffer(vertexArrayName.get(0), Semantic.Buffer.STATIC, bufferName.get(Buffer.VERTEX),
                0 * Float.BYTES, Vertex_v2fv2f.SIZE);
        // Link them up
        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.TEXCOORD, Semantic.Buffer.STATIC);

        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.POSITION);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.TEXCOORD);

        gl4.glVertexArrayElementBuffer(vertexArrayName.get(0), bufferName.get(Buffer.ELEMENT));

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:21,代码来源:Gl_430_direct_state_access_ext.java

示例2: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        gl4.glCreateVertexArrays(1, vertexArrayName);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.POSITION);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.TEXCOORD, Semantic.Buffer.STATIC);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.TEXCOORD);

        gl4.glVertexArrayElementBuffer(vertexArrayName.get(0), bufferName.get(Buffer.ELEMENT));
        gl4.glVertexArrayVertexBuffer(vertexArrayName.get(0), Semantic.Buffer.STATIC, bufferName.get(Buffer.VERTEX), 0,
                glf.Vertex_v2fv2f.SIZE);

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:19,代码来源:Gl_450_direct_state_access.java

示例3: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        gl4.glCreateVertexArrays(1, vertexArrayName);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.POSITION);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.TEXCOORD, Semantic.Buffer.STATIC);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.TEXCOORD);

        gl4.glVertexArrayElementBuffer(vertexArrayName.get(0), bufferName.get(Buffer.ELEMENT));
        gl4.glVertexArrayVertexBuffer(vertexArrayName.get(0), Semantic.Buffer.STATIC, bufferName.get(Buffer.VERTEX), 0,
                Vertex_v2fv2f.SIZE);

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:19,代码来源:Gl_500_direct_state_access_gtc.java

示例4: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        gl4.glCreateVertexArrays(Program.MAX, vertexArrayName);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(Program.TEXTURE), Semantic.Attr.POSITION, 0);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(Program.TEXTURE), Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(Program.TEXTURE), Semantic.Attr.POSITION);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(Program.TEXTURE), Semantic.Attr.TEXCOORD, 0);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(Program.TEXTURE), Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false,
                Vec2.SIZE);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(Program.TEXTURE), Semantic.Attr.TEXCOORD);

        gl4.glVertexArrayElementBuffer(vertexArrayName.get(Program.TEXTURE), bufferName.get(Buffer.ELEMENT));
        gl4.glVertexArrayVertexBuffer(vertexArrayName.get(Program.TEXTURE), 0, bufferName.get(Buffer.VERTEX), 0,
                Vertex_v2fv2f.SIZE);

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:20,代码来源:Gl_500_sample_location_grid_nv.java

示例5: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        gl4.glCreateVertexArrays(1, vertexArrayName);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.POSITION, 0);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.POSITION);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.TEXCOORD, 0);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.TEXCOORD);

        gl4.glVertexArrayElementBuffer(vertexArrayName.get(0), bufferName.get(Buffer.ELEMENT));
        gl4.glVertexArrayVertexBuffer(vertexArrayName.get(0), 0, bufferName.get(Buffer.VERTEX), 0, Vertex_v2fv2f.SIZE);

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:18,代码来源:Gl_500_texture_bindless_nv.java

示例6: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        gl4.glCreateVertexArrays(Pipeline.MAX, vertexArrayName);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.POSITION);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.TEXCOORD, Semantic.Buffer.STATIC);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, Vec2.SIZE);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.TEXCOORD);

        gl4.glVertexArrayElementBuffer(vertexArrayName.get(0), bufferName.get(Buffer.ELEMENT));
        gl4.glVertexArrayVertexBuffer(vertexArrayName.get(0), Semantic.Buffer.STATIC, bufferName.get(Buffer.VERTEX), 0,
                Vertex_v2fv2f.SIZE);

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:19,代码来源:Gl_500_conservative_raster_nv.java

示例7: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        gl4.glCreateVertexArrays(1, vertexArrayName);
        gl4.glBindVertexArray(vertexArrayName.get(0));
        {
            gl4.glVertexAttribFormatNV(Semantic.Attr.POSITION, 2, GL_FLOAT, false, glf.Vertex_v2fv2f.SIZE);
            gl4.glVertexAttribFormatNV(Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false, glf.Vertex_v2fv2f.SIZE);

            gl4.glEnableClientState(GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV);
            gl4.glEnableVertexAttribArray(Semantic.Attr.POSITION);
            gl4.glEnableVertexAttribArray(Semantic.Attr.TEXCOORD);
        }
        gl4.glBindVertexArray(0);

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:17,代码来源:Gl_500_primitive_bindless_nv.java

示例8: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        gl4.glCreateVertexArrays(1, vertexArrayName);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.POSITION, Semantic.Buffer.STATIC);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.POSITION);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.COLOR, Semantic.Buffer.STATIC);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.COLOR, 4, GL_UNSIGNED_BYTE, true, Vec2.SIZE);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.COLOR);

        gl4.glVertexArrayElementBuffer(vertexArrayName.get(0), bufferName.get(Buffer.ELEMENT));
        gl4.glVertexArrayVertexBuffer(vertexArrayName.get(0), 0, bufferName.get(Buffer.VERTEX), 0, Vertex_v2fc4ub.SIZE);

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:18,代码来源:Gl_500_primitive_shading_nv.java

示例9: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        gl4.glCreateVertexArrays(Pipeline.MAX, vertexArrayName);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(Pipeline.TEXTURE), Semantic.Attr.POSITION, 0);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(Pipeline.TEXTURE), Semantic.Attr.POSITION, 2, GL_FLOAT, false,
                0);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(Pipeline.TEXTURE), Semantic.Attr.POSITION);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(Pipeline.TEXTURE), Semantic.Attr.TEXCOORD, 0);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(Pipeline.TEXTURE), Semantic.Attr.TEXCOORD, 2, GL_FLOAT, false,
                Vec2.SIZE);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(Pipeline.TEXTURE), Semantic.Attr.TEXCOORD);

        gl4.glVertexArrayElementBuffer(vertexArrayName.get(Pipeline.TEXTURE), bufferName.get(Buffer.ELEMENT));
        gl4.glVertexArrayVertexBuffer(vertexArrayName.get(Pipeline.TEXTURE), 0, bufferName.get(Buffer.VERTEX), 0,
                Vertex_v2fv2f.SIZE);

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:21,代码来源:Gl_500_shader_group_nv.java

示例10: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        boolean validated = true;

        gl4.glCreateVertexArrays(1, vertexArrayName);
        gl4.glVertexArrayElementBuffer(vertexArrayName.get(0), bufferName.get(Buffer.ELEMENT));

        return validated;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:10,代码来源:Gl_500_buffer_sparse_arb.java

示例11: initVertexArray

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initVertexArray(GL4 gl4) {

        int bindingIndex = 0;

        gl4.glCreateVertexArrays(1, vertexArrayName);

        gl4.glVertexArrayAttribBinding(vertexArrayName.get(0), Semantic.Attr.POSITION, bindingIndex);
        gl4.glVertexArrayAttribFormat(vertexArrayName.get(0), Semantic.Attr.POSITION, 2, GL_FLOAT, false, 0);
        gl4.glEnableVertexArrayAttrib(vertexArrayName.get(0), Semantic.Attr.POSITION);

        gl4.glVertexArrayVertexBuffer(vertexArrayName.get(0), bindingIndex, bufferName.get(Buffer.VERTEX), 0, Vec2.SIZE);

        return true;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:15,代码来源:Gl_500_shader_invocation_nv.java


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