org.lwjglb.engine.graph.Transformation.getOrthoProjectionMatrix()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(19.9k)|赞(0)|评价(0)|浏览(127)

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

Transformation.getOrthoProjectionMatrix介绍

暂无

代码示例

代码示例来源:origin: lwjglgamedev/lwjglbook

private void renderHud(Window window, IHud hud) {
  hudShaderProgram.bind();
  Matrix4f ortho = transformation.getOrthoProjectionMatrix(0, window.getWidth(), window.getHeight(), 0);
  for (GameItem gameItem : hud.getGameItems()) {
    Mesh mesh = gameItem.getMesh();
    // Set ortohtaphic and model matrix for this HUD item
    Matrix4f projModelMatrix = transformation.getOrtoProjModelMatrix(gameItem, ortho);
    hudShaderProgram.setUniform("projModelMatrix", projModelMatrix);
    hudShaderProgram.setUniform("colour", gameItem.getMesh().getMaterial().getAmbientColour());
    // Render the mesh for this HUD item
    mesh.render();
  }
  hudShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

private void renderHud(Window window, IHud hud) {
  hudShaderProgram.bind();
  Matrix4f ortho = transformation.getOrthoProjectionMatrix(0, window.getWidth(), window.getHeight(), 0);
  for (GameItem gameItem : hud.getGameItems()) {
    Mesh mesh = gameItem.getMesh();
    // Set ortohtaphic and model matrix for this HUD item
    Matrix4f projModelMatrix = transformation.buildOrtoProjModelMatrix(gameItem, ortho);
    hudShaderProgram.setUniform("projModelMatrix", projModelMatrix);
    hudShaderProgram.setUniform("colour", gameItem.getMesh().getMaterial().getAmbientColour());
    hudShaderProgram.setUniform("hasTexture", gameItem.getMesh().getMaterial().isTextured() ? 1 : 0);
    // Render the mesh for this HUD item
    mesh.render();
  }
  hudShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

private void renderHud(Window window, IHud hud) {
  hudShaderProgram.bind();
  Matrix4f ortho = transformation.getOrthoProjectionMatrix(0, window.getWidth(), window.getHeight(), 0);
  for (GameItem gameItem : hud.getGameItems()) {
    Mesh mesh = gameItem.getMesh();
    // Set ortohtaphic and model matrix for this HUD item
    Matrix4f projModelMatrix = transformation.getOrtoProjModelMatrix(gameItem, ortho);
    hudShaderProgram.setUniform("projModelMatrix", projModelMatrix);
    hudShaderProgram.setUniform("colour", gameItem.getMesh().getMaterial().getAmbientColour());
    hudShaderProgram.setUniform("hasTexture", gameItem.getMesh().getMaterial().isTextured() ? 1 : 0);
    // Render the mesh for this HUD item
    mesh.render();
  }
  hudShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

private void renderHud(Window window, IHud hud) {
  hudShaderProgram.bind();
  Matrix4f ortho = transformation.getOrthoProjectionMatrix(0, window.getWidth(), window.getHeight(), 0);
  for (GameItem gameItem : hud.getGameItems()) {
    Mesh mesh = gameItem.getMesh();
    // Set ortohtaphic and model matrix for this HUD item
    Matrix4f projModelMatrix = transformation.buildOrtoProjModelMatrix(gameItem, ortho);
    hudShaderProgram.setUniform("projModelMatrix", projModelMatrix);
    hudShaderProgram.setUniform("colour", gameItem.getMesh().getMaterial().getAmbientColour());
    hudShaderProgram.setUniform("hasTexture", gameItem.getMesh().getMaterial().isTextured() ? 1 : 0);
    // Render the mesh for this HUD item
    mesh.render();
  }
  hudShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

private void renderHud(Window window, IHud hud) {
  hudShaderProgram.bind();
  Matrix4f ortho = transformation.getOrthoProjectionMatrix(0, window.getWidth(), window.getHeight(), 0);
  for (GameItem gameItem : hud.getGameItems()) {
    Mesh mesh = gameItem.getMesh();
    // Set ortohtaphic and model matrix for this HUD item
    Matrix4f projModelMatrix = transformation.buildOrtoProjModelMatrix(gameItem, ortho);
    hudShaderProgram.setUniform("projModelMatrix", projModelMatrix);
    hudShaderProgram.setUniform("colour", gameItem.getMesh().getMaterial().getAmbientColour());
    hudShaderProgram.setUniform("hasTexture", gameItem.getMesh().getMaterial().isTextured() ? 1 : 0);
    // Render the mesh for this HUD item
    mesh.render();
  }
  hudShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

private void renderHud(Window window, IHud hud) {
  hudShaderProgram.bind();
  Matrix4f ortho = transformation.getOrthoProjectionMatrix(0, window.getWidth(), window.getHeight(), 0);
  for (GameItem gameItem : hud.getGameItems()) {
    Mesh mesh = gameItem.getMesh();
    // Set ortohtaphic and model matrix for this HUD item
    Matrix4f projModelMatrix = transformation.getOrtoProjModelMatrix(gameItem, ortho);
    hudShaderProgram.setUniform("projModelMatrix", projModelMatrix);
    hudShaderProgram.setUniform("colour", gameItem.getMesh().getMaterial().getAmbientColour());
    hudShaderProgram.setUniform("hasTexture", gameItem.getMesh().getMaterial().isTextured() ? 1 : 0);
    // Render the mesh for this HUD item
    mesh.render();
  }
  hudShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

private void renderHud(Window window, IHud hud) {
  hudShaderProgram.bind();
  Matrix4f ortho = transformation.getOrthoProjectionMatrix(0, window.getWidth(), window.getHeight(), 0);
  for (GameItem gameItem : hud.getGameItems()) {
    Mesh mesh = gameItem.getMesh();
    // Set ortohtaphic and model matrix for this HUD item
    Matrix4f projModelMatrix = transformation.getOrtoProjModelMatrix(gameItem, ortho);
    hudShaderProgram.setUniform("projModelMatrix", projModelMatrix);
    hudShaderProgram.setUniform("colour", gameItem.getMesh().getMaterial().getAmbientColour());
    hudShaderProgram.setUniform("hasTexture", gameItem.getMesh().getMaterial().isTextured() ? 1 : 0);
    // Render the mesh for this HUD item
    mesh.render();
  }
  hudShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

private void renderHud(Window window, IHud hud) {
  hudShaderProgram.bind();
  Matrix4f ortho = transformation.getOrthoProjectionMatrix(0, window.getWidth(), window.getHeight(), 0);
  for (GameItem gameItem : hud.getGameItems()) {
    Mesh mesh = gameItem.getMesh();
    // Set ortohtaphic and model matrix for this HUD item
    Matrix4f projModelMatrix = transformation.buildOrtoProjModelMatrix(gameItem, ortho);
    hudShaderProgram.setUniform("projModelMatrix", projModelMatrix);
    hudShaderProgram.setUniform("colour", gameItem.getMesh().getMaterial().getAmbientColour());
    hudShaderProgram.setUniform("hasTexture", gameItem.getMesh().getMaterial().isTextured() ? 1 : 0);
    // Render the mesh for this HUD item
    mesh.render();
  }
  hudShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = transformation.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = transformation.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  // Render each mesh with the associated game Items
  Map<Mesh, List<GameItem>> mapMeshes = scene.getGameMeshes();
  for (Mesh mesh : mapMeshes.keySet()) {
    sceneShaderProgram.setUniform("material", mesh.getMaterial());
    glActiveTexture(GL_TEXTURE2);
    glBindTexture(GL_TEXTURE_2D, shadowMap.getDepthMapTexture().getId());
    mesh.renderList(mapMeshes.get(mesh), (GameItem gameItem) -> {
      Matrix4f modelViewMatrix = transformation.buildModelViewMatrix(gameItem, viewMatrix);
      sceneShaderProgram.setUniform("modelViewMatrix", modelViewMatrix);
      Matrix4f modelLightViewMatrix = transformation.buildModelLightViewMatrix(gameItem, lightViewMatrix);
      sceneShaderProgram.setUniform("modelLightViewMatrix", modelLightViewMatrix);
    }
    );
  }
  sceneShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = transformation.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = transformation.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  // Render each mesh with the associated game Items
  Map<Mesh, List<GameItem>> mapMeshes = scene.getGameMeshes();
  for (Mesh mesh : mapMeshes.keySet()) {
    sceneShaderProgram.setUniform("material", mesh.getMaterial());
    glActiveTexture(GL_TEXTURE2);
    glBindTexture(GL_TEXTURE_2D, shadowMap.getDepthMapTexture().getId());
    mesh.renderList(mapMeshes.get(mesh), (GameItem gameItem) -> {
      Matrix4f modelViewMatrix = transformation.buildModelViewMatrix(gameItem, viewMatrix);
      sceneShaderProgram.setUniform("modelViewMatrix", modelViewMatrix);
      Matrix4f modelLightViewMatrix = transformation.buildModelLightViewMatrix(gameItem, lightViewMatrix);
      sceneShaderProgram.setUniform("modelLightViewMatrix", modelLightViewMatrix);
    }
    );
  }
  sceneShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

private void renderHud(Window window, IHud hud) {
  if (hud != null) {
    hudShaderProgram.bind();
    Matrix4f ortho = transformation.getOrthoProjectionMatrix(0, window.getWidth(), window.getHeight(), 0);
    for (GameItem gameItem : hud.getGameItems()) {
      Mesh mesh = gameItem.getMesh();
      // Set ortohtaphic and model matrix for this HUD item
      Matrix4f projModelMatrix = transformation.buildOrtoProjModelMatrix(gameItem, ortho);
      hudShaderProgram.setUniform("projModelMatrix", projModelMatrix);
      hudShaderProgram.setUniform("colour", gameItem.getMesh().getMaterial().getAmbientColour());
      hudShaderProgram.setUniform("hasTexture", gameItem.getMesh().getMaterial().isTextured() ? 1 : 0);
      // Render the mesh for this HUD item
      mesh.render();
    }
    hudShaderProgram.unbind();
  }
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = transformation.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = transformation.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  sceneShaderProgram.setUniform("renderShadow", scene.isRenderShadows() ? 1 : 0);
  renderNonInstancedMeshes(scene, false, sceneShaderProgram, viewMatrix, lightViewMatrix);
  renderInstancedMeshes(scene, false, sceneShaderProgram, viewMatrix, lightViewMatrix);
  sceneShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = transformation.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = transformation.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  sceneShaderProgram.setUniform("renderShadow", scene.isRenderShadows() ? 1 : 0);
  renderNonInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  renderInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  sceneShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = window.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = camera.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  sceneShaderProgram.setUniform("renderShadow", scene.isRenderShadows() ? 1 : 0);
  renderNonInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  renderInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  sceneShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = transformation.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = transformation.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  sceneShaderProgram.setUniform("renderShadow", scene.isRenderShadows() ? 1 : 0);
  renderNonInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  renderInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  sceneShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = transformation.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = transformation.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  sceneShaderProgram.setUniform("renderShadow", scene.isRenderShadows() ? 1 : 0);
  renderNonInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  renderInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  sceneShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = window.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = camera.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  sceneShaderProgram.setUniform("renderShadow", scene.isRenderShadows() ? 1 : 0);
  renderNonInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  renderInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  sceneShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = window.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = camera.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  sceneShaderProgram.setUniform("renderShadow", scene.isRenderShadows() ? 1 : 0);
  renderNonInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  renderInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  sceneShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = transformation.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = camera.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  sceneShaderProgram.setUniform("renderShadow", scene.isRenderShadows() ? 1 : 0);
  renderNonInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  renderInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  sceneShaderProgram.unbind();
}

代码示例来源:origin: lwjglgamedev/lwjglbook

public void renderScene(Window window, Camera camera, Scene scene) {
  sceneShaderProgram.bind();
  Matrix4f projectionMatrix = window.getProjectionMatrix();
  sceneShaderProgram.setUniform("projectionMatrix", projectionMatrix);
  Matrix4f orthoProjMatrix = transformation.getOrthoProjectionMatrix();
  sceneShaderProgram.setUniform("orthoProjectionMatrix", orthoProjMatrix);
  Matrix4f lightViewMatrix = transformation.getLightViewMatrix();
  Matrix4f viewMatrix = camera.getViewMatrix();
  SceneLight sceneLight = scene.getSceneLight();
  renderLights(viewMatrix, sceneLight);
  sceneShaderProgram.setUniform("fog", scene.getFog());
  sceneShaderProgram.setUniform("texture_sampler", 0);
  sceneShaderProgram.setUniform("normalMap", 1);
  sceneShaderProgram.setUniform("shadowMap", 2);
  sceneShaderProgram.setUniform("renderShadow", scene.isRenderShadows() ? 1 : 0);
  renderNonInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  renderInstancedMeshes(scene, sceneShaderProgram, viewMatrix, lightViewMatrix);
  sceneShaderProgram.unbind();
}

相关文章