私はJavaをしばらく使っていたので、最近LWJGLを学んでいます.LWJGLのチュートリアル/参考資料はあまりないので、OpenGLのチュートリアルを検索するだけで、LWJGLがOpenGLのJavaポートのように(それがあなたの説明だと思います)、それらは基本的にまったく同じですが、常に少し調整する必要があり、このコードを(基本的にすべて自分で)作成し、実行するとタイル マップは 1 つしか表示されませんが、全部で 16 個のタイルが表示されるはずです。どうしてこれなの?
package testandothertutorials;
import static org.lwjgl.opengl.GL11.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.lwjgl.LWJGLException;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.newdawn.slick.opengl.Texture;
import org.newdawn.slick.opengl.TextureLoader;
public class TileMapTest {
int tilemap[][] = {
        { 0, 1, 1, 0 },
        { 0, 1, 1, 0 },
        { 0, 1, 1, 0 },
        { 1, 0, 0, 1 }
};
int TILE_SIZE = 32;
int WORLD_SIZE = 4;
Texture stone_texture, dirt_texture;
public TileMapTest() {
    try {
        Display.setDisplayMode(new DisplayMode(640, 480));
        Display.setTitle("Game");
        Display.create();
    } catch(LWJGLException e) {
    }
    glMatrixMode(GL_PROJECTION); 
    glLoadIdentity();
    glOrtho(0, 640, 480, 0, 1, -1);
    glMatrixMode(GL_MODELVIEW);
    glEnable(GL_TEXTURE_2D);
    //Load the stone and dirt textures before the render loop
    try {
        stone_texture = TextureLoader.getTexture("PNG", new FileInputStream(new File("C://Users//Gannon//Desktop//Java//workspace//Test Game//res//stone.png")));
    } catch (FileNotFoundException e) { 
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    try {
        dirt_texture = TextureLoader.getTexture("PNG", new FileInputStream(new File("C://Users//Gannon//Desktop//Java//workspace//Test Game//res//dirt.png")));
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    while(!Display.isCloseRequested()) {
        glClear(GL_COLOR_BUFFER_BIT);
        drawTiles();
        Display.update();
        Display.sync(60);
    }
    Display.destroy();
}
public void drawTiles() {
    for(int x = 0; x < WORLD_SIZE; x++) {
        for(int y = 0; y < WORLD_SIZE; y++) {
            if(tilemap[x][y] == 0) { //If the selected tile in the tilemap equals 0, set it to the stone texture to draw
                stone_texture.bind();
            } else if(tilemap[x][y] == 1) { //If the selected tile equals 1, set it to the dirt texture to draw
                dirt_texture.bind();
            }
            glPushMatrix();
            glTranslatef(x, y, 0);
            glBegin(GL_QUADS);
                glTexCoord2f(0, 0);
                glVertex2f(0, 0);
                glTexCoord2f(1, 0);
                glVertex2f(32, 0);
                glTexCoord2f(1, 1);
                glVertex2f(32, 32);
                glTexCoord2f(0, 1);
                glVertex2f(0, 32);
            glEnd();
            glPopMatrix();
        }
    }
}
public static void main(String args[]) {
    new TileMapTest();
}
}