使用Java / NetBeans编译LWJGL示例时出错

时间:2017-12-30 16:06:03

标签: java compiler-errors lwjgl

我最近看过LWJGL上的这些教程。我正在尝试在NetBeans环境中编译它们。但它给出了一个错误:

  

无法找到符号。   位置:类纹理;   方法:getTexture();

我声明方法如下:

ChildComponent

方法的位置:类TModel。

public Texture getTexture () {
    return texture;
}

类Texture:

package mod.els;

import mis.ter.pin.Model;
import text.ures.Texture;

public class TModel {
    private Model model;
    private Texture texture;

    public TModel(Model model, Texture texture) {
        this.model = model;
        this.texture = texture;
    }

    public Model getRawModel() {
        return model;
    }

    public Texture getTexture() {
        return texture;
    }
}

班级模特:

package text.ures;

import java.io.FileInputStream;

public class Texture {
    private int textureID;

    public Texture(int id) {
        this.textureID = id;
    }

    public int getTextureID() {
        return this.textureID;
    }
}

YouTube上的教程:https://www.youtube.com/watch?v=VS8wlS9hF8E&list=PLRIWtICgwaX0u7Rf9zkZhLoLuZVfUksDP

0 个答案:

没有答案