So is there an easy way to do it? Mainly how do i get the rasterized characters of some arbitrary font?
What do you guys do to display text along with your 3d animations?
Cheers
So is there an easy way to do it? Mainly how do i get the rasterized characters of some arbitrary font?
What do you guys do to display text along with your 3d animations?
Cheers
I hate to sound like a troll, but I have asked this question, looked on google, and otherwise investigated the issue with the conclusion that there is no way to easily display text (2D or 3D) using JOGL.
(Warning: Rant) It would be WONDERFUL if Sun would build some libraries as part of JOGL that would display transformable (that’s right, rotation, translation, and scaling), antialiased 2D text and nice looking 3D text. Perhaps this could be in the jogl.util part of the jar. These features need to be a part of the JOGL core, not some download in someone else’s project (e.g. Xith3D). No matter how good these libraries are, there are core features that need to be a part of the core API.
(Warning: OT) The OpenGL community at large needs to address the issue that DirectX is making a serious attempt to pass (if it hasn’t already) up OpenGL in many ways. It has built in mesh libraries, great text functions, built in quaternion support, etc. Again, it would be great if Sun would spearhead the effort to add some of these features in as parts of JOGL (or whatever the official JSR version will be called).
BTW, if you can answer the question, please do. Thanks.
I stand corrected. . . .sort of. Look at NeHe lesson 14. This gives two fonts via glut that works fairly well. Nothing arbitrary, though.
BTW, does anyone know if you need a glut dll on the host machine to make this work? I was a little surprised to find that this worked right out of the box. I just need verification.
shaddam_IV:
As far as I know JOGL is a bare bones opengl binding for java. It is not Suns job to add new and improved features to opengl.
But I’m hoping people will share their code, and that there will be more libraries that can be used with JOGL and LWGJL.
As for Rinswind question:
There is no “easy” way of displaying text. You must somehow do it yourself. Or use a library if you can find one. I think the most common way is to use a bitmap font. Then either draw it directly to the raster, or by using a textured quad for each character.
Tom, I agree with you on everything, but I feel that I must clarify.
[quote]shaddam_IV:
As far as I know JOGL is a bare bones opengl binding for java. It is not Suns job to add new and improved features to opengl.
[/quote]
You are absolutely right that it is not Sun’s job to modify OpenGL, and that is not what I am suggesting. I am suggesting that it would be nice if Sun spearheaded an effort to add some of the features that DX already has. This would make GL much more attractive to developers. If you read my first post, you will see that I thought jogl.util would be a good place to put these additional features. This is because I am not at all suggesting modifying the core of GL, but rather suggesting adding some freely available utilities that implement boilerplate features.
Absolutely. It would be nice, however, if these libraries were implemented in a way that gave easy access to everyone (i. e. You don’t have to download from an obscure CVS repository). It would also be nice if these efforts were modular enough that you didn’t have to get the whole game engine, but could just get the parts you needed. Again, this could be implemented very well if a major vendor and supporter (e.g. Sun) used the code the community has developed and put everything in a single, well organized, well developed, place.
Anyways, all of this is just my opinion. This might make a good separate thread topic, though.