com.jme3.scene.Mesh.getId()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中com.jme3.scene.Mesh.getId()方法的一些代码示例,展示了Mesh.getId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mesh.getId()方法的具体详情如下:
包路径:com.jme3.scene.Mesh
类名称:Mesh
方法名:getId

Mesh.getId介绍

[英]Returns the mesh's VAO ID. Internal use only.
[中]返回网格的VAO ID。仅供内部使用。

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

private void renderMeshVertexArray(Mesh mesh, int lod, int count, VertexBuffer instanceData) {
    if (mesh.getId() == -1) {
      updateVertexArray(mesh, instanceData);
    } else {
      // TODO: Check if it was updated
    }

    if (context.boundVertexArray != mesh.getId()) {
      gl3.glBindVertexArray(mesh.getId());
      context.boundVertexArray = mesh.getId();
    }

//        IntMap<VertexBuffer> buffers = mesh.getBuffers();
    VertexBuffer indices;
    if (mesh.getNumLodLevels() > 0) {
      indices = mesh.getLodLevel(lod);
    } else {
      indices = mesh.getBuffer(Type.Index);
    }
    if (indices != null) {
      drawTriangleList(indices, mesh, count);
    } else {
      drawTriangleArray(mesh.getMode(), count, mesh.getVertexCount());
    }
    clearVertexAttribs();
  }

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

public void updateVertexArray(Mesh mesh, VertexBuffer instanceData) {
  int id = mesh.getId();
  if (id == -1) {
    IntBuffer temp = intBuf1;

代码示例来源:origin: org.jmonkeyengine/jme3-core

private void renderMeshVertexArray(Mesh mesh, int lod, int count, VertexBuffer instanceData) {
    if (mesh.getId() == -1) {
      updateVertexArray(mesh, instanceData);
    } else {
      // TODO: Check if it was updated
    }

    if (context.boundVertexArray != mesh.getId()) {
      gl3.glBindVertexArray(mesh.getId());
      context.boundVertexArray = mesh.getId();
    }

//        IntMap<VertexBuffer> buffers = mesh.getBuffers();
    VertexBuffer indices;
    if (mesh.getNumLodLevels() > 0) {
      indices = mesh.getLodLevel(lod);
    } else {
      indices = mesh.getBuffer(Type.Index);
    }
    if (indices != null) {
      drawTriangleList(indices, mesh, count);
    } else {
      drawTriangleArray(mesh.getMode(), count, mesh.getVertexCount());
    }
    clearVertexAttribs();
  }

代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl

private void renderMeshVertexArray(Mesh mesh, int lod, int count, VertexBuffer instanceData) {
    if (mesh.getId() == -1) {
      updateVertexArray(mesh, instanceData);
    } else {
      // TODO: Check if it was updated
    }

    if (context.boundVertexArray != mesh.getId()) {
      glBindVertexArray(mesh.getId());
      context.boundVertexArray = mesh.getId();
    }

//        IntMap<VertexBuffer> buffers = mesh.getBuffers();
    VertexBuffer indices;
    if (mesh.getNumLodLevels() > 0) {
      indices = mesh.getLodLevel(lod);
    } else {
      indices = mesh.getBuffer(Type.Index);
    }
    if (indices != null) {
      drawTriangleList(indices, mesh, count);
    } else {
      drawTriangleArray(mesh.getMode(), count, mesh.getVertexCount());
    }
    clearVertexAttribs();
    clearTextureUnits();
  }

代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-lwjgl

public void updateVertexArray(Mesh mesh, VertexBuffer instanceData) {
  int id = mesh.getId();
  if (id == -1) {
    IntBuffer temp = intBuf1;

代码示例来源:origin: org.jmonkeyengine/jme3-core

public void updateVertexArray(Mesh mesh, VertexBuffer instanceData) {
  int id = mesh.getId();
  if (id == -1) {
    IntBuffer temp = intBuf1;

相关文章