DotNaos / Orions-Destiny

Von Oliver, Timon, Dominik.
MIT License
0 stars 0 forks source link

Different Column lengths #2

Closed DotNaos closed 1 year ago

DotNaos commented 1 year ago

Only Spritesheets with the same amount of columns are supported

DotNaos commented 1 year ago
    public int getPixel(int x, int y) {
        int[] pixels = new int[width * height];
        glBindTexture(GL_TEXTURE_2D, texID);
        glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
        glBindTexture(GL_TEXTURE_2D, 0);
        return pixels[x + y * width];
    }