TexCoords deprecated?

i saw this line in a tutorial


hudQuad.setTextureCoords(new TexCoords(texCoords));



but TexCoords doesnt seem to work anymore. does anybody know which Class i have to use instead?

thx!

ps: the same problem with BlendState!

How, exactly, do they "not work anymore"?  Do you have the correct imports?

der is no import available for this class

I think you might have a version mixup… if you are looking at tutorial code that uses blendstate, then that is a tutorial for jME 2. If your jME version does not have blendstate in it, then you are in fact using jME 1.



I think at the moment the tutorials are being separated into separate categories for jME 1 and 2, but there might still be a few examples that are set in an incorrect place. In any case try to identify what version of jMe a particular tutorial is for… and then either use a corresponding jME version or just try to find another tutorial…

I think Mindgamer hit the nail on the head about the different versions.  And it was actually just last night that I deleted the 2.0 version of that tutorial that I had working.  Nuts!



I believe that the HUD tutorial is currently stuck in a neverland between version 1 and 2.  The third part is definitely using some version 2 references, and the fourth one is using version 1.



import com.jme.scene.state.BlendState;

import com.jme.scene.TexCoords;



should help you out if you're using version 2.



If you're still having problems, post specific error messages so we can help more.

You're getting burned by the "change" from jME1 to jME2 in the source code, but no consistent change in the tutorials.



It sounds like you currently have the jME2 source, and I recommend you stay with that.  However, the tutorial you're referencing still uses the jME1 syntax, and some of the API has been changed, so you're getting compile errors.  Check out this wiki page: http://www.jmonkeyengine.com/wiki/doku.php?id=jme_to_jme2_changes



This page will show you the most common API changes (or at least the ones that people have been kind enough to document) and hopefully you'll find what the "new" syntax should be for all your "unresolved" issues.



Shout if you run into another problem.

mjsimpson said:

You're getting burned by the "change" from jME1 to jME2 in the source code, but no consistent change in the tutorials.

It sounds like you currently have the jME2 source, and I recommend you stay with that.  However, the tutorial you're referencing still uses the jME1 syntax, and some of the API has been changed, so you're getting compile errors.  Check out this wiki page: http://www.jmonkeyengine.com/wiki/doku.php?id=jme_to_jme2_changes

This page will show you the most common API changes (or at least the ones that people have been kind enough to document) and hopefully you'll find what the "new" syntax should be for all your "unresolved" issues.

Shout if you run into another problem.


No problems :) We got it working.