Skip to content

Commit

Permalink
Fix a bug when allocating 1x1 textures
Browse files Browse the repository at this point in the history
  • Loading branch information
DDoS committed May 5, 2015
1 parent 3859d18 commit a695072
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;

import org.lwjgl.opengl.EXTTextureFilterAnisotropic;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL13;
import org.lwjgl.opengl.GL14;
import org.lwjgl.util.glu.GLU;

import com.flowpowered.caustic.api.data.VertexAttribute.DataType;
import com.flowpowered.caustic.api.gl.Texture;
import com.flowpowered.caustic.api.util.CausticUtil;
import com.flowpowered.caustic.lwjgl.LWJGLUtil;
import com.flowpowered.math.vector.Vector4f;

import org.lwjgl.opengl.EXTTextureFilterAnisotropic;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL13;
import org.lwjgl.opengl.GL14;
import org.lwjgl.util.glu.GLU;

/**
* An OpenGL 2.0 implementation of {@link Texture}.
*
Expand All @@ -50,8 +50,8 @@ public class GL20Texture extends Texture {
// The min filter, to check if we need mip maps
protected FilterMode minFilter = FilterMode.NEAREST_MIPMAP_LINEAR;
// Texture image dimensions
protected int width = 1;
protected int height = 1;
protected int width = 0;
protected int height = 0;

@Override
public void create() {
Expand Down

0 comments on commit a695072

Please sign in to comment.