Let me Pick your brains

Started by jjones7947, April 27, 2005, 22:53:24

Previous topic - Next topic

jjones7947

Hi to all,
I've spent the last few days reading everything on the home site and all the links as well as going through the posts here.  Have started working LW after 8 months of hacking my way through J3D and coming hard up against not being able to make multitexturing(both kinds) work.
My partner (an expert 3D modeler, etc) and I want to make a game, so here we are. I'd like to speed up the learning process by asking a few questions.
1) If I build my own model classes and want to do a lot of the construction and rendering inside the model class will I have to pass a GL object of some kind into the method?  If so what object?
2) In the example code I've looked at everyone is using code like:
           GL11.glNormal3f(t.p1.n.x, t.p1.n.y, t.p1.n.z);
that uses straight floats.  Are there any methods that operate on objects like a Tuple3f?
3) In running animations, am I correct in assuming that gl handles interpolation based on the frame times?
4) I've not seen many discussions of problems with multitexturing, am I safe in assuming it works and well? As a minimum I want many different base textures and a light map on on all static shapes.
5) What parts like the model classes are not fully implemented? Or marginally functional?

Thanks in advance,
Like what I've seen so far especially the framerates
Jim

tomb

First, I've used multiple textures and multitexturing in J3D. Your probably doing it wrong.

Second, LWJGL is wrapper against OpenGL wich is a c api. No objects or object oriented disign what so ever.

1) There are no GL objects. Only static functions are used.
2) No, only primitves. There are som vector objects in the util part. But it's only there so you can do some math. They are not used with OpenGL.
3) OpenGL don't do anyting except draw triangles to the screen. You have to do all the animation yourself.
4) It works well.
5) There are no model classes. You have to draw your models triangle by triangle.

The answers is based on pure OpenGL. There are libraries, and LWJGL has a util package that may do some of what you wan't.

jjones7947

Thanks for the info as I thought on the objects business.  The "About" page on the LW home site gave the impression there might be. But that's ok I can live with that.
BTW could you please read my detailed post on multitexturing on the java.net forum JavaGames/J3D. If you know what I'm doing wrong I'd appreciate a solution.

Jim

PS The link is:
http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=3D;action=display;num=1114347339

tomb

Quote from: "jjones7947"Thanks for the info as I thought on the objects business.  The "About" page on the LW home site gave the impression there might be. But that's ok I can live with that.
BTW could you please read my detailed post on multitexturing on the java.net forum JavaGames/J3D. If you know what I'm doing wrong I'd appreciate a solution.

Jim

PS The link is:
http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=3D;action=display;num=1114347339

As I see it, the about page says that LWJGL is a small and light weight. In this case this means mostly static functions and not much object oriented (insert slogan here).

I've answered your J3D question at JGF. It's been 3-4 years since I used J3D, so I can't be that spesific. Basicly when you've got 2 triangles that has different texture, you need to split it up and give it it's own apperance. Same with multitexturing.

Orangy Tang

Although there isn't any methods like glVertex(Tuple) what you're really want is vertex arrays. Basically you bung all your data into a (direct!) byte/float/etc. buffer and you can just bind and render straight from it.

Look up glVertexPointer, glNormalPointer, glDrawArrays, glDrawElements for a start.

Skippy0

Or displaylists... depends on how static your geometry is.