JOGL Textures

On May 7, 2008, at 1:17 PM, Michael Kiefte wrote:

That solves the Java version problem, but it still leaves the library
linking issue:

Exception in thread “main” java.lang.UnsatisfiedLinkError: no jogl in
java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1753)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at
com
.sun
.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:
189)
at com.sun.opengl.impl.NativeLibLoader.access
$000(NativeLibLoader.java:49)
at com.sun.opengl.impl.NativeLibLoader
$DefaultAction.loadLibrary(NativeLibLoader.java:80)
at
com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:
103)
at com.sun.opengl.impl.NativeLibLoader.access
$200(NativeLibLoader.java:49)
at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:
109)
at
com
.sun
.opengl
.impl
.macosx.MacOSXGLDrawableFactory.(MacOSXGLDrawableFactory.java:
53)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:
108)
at
javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:
520)
at javax.media.opengl.GLCanvas.(GLCanvas.java:131)
at javax.media.opengl.GLCanvas.(GLCanvas.java:90)
at TextureDemo.main(TextureDemo.java:196)


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Actually, that’s a different problem. The first time, your computer knew were the libraries were, but they weren’t the right type. This time, it doesn’t even know where the libraries are because it can’t figure out the java.library.path.

First thing to do is make sure you typed ./runmac.sh and not ./run.sh. If that’s not it, I’m going to change something.

Also, could you type:
uname -a
on your command line and paste me the result? I need to streamline this, but I don’t know what a mac calls itself.

  • M.

2008/5/7 Thomas Russ <tar@isi.edu (tar@isi.edu)>:

Post generated using Mail2Forum (mail2forum.com)

Michael Kiefte wrote:

Works for me on a Mac as far as I can test it - I don’t have (and can’t,
to the best of my knowledge, simulate) a middle-button :frowning:

Loading takes a good 30s or so and causes the fan to spin up, but then
actually moving or rotating the image doesn’t seem to make things any
busier.

OS X 10.4.11, on a G4.

tim@feathers:~/Download/mipmapdemo$ java -version
java version “1.5.0_13”
Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241)
Java HotSpot™ Client VM (build 1.5.0_13-121, mixed mode, sharing)

Cheers,
Tim.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake Tim Franklin:

Pardon me while I chuckle in superiority. :slight_smile:

That doesn’t surprise me. What’s happening is that before you see anything,
the image is being scaled to various zoom levels using my Lanczos scaler
(which is pretty fast, but not real-time fast) and then your graphics card
is doing linear interpolation (blazingly fast) from the nearest pre-scaled
image.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

2008/5/8 Tim Franklin <tim@pelican.org (tim@pelican.org)>:

I was afraid of that. Does hold down ALT or META do anything? When Java programmers talk about the middle button, is there a standard alternate meaning for Mac users? Otherwise, I can just test those keys in the program.

By the way, what does
uname -a
give you on the command line?

  • M.

Post generated using Mail2Forum (mail2forum.com)

Don’t chuckle too hard. I don’t have a mouse wheel.

I think I now know why ZunTzu takes so long to start up. I think we can do better though. All we have to do is get some half-decent FFT library and scale the images that way. I haven’t started on this, but I think I might do that before tiling the whole map.

  • M.

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

Well, I don’t either when I’m using my laptop.

At what sizes are you creating the mipmaps? Could we do something clever
like calculate the ones most likely to be used before displaying anything,
display the map, and then continue calculating the remaining mipmaps on
a background thread?

Alternatively, or possibly in addition, we could show a progress dialog
along with some cryptic diagnostic information (“Reticulating splines…”)
to keep people entertained.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

That’s a no-no. If all mipmaps are not loaded, you will see a white square; I tried that (it’s kind of dumb to load the 1x1 mipmap, but it won’t display until you do). It’s invalid to not load all mipmaps prior to display().

“Reticulating splines…” That’ll have them on the edge of their seat.

There’s a lot of optimization I can do before that. One obvious thing is that I’m downscaling the original image at each step. That was pretty dumb – I can just rescale the last step which should speed it up by a large factor.

  • M.

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

Did you ever play SimCity 2000? When you loaded the map, there was this
rather sultry voice which said “Reticulating splines…” while the, um,
splines were drawn.

I’m curious to see if that results in a degradation of image quality. I
know that JAI does something like that by creating a image pyramid. If
the quality does degrade, we might be able to recover some by applying an
unsharp mask between scaling.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Actually, I don’t actually play a lot of games. I heard the GPU fan for the first time yesterday, which I thought was kind of neat. I play internet chess and ADC2 (which sucks, but I’ve fixed that ;)

It shouldn’t. The filtering is linear. Filtering a downsampled image is the same as filtering the original image twice which is the same as filtering with a proportionally wider filter impulse response. There might be some roundoff error, though… It shouldn’t make a huge difference still as it may end up being the same number of adds and mults and it may be better since the effective radius will be wider.

I’ll give it a go, but I have to get some real work done today.

  • M.

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

This was YEARS ago, when I was in high school. SimCity 2000 isn’t exactly
recent.

Ok, cool. I wasn’t sure on the theory-side about that.

Grrr, real work! I’m working on a poster for my conference next week
right now. I swear, if VASSAL users could get together enough donations
to pay me about $30k/year, they’d get about 100 hours/week of work out
of me for it. It would he a hell of a good deal for them. :slight_smile:


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

You, sir, have low standards. I’m holding out for $100k/year.

Actually, I’d be happy with a bloody Mac right now.

  • M.

Post generated using Mail2Forum (mail2forum.com)

LOL Joel, if I wasn’t married and have to give all my money to my wife you’d have a deal!

btw, the reticulating splines made a comeback in the Sims and SimCity4 :slight_smile:

Joel Uckelman uckelman@nomic.net wrote:

Post generated using Mail2Forum (mail2forum.com)

I feel I’ve missed out. What year was this?

  • M.

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

Er, 1994 maybe?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Now I understand. I was in a wildly successful rock band and constantly surrounded by gorgeous groupies.

  • M.

Post generated using Mail2Forum (mail2forum.com)

Joel Uckelman wrote:

It’s hardware-side - I don’t have a mouse either. RSI dictates
touchpad-only, even when the PowerBook is tethered. And yes, after
mumble years, I still miss it…

To answer Michael’s other questions rather than scattering across emails:

Ctrl-click simulates right-click for the single-button environments, but
I can’t find anything similar for middle-click.

tim@feathers:~/Download/mipmapdemo$ uname -a
Darwin feathers.pelican.org 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct
10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh
powerpc

Regards,
Tim.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Jeffrey Brent McBeth wrote:

There was a SimCity with llamas? I thought only Jeff Minter was allowed
to do llama games.

Metagalactic Llamas Battle at the Edge of Time. Best. Game. Title. Evar.

Cheers,
Tim.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Jeffrey Brent McBeth wrote:

I was taking my my first fragile steps on the dark path of a career in
computing, programming credit card systems. Any groupies were very much
in my head.

Computing definitely needs more groupies.

Cheers,
Tim.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thanks. What does
uname -m
say?

Sorry for all the questions. I want to make this easier so that we can all use the same script.

  • M.

Post generated using Mail2Forum (mail2forum.com)