I’m looking at this Texture Demo again and it looks like this is the only realistic way to do this. Although TextureRenderer looks promising, it’s not going to render the Streets of Stalingrad map as it’s way too big for a single texture (at least on my laptop – and I’d be surprised if the maximum texture size is that big on ANY video card). The way I’m doing this now, the only limit is the amount of memory on your video card (not the same thing as maximum texture size).
Linux: run.sh
64-bit Linux: run64.sh
Windows: run.bat
Win64: run64.bat
Mac: runmac.sh
PPC: runppc.sh
Solaris: do it yourself
Left button moves the map around. Middle button zooms, right button rotates. I don’t have a scroll, so that probably doesn’t work.
The last time I checked, this worked for everyone, but I’m going to be tweaking it some more. There are some irregularities, but only I know what they are – I’ll be interested if you can spot them.
Ran it on my laptop (Vista32). Very smooth and quick. Only thing I noticed was anti-aliasing is not on/enabled?, jagged edges were evident on rotation along map edge. Video card is set to application controlled currently
What would the results be like if we split the map into tiles and used one
texture for each tile? Would we end up with alignment problems at the seams?
Reminder: Please make archives which extract themselves to a single,
new directory. This one splattered itself all over the directory where
I unzipped it.
When I press any button over the map, it goes grey until there’s some mouse
movement. If I’m dragging, this exhibits itself as a brief grey flicker; I
just left click on the map, it stays grey until I start a drag.
Also, there’s some flickering when I resize the window, as well as when I
do things like windowshade or move it.
It works very well for me otherwise, and I have pretty anemic video hardware
on my laptop.
That’s what I’m doing now, and yes, there are alignment problems. However, see if you can spot them.
There is a trick with tiled textures where sizes can be 2^N+2 instead of 2^N that solves the alignment problems. However, this slowed some computers to a crawl. The trick I’m using is to blend the two edges together.
Point noted.
Had you ever seen that before?
That’s a known issue. I know how to solve it, however.
The grey flicker sounds like a very serious problem. Are you using Mesa or is this video hardware?
This also happened with an older version of the demo.
It also doesn’t composit properly with other windows. E.g., if I have another
window overlapping it, the drop shadow from the overlapping window is drawn
over a grey background rather than the actual contents of the demo window.
I’m using Mesa, but it’s still hardware rendering. What I have is an Intel
965GM, possibly the same thing you have.
Here’s a screenshot of what’s wrong with window compositing.
You can see the grey area just outside the terminal window, above the demo.
The problem seems to be with JOGL or the way you’re using it, as the drop
shadow is rendered properly over the window border, toolbar, and title bar.
If I uncomment canvas.display() at the end of mousePressed(), I only get
flicker on a click instead of the whole window going grey. That’s an
improvement, but it shouldn’t repaint the window on a click at all.
I don’t really know how that works. I’m not really aware of anything in OpenGL that tells desktops to do the right thing. This is more of a window manager issue.
What happens if you turn off all nifty graphical features of your window manager? Do you still get the grey flickering?
Look at hex 0901. The numbers are blurry, but that’s nothing to do with the demo (it’s a scanned map).
GPUs like powers of 2. The extra +2 was a kludge introduced in later versions of OpenGL but older video cards don’t like it. I have yet to see one where it works as fast.
That sounds familiar. The video drivers for Linux aren’t great though. I use a tablet, so I had to turn all acceleration off, but the demo still works well. I don’t have any flashy effects on, however.
It’s an interaction issue between OpenGL and Compiz. That’s aggravating,
as I’d been wanting to use Compiz for something like three years before
I was finally able to with Fedora 10 for the past month. We have to find
a workaround for this which doesn’t involve shutting off Compiz, as it’s
becomming very popular these days.
Zoom in very close on hex 0901. You’ll see a horizontal discontinuity towards the top of the hex. That’s a texture edge. It’s almost impossible to notice at 100%, but once you know where to look, you can see it.
I’ll poke around to see what options I can turn on or off. I think I made some assumptions about what wasn’t going to happen to the canvas, but it’s been a while and the older I get, the less I retain.
At least we know what it is.
In the end, we’re going to have to add some obscure OpenGL options in the preferences. There’s just too much variation in hardware and desktop configuration. Defaults will have to be dumb.