attempted merge

pull/12/head
valoeghese 2020-03-02 20:33:43 +13:00
parent a72bb2d2cc
commit accb0e7b86
4 changed files with 0 additions and 54 deletions

View File

@ -35,14 +35,11 @@ public class Chunk implements BlockAccess, WorldGenConstants, SODSerializable
private boolean fullyGenerated = false;
public final int dimension;
private boolean dirty = true;
<<<<<<< HEAD
private World world;
/**
* A holder for the rendered blocks in this chunk. This array is *NOT* safe to use for getting BIs at a position!
* It can vary in size from 0 to 512 elements long and must only be read linearly.
*/
=======
>>>>>>> liteCraft
private BlockInstance[] renderedBlocks = new BlockInstance[CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE];
public Chunk(World world, int chunkX, int chunkY, int chunkZ, int dimension)

View File

@ -17,13 +17,8 @@ import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
public class BlockRenderer extends Renderer implements WorldGenConstants
{
<<<<<<< HEAD
public StaticShader shader;
=======
private StaticShader shader;
public int atlasID;
>>>>>>> liteCraft
public BlockRenderer(StaticShader shader, Matrix4f projectionMatrix)
{
@ -74,32 +69,12 @@ public class BlockRenderer extends Renderer implements WorldGenConstants
shader.loadFakeLightingVariable(true);
shader.loadShine(1, 1);
GL13.glActiveTexture(GL13.GL_TEXTURE0);
<<<<<<< HEAD
// enableWireframe();
=======
GL11.glBindTexture(GL11.GL_TEXTURE_2D, atlasID);
enableWireframe();
>>>>>>> liteCraft
}
public void render(BlockInstance[] renderList)
{
<<<<<<< HEAD
// prepareRender();
for (BlockInstance entity : renderList) {
if (entity != null && entity.getModel() != null)
{
TexturedModel blockModel = entity.getModel();
GL11.glBindTexture(GL11.GL_TEXTURE_2D, blockModel.getTexture().getTextureID());
prepBlockInstance(entity);
GL11.glDrawElements(GL11.GL_TRIANGLES, blockModel.getRawModel().getVertexCount(), GL11.GL_UNSIGNED_INT, 0);
}
}
// disableWireframe();
// shader.stop();
=======
prepareRender();
for (int x = 0; x < CHUNK_SIZE; x++)
for (int y = 0; y < CHUNK_SIZE; y++)
@ -117,6 +92,5 @@ public class BlockRenderer extends Renderer implements WorldGenConstants
}
disableWireframe();
shader.stop();
>>>>>>> liteCraft
}
}

View File

@ -2,22 +2,12 @@ package com.github.hydos.ginger.engine.common.api;
import java.util.*;
<<<<<<< HEAD:src/main/java/com/github/hydos/ginger/engine/api/GingerRegister.java
import com.github.hydos.ginger.engine.api.game.Game;
import com.github.hydos.ginger.engine.elements.buttons.TextureButton;
import com.github.hydos.ginger.engine.font.GUIText;
import com.github.hydos.ginger.engine.postprocessing.Fbo;
import com.github.hydos.ginger.engine.render.MasterRenderer;
import com.github.hydos.ginger.engine.screen.Screen;
=======
import com.github.hydos.ginger.engine.common.api.game.Game;
import com.github.hydos.ginger.engine.common.elements.buttons.TextureButton;
import com.github.hydos.ginger.engine.common.font.GUIText;
import com.github.hydos.ginger.engine.common.screen.Screen;
import com.github.hydos.ginger.engine.opengl.postprocessing.Fbo;
import com.github.hydos.ginger.engine.opengl.render.MasterRenderer;
import com.github.hydos.multithreading.GingerThreading;
>>>>>>> liteCraft:src/main/java/com/github/hydos/ginger/engine/common/api/GingerRegister.java
/** Used if a game wants to access engine variables safely */
public class GingerRegister

View File

@ -5,19 +5,6 @@ import org.joml.Vector2f;
import com.github.halotroop.litecraft.Litecraft;
import com.github.halotroop.litecraft.logic.Timer;
import com.github.halotroop.litecraft.logic.Timer.TickListener;
<<<<<<< HEAD:src/main/java/com/github/hydos/ginger/engine/api/Ginger.java
import com.github.hydos.ginger.engine.api.game.*;
import com.github.hydos.ginger.engine.elements.buttons.TextureButton;
import com.github.hydos.ginger.engine.elements.objects.Player;
import com.github.hydos.ginger.engine.font.*;
import com.github.hydos.ginger.engine.io.Window;
import com.github.hydos.ginger.engine.particle.ParticleMaster;
import com.github.hydos.ginger.engine.postprocessing.*;
import com.github.hydos.ginger.engine.render.MasterRenderer;
import com.github.hydos.ginger.engine.render.tools.MousePicker;
import com.github.hydos.ginger.engine.screen.Screen;
import com.github.hydos.ginger.engine.utils.Loader;
=======
import com.github.hydos.ginger.engine.common.api.GingerRegister;
import com.github.hydos.ginger.engine.common.api.game.*;
import com.github.hydos.ginger.engine.common.elements.buttons.TextureButton;
@ -29,8 +16,6 @@ import com.github.hydos.ginger.engine.opengl.postprocessing.*;
import com.github.hydos.ginger.engine.opengl.render.MasterRenderer;
import com.github.hydos.ginger.engine.opengl.render.tools.MousePicker;
import com.github.hydos.ginger.engine.opengl.utils.GlLoader;
import com.github.hydos.multithreading.GingerThreading;
>>>>>>> liteCraft:src/main/java/com/github/hydos/ginger/engine/opengl/api/GingerGL.java
public class GingerGL
{