I keep getting weird errors (when trying to compile the Blending.java example)
Any1 know what stupid things this noob is doing? :oops:
Blending.java:48: cannot resolve symbol
symbol : class FiltersLightingAndControl
location: class Blending
public class Blending extends FiltersLightingAndControl {
^
Blending.java:61: cannot resolve symbol
symbol : method createFloatBuffer (int)
location: class Blending
private FloatBuffer lightAmbient = createFloatBuffer(4).put(0.5f).put(0.5f).put(0.5f).put(1.0f);
^
Blending.java:63: cannot resolve symbol
symbol : method createFloatBuffer (int)
location: class Blending
private FloatBuffer lightDiffuse = createFloatBuffer(4).put(1.0f).put(1.0f).put(1.0f).put(1.0f);
^
Blending.java:65: cannot resolve symbol
symbol : method createFloatBuffer (int)
location: class Blending
private FloatBuffer lightPosition = createFloatBuffer(4).put(0.0f).put(0.0f).put(2.0f).put(1.0f);
^
Blending.java:70: cannot resolve symbol
symbol : method createIntBuffer (int)
location: class Blending
private IntBuffer textureBuf = createIntBuffer(3);
^
Blending.java:90: cannot resolve symbol
symbol : class Texture
location: class Blending
Texture[] textureImage = new Texture[1];
^
Blending.java:90: cannot resolve symbol
symbol : class Texture
location: class Blending
Texture[] textureImage = new Texture[1];
^
Blending.java:94: cannot resolve symbol
symbol : method loadImage (java.lang.String)
location: class Blending
textureImage[0] = loadImage("data/glass.png");
^
Blending.java:100: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.genTextures(3, Sys.getDirectBufferAddress(textureBuf));
^
Blending.java:103: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.bindTexture(GL.TEXTURE_2D, textureBuf.get(0));
^
Blending.java:104: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_MAG_FILTER, GL.NEAREST);
^
Blending.java:105: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_MIN_FILTER, GL.NEAREST);
^
Blending.java:106: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texImage2D(GL.TEXTURE_2D,
^
Blending.java:117: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.bindTexture(GL.TEXTURE_2D, textureBuf.get(1));
^
Blending.java:118: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_MAG_FILTER, GL.LINEAR);
^
Blending.java:119: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_MIN_FILTER, GL.LINEAR);
^
Blending.java:120: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texImage2D(GL.TEXTURE_2D,
^
Blending.java:131: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.bindTexture(GL.TEXTURE_2D, textureBuf.get(2));
^
Blending.java:132: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_MAG_FILTER, GL.LINEAR);
^
Blending.java:133: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_MIN_FILTER, GL.LINEAR_MIPMAP_NEAREST);
^
Blending.java:134: cannot resolve symbol
symbol : variable glu
location: class Blending
glu.build2DMipmaps(GL.TEXTURE_2D,
^
Blending.java:152: cannot resolve symbol
symbol : variable super
location: class Blending
super.initGL();
^
Blending.java:155: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.color4f(1.0f,1.0f,1.0f,0.5f);
^
Blending.java:157: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.blendFunc(GL.SRC_ALPHA, GL.ONE);
^
Blending.java:167: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT);
^
Blending.java:170: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.loadIdentity();
^
Blending.java:172: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.translatef(0.0f, 0.0f, z);
^
Blending.java:174: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.rotatef(xrot, 1.0f, 0.0f, 0.0f);
^
Blending.java:176: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.rotatef(yrot, 0.0f, 1.0f, 0.0f);
^
Blending.java:178: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.bindTexture(GL.TEXTURE_2D, textureBuf.get(filter));
^
Blending.java:180: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.begin(GL.QUADS);
^
Blending.java:183: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.normal3f( 0.0f, 0.0f, 1.0f);
^
Blending.java:185: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, 1.0f);
^
Blending.java:185: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, 1.0f);
^
Blending.java:187: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, 1.0f);
^
Blending.java:187: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, 1.0f);
^
Blending.java:189: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, 1.0f);
^
Blending.java:189: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, 1.0f);
^
Blending.java:191: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, 1.0f);
^
Blending.java:191: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, 1.0f);
^
Blending.java:195: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.normal3f( 0.0f, 0.0f,-1.0f);
^
Blending.java:197: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, -1.0f);
^
Blending.java:197: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, -1.0f);
^
Blending.java:199: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, -1.0f);
^
Blending.java:199: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, -1.0f);
^
Blending.java:201: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, -1.0f);
^
Blending.java:201: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, -1.0f);
^
Blending.java:203: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, -1.0f);
^
Blending.java:203: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, -1.0f);
^
Blending.java:207: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.normal3f( 0.0f, 1.0f, 0.0f);
^
Blending.java:209: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, -1.0f);
^
Blending.java:209: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, -1.0f);
^
Blending.java:211: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-1.0f, 1.0f, 1.0f);
^
Blending.java:211: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-1.0f, 1.0f, 1.0f);
^
Blending.java:213: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 1.0f, 1.0f, 1.0f);
^
Blending.java:213: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 1.0f, 1.0f, 1.0f);
^
Blending.java:215: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, -1.0f);
^
Blending.java:215: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, -1.0f);
^
Blending.java:219: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.normal3f( 0.0f,-1.0f, 0.0f);
^
Blending.java:221: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f(-1.0f, -1.0f, -1.0f);
^
Blending.java:221: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f(-1.0f, -1.0f, -1.0f);
^
Blending.java:223: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f( 1.0f, -1.0f, -1.0f);
^
Blending.java:223: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f( 1.0f, -1.0f, -1.0f);
^
Blending.java:225: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, 1.0f);
^
Blending.java:225: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, 1.0f);
^
Blending.java:227: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, 1.0f);
^
Blending.java:227: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, 1.0f);
^
Blending.java:231: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.normal3f( 1.0f, 0.0f, 0.0f);
^
Blending.java:233: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, -1.0f);
^
Blending.java:233: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, -1.0f);
^
Blending.java:235: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, -1.0f);
^
Blending.java:235: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, -1.0f);
^
Blending.java:237: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, 1.0f);
^
Blending.java:237: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, 1.0f);
^
Blending.java:239: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, 1.0f);
^
Blending.java:239: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, 1.0f);
^
Blending.java:243: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.normal3f(-1.0f, 0.0f, 0.0f);
^
Blending.java:245: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, -1.0f);
^
Blending.java:245: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, -1.0f);
^
Blending.java:247: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, 1.0f);
^
Blending.java:247: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, 1.0f);
^
Blending.java:249: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, 1.0f);
^
Blending.java:249: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(1.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, 1.0f);
^
Blending.java:251: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, -1.0f);
^
Blending.java:251: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, -1.0f);
^
Blending.java:252: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.end();
^
Blending.java:267: cannot resolve symbol
symbol : variable done
location: class Blending
done = true;
^
Blending.java:276: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.disable(GL.LIGHTING);
^
Blending.java:279: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.enable(GL.LIGHTING);
^
Blending.java:304: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.enable(GL.BLEND);
^
Blending.java:306: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.disable(GL.DEPTH_TEST);
^
Blending.java:310: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.disable(GL.BLEND);
^
Blending.java:312: cannot resolve symbol
symbol : variable gl
location: class Blending
gl.enable(GL.DEPTH_TEST);
^
Blending.java:344: cannot resolve symbol
symbol : method start (int,int,int,boolean)
location: class Blending
lesson.start(640, 480, 16, false);
^
94 errors
What version are you using?
Seems you have a 0.6+ version (most likely 0.7-pre). and are trying to compile some 0.6 code.
The GL class has been made static in newer releases, and is thus accessed in a static context:
gl.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT);
becomes
GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
also,
Sys.getDirectBufferAddress(textureBuf) no longer exists, just supply the buffer as is (flipping if needed)
I'm currently using lwjgl-0.6-rh8.zip
and that was (Blending.java) from the lwjgl-source-.6.zip
I think I'm just gonna "reinstall" the whole package and then see if I still get the errors :)
Looks like you're trying to compile Blending.java without its dependencies - looks like it needs Texture.java and FiltersLightingAndControl.java at the very least.
Don't just pull one file out, pull them all out and try and compile them all at the same time.
yah, that's what I learned when searching a bit deeper.
Alas I can't test it now (since I'm at work), I'll check it out sometime later... Hopefully every thing will turn out ok :) (as I think it will)