Show Posts
|
|
Pages: [1] 2 3 ... 5
|
|
3
|
Java Game APIs & Engines / JOGL Development / Re: Catch 22 for jogl
|
on: 2009-11-28 16:07:52
|
LWJGL is not focused on games, and hasn't been for a long time. It's just a general hi-perf direct media layer. Medical imaging, CAD/CAM, TV graphics etc. are all what it's about.
TV graphics? Could you elaborate on that a little? I wasn't aware that there're TVs that can run Java, let alone OpenGL. Or did you mean broadcast graphics content? .rex
|
|
|
|
|
4
|
Java Game APIs & Engines / JOGL Development / Re: Catch 22 for jogl
|
on: 2009-11-28 11:53:40
|
Under Linux and Mac, I confirm that JavaFX uses JOGL 2 but I don't know exactly which part of it, it is used at least for the GLSL shaders.
Thanks for the confirmation. If JavaFX uses JOGL2, then how can JOGL(2) be an abandoned project by Sun as I've read from some posts around the web? And does JavaFX maintain its own private branch of JOGL2? .rex
|
|
|
|
|
5
|
Java Game APIs & Engines / JOGL Development / Re: Catch 22 for jogl
|
on: 2009-11-28 10:08:37
|
Speaking for Sven and me, we have not the resources to support JOGL 1.x and work on JOGL2 at the same time. Don't expect any jogl 1.x fixes from us. JOGL2 is now community driven, JOGL1 is 'politics' driven and has been forked company internally (apparently long time ago).
Hi Bienator, so what does JavaFX use internally? I was under the impression that it uses JOGL as its rendering layer. I would appreciate any clarification on this matter. .rex
|
|
|
|
|
6
|
Java Game APIs & Engines / JOGL Development / Re: Rotations Sequences
|
on: 2009-08-20 16:11:03
|
You might have run into gimbal locks, which is something that happens when using Euler angles: http://en.wikipedia.org/wiki/Gimbal_lockE.g. Given an object, you can reach the same orientation using 2 different rotation sequences with Euler angles: Rotate on Y-axis by 90 degrees, then rotate on X-axis by -90 degrees. is the same as: Rotate on X-axis by -90 degrees, then rotate on Z-axis by -90 degrees. Just hold a rectangular object with your hands and do the above experiment yourself and you'll realise that there're more than one way to arrive at the same orientation. .rex
|
|
|
|
|
7
|
Java Game APIs & Engines / JOGL Development / Re: setSwapInterval(1) high CPU load
|
on: 2009-08-20 09:40:51
|
Here's what I do, but it may not be applicable to you because I manage my own OpenGL rendering thread and do *not* use the EDT. That is, my OpenGL rendering is separate from the EDT so that my UI is not blocked by OpenGL calls. --- I typically issue a Thread.sleep() before it is time to swap buffers, in order to spend as little time as possible inside the swapBuffer() call itself. You will need to measure how much time your frame takes and calculate the amount to sleep accordingly. For 60fps, each frame is 16.667ms long. If your frame takes 5ms to render, then you can sleep for 10ms and wake up just in time for the swap. You need to give the system at least 1-2ms buffer due to timer inaccuracies, so the amount to sleep needs to be clamped. On Windows, the timer can be made go at 1KHz using this piece of code at the start of your app: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| private static class LongSleepingThread extends Thread { public LongSleepingThread() { super("HiRes Bugfix (Windows)"); setDaemon(true); } public void run() { while (true) { try { Thread.sleep(Integer.MAX_VALUE); } catch (InterruptedException e) {} } } } |
.rex
|
|
|
|
|
8
|
Java Game APIs & Engines / JOGL Development / Re: Efficient Texture Updating
|
on: 2009-07-02 10:18:15
|
You only have to have a quick browse of the forum to see how many people have issues with the Jogl-specific helper classes like TextureIO. Given the state-machine design of opengl, having opaque third party code tinkering with the state behind your back is a recipe for bugs and lots of tedious debugging.
I'm still at a loss as to why the utility stuff is included in the core jogl distribution - that kind of stuff should really be extracted out into a separate library because it just confuses newbies and is dead weight to everyone else.
Alternatively, the documentation for the utility classes should be updated to state clearly which GL states are affected and that users should be very careful about restoring their states. The complexity of the texture object often defeats a newbie, and most people just end up writing their own wrapper. The utility classes have their use to get newbies started quickly, but they need to know about the pitfalls and the best way is put the warnings in the API reference. .rex
|
|
|
|
|
9
|
Java Game APIs & Engines / JOGL Development / Re: JOGL GPU affinity
|
on: 2009-06-30 09:49:15
|
|
Hey Sven,
(Great to have met you at GDC09!)
In a related problem, how does one create a GL context using JOGL in a headless system? That is, none of the windowing system comes into play because in a system like NV's Tesla, there's no video output.
.rex
|
|
|
|
|
11
|
Java Game APIs & Engines / JOGL Development / Re: Evolution
|
on: 2009-05-07 16:56:42
|
I saw people questioning about the evolution about JOGL. Guys charging for this should have a look at: http://code.google.com/intl/zh-CN/apis/o3d/Things are natural, dinosaur will become fossil and mammal will control the world. Did dinosaur know its fate? This is comparing apples with oranges. O3D is a high-level API and doesn't expose OpenGL directly. JOGL is a low-level library that maps OpenGL 1-to-1. I've been doing graphics programming for over a decade and I fail to see the point of this post. And for people who find it entertaining to continuously throw rocks at Java/JOGL/LWJGL, maybe you can consider contributing to it since it is all open-source.
|
|
|
|
|
13
|
Java Game APIs & Engines / JOGL Development / Re: Offscreen Framebuffer objects
|
on: 2008-12-04 08:12:50
|
|
If you are on a desktop using AGP, then glReadPixels is going to be slow. It is possible to get decent speed if you are using PCIe. For example, reading back 640x480 at 60fps is possible on PCIe.
You also need to be careful about the pixel formats. There are only a few 'fast paths' and on Windows, BGRA is the fast path such that the driver does not have to perform additional swizzling of the RGB components.
If your card/driver supports FBOs, use that. FBOs are much easier and faster than PBuffers. Note that the ARB has already approved this extension even though it still has a EXT suffix to the method names.
.rex
|
|
|
|
|
15
|
Java Game APIs & Engines / JOGL Development / Threading in JOGL/Java2D interop
|
on: 2008-05-21 17:42:20
|
|
Hey Ken,
From your demo that uses 'Java2D's new Single-Threaded Rendering OpenGL pipeline' to showcase JOGL/Java2D interop, I'm wonder if it is possible to drive the GLJPanel with a separate thread while the rest of the Swing stuff happens on the EDT?
Will the GLJPanel still show its content correctly (without redrawing) if there're overlapping light-weight components?
My current use case: - A GLJPanel that runs at 60fps, driven by a separate 'engine' thread. - A JPanel on top of it that shows other stuff. e.g. chat window etc.
Is this threading model even possible? Will it cause visual artefacts since both components are driven by separate threads?
Thanks mate!
.rex
|
|
|
|
|
16
|
Java Game APIs & Engines / JOGL Development / Re: 6uN and applets
|
on: 2008-03-20 09:00:57
|
|
That's a good summary of the problems affecting everyone. The combination of different OS'es, availability of stable drivers, choice of pipeline (Windows and Macs having their own set of problems) and even text rasteriser choices make a complex problem that has no simple answer.
---
There's one thing I'm particularly concerned with, and I'm sure many of us here share the same feeling too:
Will JOGL ever become part of the JRE distribution?
I'll be perfectly happy with the 5MB extra footprint for all the things that this makes possible.
.rex
|
|
|
|
|
17
|
Java Game APIs & Engines / JOGL Development / Re: within the browser?
|
on: 2008-03-13 04:58:07
|
|
Thanks Ken!
I've followed up with a response at the bug parade.
I suspect the 6uN b12 build is using the old Java 5 image for the tray icon, because I was expecting to see the new orange version that's been shipping with Java 6.
|
|
|
|
|
19
|
Java Game APIs & Engines / JOGL Development / Re: within the browser?
|
on: 2008-03-06 08:30:07
|
|
Ken, thanks and super glad that you've been working on critically important parts of desktop Java.
Rehashing an already debated-to-death question: What is Sun's strategy for dealing with the entirely empty space of designer-friendly tools (e.g. Flash studio) so that non-engineers can create media-savvy RIAs on top of Java? Let's face it, the current crop of UI tools are designed by engineers for engineers. This approach is evidently not going to get desktop Java anywhere near the RIA space where I think Java can and should shine in. It is almost funny (and sad at the same time) that Adobe built its Flex solution on top of Eclipse and released AIR just a few days ago.
---
Back to the Consumer JRE. I've been following it for some time and glad that it has reached a milestone. Seems like Build 13 will be a big one to look forward to for me.
shwup (if you remember it) will be reborn (the experimental phase is over) in the next few months incorporating all the cool stuff you've seen and that's just the tip of the iceberg. These deployment and version control issues have really been the achilles heel stopping us from going out in a big way, so rest assured that we'll be trying out the EA builds internally.
.rex
|
|
|
|
|
20
|
Java Game APIs & Engines / JOGL Development / within the browser?
|
on: 2008-03-05 06:06:06
|
|
Hi folks,
Been a while. How's everyone doing?
Here's a question I could use some collective wisdom on.
1. Is it possible to get JOGL working *within* the browser (FF) without going thru the applet path?
For example, a FF plug-in that grabs the windows handle of the browser's rendering space and let JOGL create a GL context out of it.
2. Is it possible to do this via JWS?
If the answer is Yes to both these questions, then it is possible to allow the app to fill up (and resizable) the browser space *and* benefit from JWS's version control + JRE management.
.rex
|
|
|
|
|
21
|
Java Game APIs & Engines / JOGL Development / Custom null GL pipeline?
|
on: 2007-06-02 12:10:37
|
|
Hi Ken,
I'm looking for a convenient way to disable all OpenGL ops without having to bracket all GL methods. I'm wondering if implementing a custom GL object, like DebugGL/TraceGL, that simply does nothing and returns, will be considered abuse and has pitfalls..? Will this work when there's no active context?
Please advise.. Thanks!
.rex
|
|
|
|
|
22
|
Java Game APIs & Engines / JOGL Development / Re: Browser repaint problem - JOGL applet
|
on: 2007-03-01 05:30:44
|
|
Hi Ken (and colleague cheerie..),
I'm using a nVidia 6600GT and is able to reproduce it, just like you described. Thanks for pinging nVidia on this.
On a different note, Apple OSX's recent Java update (~15th Feb 2007) now crashes JOGL+AWT apps on exit. I've sent the crash report to Apple already.
.rex
|
|
|
|
|
23
|
Java Game APIs & Engines / JOGL Development / Re: "Faster" texture internal format
|
on: 2006-03-03 11:32:00
|
|
Speaking of TGA, which is very OpenGL-friendly because of its flipped Y-axis.. However, suppose one has to work with JPGs, what is the preferred way of flipping the loaded image since JPGs are not flipped on the Y-axis like TGAs.
I have to work with many large JPGs all the time so I avoid creating an extra copy of BufferedImage and flipping it in code by flipping the V texture coord instead but this must be handled carefully..
Any better ideas?
.rex
|
|
|
|
|
28
|
Java Game APIs & Engines / JOGL Development / Re: Minimal JOGL
|
on: 2005-12-07 05:40:04
|
I did some investigating and got the following results. 1. unzip jogl.jar and rezip it without the manifest directory (otherwise it causes some exceptions with pack200) 2. run "pack200 --repack jogl.jar" 3. run "pack200 --modification-time=latest --deflate-hint="false" --strip-debug jogl.pack.gz jogl.jar" [size=15pt]jogl.jar: 837KB -> 199KB ![/size]I think this calls for some serious look into the possibility of having jogl.jnlp serve the packed version for Java 1.5+. Ken?  .rex
|
|
|
|
|
29
|
Java Game APIs & Engines / JOGL Development / Minimal JOGL
|
on: 2005-12-05 09:57:18
|
|
Has anyone tried to find out the smallest possible size for using JOGL?
jogl.jar is currently 837KB. Can this use Pack200 via Webstart?
jogl-natives-win32.jar is currently 56KB. If I remove jogl_cg.dll which I don't need then it is 40KB. I doubt this can go much smaller but does anyone has any idea?
My aim is to reduce the first-run wait that the user has to go through. If the user is on a 56Kbps modem, then that's about a 2-minute wait. A 512Kbps ADSL line will need about 25-seconds.
Using tricks like parsing the class files and rip out methods that are not used is not a good idea because you never know when you will need them again when your app is updated, without having to re-download JOGL.
Any suggestions?
.rex
|
|
|
|
|
30
|
Java Game APIs & Engines / JOGL Development / Re: JOGL JSR implementation performance with JNI
|
on: 2005-11-28 10:19:47
|
I do remember that for any processor without full SSE2 support the speed difference between Java and native C code was huge due to the inefficient code that must be generated in order to make the Intel x87 floating-point unit produce Java-compliant floating point results.
Hi Ken, would you care to elaborate on what you mean by the above? AFAIK there're still a lot of CPUs out there that do not have SSE2 and we'll have to support those and make sure there's an acceptable level of performance for them. So my questions are: 1. How is SSE2 used in JSR-231? 2. How huge are the performance differences and what's the context? 3. 'inefficient code that must be generated' ? Many thanks in advance! .rex
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|