AWT/SWING frames.
Why not just use Sun’s implementation of OpenGL in Java2D?
It’s much faster(about 3-5 times the performance over LWJGL under varying circumstances) than LWJGL (I haven’t benched against JOGL though).
AWT/SWING frames.
Why not just use Sun’s implementation of OpenGL in Java2D?
It’s much faster(about 3-5 times the performance over LWJGL under varying circumstances) than LWJGL (I haven’t benched against JOGL though).
I you can pull more performance from using Java2D (OpenGL backend) than from using LWJGL, I’d say you’re:
a: hit a bug in LWJGL
b: doing it wrong
Theoretically, Java2D is just a wrapper around an API like LWJGL (or JOGL for that matter). So by adding a wrapper around an OpenGL api, they should only become slower - not faster.
Maybe it could have been some unoptimised code in LWJGL which was optimised in Sun’s GL piepline?
since the code is just callthrough I find that hard to believe…
[quote]It’s much faster(about 3-5 times the performance over LWJGL under varying circumstances) than LWJGL (I haven’t benched against JOGL though).
[/quote]
There are more than one way to draw triangles with OpenGL. A newbie as yourself don’t know how to do it correctly in will get awful performance. So the performance is caused by your ignorance not LWJGL.
[quote]Why not just use Sun’s implementation of OpenGL in Java2D?
[/quote]
Another strange question. Don’t know how they did it but I highly doubt they implemented their own complete OpenGL wrapper.
" There are more than one way to draw triangles with OpenGL. A newbie as yourself don’t know how to do it correctly in will get awful performance. So the performance is caused by your ignorance not LWJGL. "
I know at least 1 different way to draw triangles.
glBegin(GL_TRIANGLES)
glVertex2f()
glVertex2f()
glVertex2f()
glEnd()
That is the wrong way
I know you can use points as well.
What way do you draw triangles/octagons/shapes?
I’ve never seen any alternatives.
I guess you could draw to the buffer. Then once everything is inside send it in 1 large spunk to be rendered.
The question is how?
I believe you’re looking for Display Lists and/or Vertex Buffer Objects. Both give you the ability to batch stuff up and make a single call to get it rendered.
Kev
Thank you.
It’s funny that everytime I ask a question I really mean something completely different.
Must I be so lazy and leave out important information like what I’m trying to do and why?
Another stupid question.
Display lists look like geometry instancing.
How does one differ from the other?