Stephane Cloutier wrote:

>         I actually use j3d in a project where I absolutely need labels (which can
> be really big).  I can use Text2D or Text3D objects but I have problems
> with the 2 alternatives.
>         In the second case, as I posted yesterday, I can't retrieve the Text3D
> vertices coordinates, something I must also absolutely do.
>         In the first case, I have problems with texture size.  As I said, I must
> sometimes generate labels with font size of some hundreds points and it
> seems that as soon as the width or height of the texture overflow 1024
> pixels, the appearance of the Text2D object is a black rectangle.  I can't
> tell where exactly this "bug" is generated in the Text2D class but as the
> bufferedImage seems to be ok, it would probably be in setupTexture().
>

Create a Text2D with a small font - 12 point or something, and then scale it up with
a scale transform to the desired size. This way, hardly any texture memory is needed,
and there is no 1024 point or texture size limit. You can wrap this up in a factory
object with a method like
  Group buildText2D(String message, double size)
(Sorry may have got class names wrong)

>
>         Does anyone have experienced this strange effect?  Anyone has an idea on
> the cause or solution?
>
>         Thanks.
>         Stephane Clouter
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 3D Home Page: http://java.sun.com/products/java-media/3D/

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to