views:

53

answers:

1

hi everyone,

in this browser and bitmap graphics dominated world - after decades of macintosh-ish richly decorated windows and pretty components - I'm looking for a way to render fixed size character text, draw an extremely simplified "gui" onto 3d panels that can be zoomed and interactively resized making the content tiny and not wrapped or not more readable, onto "panels" that the user could tile together, "stack" up, turn around, drag etc.

the software should be portable or cross platform.

it seems that a simple, basic 3d layer is a good thing to employ, e.g. opengl, the problem is: i don't know anything about these things.

what's the most easy route to get the thing done without having to learn everything of a 3d toolkit?

what could be the most fitting tool to achieve this?

java3d? or is it outdated/slow? qt toolkit 3d widgets?

thank you in advance for any hint

+1  A: 

OpenGL does have support for rendering text, specifically: `

glRaster3f(GLfloat x, GLfloat y, GLfloat z);

would set the "raster" position, and

glutBitmapCharacter(GLUT_BITMAP_9_BY_15, 'h');

would render an h at that "raster" position. However, that would require learning the OpenGL API.

The other option is to do all of the math for projection yourself and just rendering it onto a character array that is the size of your window.

Here are the matrices that OpenGL uses for its 3D projections and transformations.

That would have generally the same effect, and you wouldn't need all of the extra libraries. However, that would actually make your core program bigger, and it might be slightly slower because it isn't hardware accelerated like OpenGL is.

Java3D on the other hand, actually runs on top of either OpenGL or Direct3D which means that the libraries required to run it would be even more extensive. However, while an API nonetheless, it does seem to be a much simpler API than either OpenGL or Direct3D.

The interactivity is a different problem all-together.

Once again, OpenGL does have the necessary support.

gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);

would convert the window coordinates returned by a mouse click into the 3-space coordinates of the front most texel given the proper projection and modelview matrices.

I don't really know about java3D in this case, or even what you would use if you calculated your own 3D effect.

Overall, you do have a lot to chose from, but all require a good deal of work and consideration.

Ned
thanks a lot; one last thing: what do you think about abstracting frameworks like sdl? thank you again
Unknown
webgl, the "opengl es for the web" seems promising too
Unknown
SDL is a viable input and event handling API, however, the graphics support of SDL is based off of OpenGL, so you might as well just use SDL for input and OpenGL for graphics. There is also GLUT which also handles input and events. For OpenGL rendered in browser, I use JOGL java applet. I can't seem to get webgl to work on my machine, although it definitely looks cool. It seemed to require a lot of setup on the user end. For a jogl example, look here -> https://jogl-demos.dev.java.net/applettest.html For the code, look here http://kenai.com/projects/jogl/sources/jogl-demos-git/show/src/demos
Ned