> -----Original Message----- > From: Chris Forrester [mailto:[EMAIL PROTECTED]] > Sent: Montag, 13. Mai 2002 23:09 > To: [EMAIL PROTECTED] > Subject: [JAVA3D] Text2D.setString() issues... help? > > > Hey all. While trying to get some debug output onscreen > (mainly the logic > thread fps and the renderer fps) using Text2D objects, I've > hit a few walls. > > (1) Texture::Illegal Image Size - > This occurs in some cases when SetString() is called and the > string sent is > small, or the font is too big, or something. > I have it working right now by trial and error with > fonts/font sizes/text > string length. >
that is most likeky a bug in Texture2D. The constructor calls updateText2D(), which in turn calls setupImage() and setupTexture(). setString() calls *only* setupImage() and I suspect that a call to setupTexture() was forgotten. I had a similar problem when using setRectangleScaleFactor(). This method has *no effect at all* because it does not update the generated image and texture. > The odd thing about this is that I never get the error no > matter the font, > font size, text string length upon initializing the Text2D > object.. i'm > guessing there's an internal bug where the new Texture > dimensions for the > string isn't constrained to power of two? > > (2) Out of Memory - > This happens eventually, always. Maybe the old Texture > objects aren't being > flushed from the system? > > > So what to do? A java2d layer with text on that? The out of > memory error > i've seen before in java3d threads from quite awhile ago, but > the illegal > image size is a new one.. So how are the rest of you > outputting debug info > on-screen? hm ... I think that's a rather expensive way to print debug output maybe you should have a look at Canvas3D.postRender() and Canvas3D.getGraphics2D() to draw into the 3D canvas -- Peter > > > ------------------------ > > Chris Forrester > > http://www.geocities.com/Psionic81 > > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > ============================================================== > ============= > To unsubscribe, send email to [EMAIL PROTECTED] and > include in the body > of the message "signoff JAVA3D-INTEREST". For general help, > send email to > [EMAIL PROTECTED] and include in the body of the message "help". > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
