Hello, ive just started playing with jme (cool so far ) and stumpled across a little problem when running through the HelloKeyInput tutorial.
First the TriMesh creation has to be fixed as it doesn’t use FloatBuffers, so my question is first, is this the way:
FloatBuffer vertices = BufferUtils.createFloatBuffer(new Vector3f[] {
new Vector3f(0,0,0),
new Vector3f(1,0,0),
new Vector3f(0,1,0),
new Vector3f(1,1,0)
});
It works, but is it the "right" way (Might as well get it right the first time)
Next, later in the tutorial code this appears:
Vector2f[] texes=square.getTextures();
texes[1].set(coordDelta,0);
texes[2].set(0,coordDelta);
texes[3].set(coordDelta,coordDelta);
square.updateTextureBuffer();
This should update the texture, but can no longer be used, so instead I tried this:
FloatBuffer texes = square.getTextureBuffer();
BufferUtils.setInBuffer(new Vector2f(coordDelta,0),texes, 1);
BufferUtils.setInBuffer(new Vector2f(0,coordDelta),texes, 2);
BufferUtils.setInBuffer(new Vector2f(coordDelta,coordDelta),texes, 3);
square.setTextureBuffer(texes);
Again it works, but it looks much like the second way to update texture with the deprecated setTexture method from TriMesh as a new Vector2f is created each time. So is it the proper way, the old?
Also the TextureManager.textureLoad method has a field called anisoLevel which is omitted in the tutorials - I found it in java docs, but it doesn't explain which values are possible?
Think Im gonna note the errors/deprecations I find in the tutorials and create a thread with them once ive done with it, as it seems there are quite a few of them after 0.9