Skip to content

Commit a695072

Browse files
committed
Fix a bug when allocating 1x1 textures
1 parent 3859d18 commit a695072

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lwjgl/src/main/java/com/flowpowered/caustic/lwjgl/gl20/GL20Texture.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@
2626
import java.nio.ByteBuffer;
2727
import java.nio.FloatBuffer;
2828

29-
import org.lwjgl.opengl.EXTTextureFilterAnisotropic;
30-
import org.lwjgl.opengl.GL11;
31-
import org.lwjgl.opengl.GL13;
32-
import org.lwjgl.opengl.GL14;
33-
import org.lwjgl.util.glu.GLU;
34-
3529
import com.flowpowered.caustic.api.data.VertexAttribute.DataType;
3630
import com.flowpowered.caustic.api.gl.Texture;
3731
import com.flowpowered.caustic.api.util.CausticUtil;
3832
import com.flowpowered.caustic.lwjgl.LWJGLUtil;
3933
import com.flowpowered.math.vector.Vector4f;
4034

35+
import org.lwjgl.opengl.EXTTextureFilterAnisotropic;
36+
import org.lwjgl.opengl.GL11;
37+
import org.lwjgl.opengl.GL13;
38+
import org.lwjgl.opengl.GL14;
39+
import org.lwjgl.util.glu.GLU;
40+
4141
/**
4242
* An OpenGL 2.0 implementation of {@link Texture}.
4343
*
@@ -50,8 +50,8 @@ public class GL20Texture extends Texture {
5050
// The min filter, to check if we need mip maps
5151
protected FilterMode minFilter = FilterMode.NEAREST_MIPMAP_LINEAR;
5252
// Texture image dimensions
53-
protected int width = 1;
54-
protected int height = 1;
53+
protected int width = 0;
54+
protected int height = 0;
5555

5656
@Override
5757
public void create() {

0 commit comments

Comments
 (0)