How do you specify a texture image with internal format RGBA2?

This is how I would think it should be done. Creating a red texture: int width = 64; int height = 64; int size = width * height; byte red = (byte) 0b11_00_00_11; // 2-bit per channel ByteBuffer buffer = MemoryUtil.memAlloc(size); for (int p = 0; p < size; p++) buffer.put(red); texture = glGenTextures(); glBindTexture(GL_TEXTURE_2D,… Read More How do you specify a texture image with internal format RGBA2?

Java LWJGL OpenGL Exception Access Violation 0xc0000005

I get an error when glDrawElements() is called and I can’t figure out why :/ I’m new to using OpenGL and I’m trying to learn how it works. Note: I am using this library for turning an OBJ file into arrays that OpenGL should be able to use: https://github.com/korre/java-obj-to-opengl/blob/master/MeshObjectLoader.java public class Mesh { private int… Read More Java LWJGL OpenGL Exception Access Violation 0xc0000005