Prerelease 2 of LWJGL 0.7

Started by Matzon, August 17, 2003, 21:22:15

Previous topic - Next topic

princec

Heh. I reckon you'll find it does it on the CPU before it gets to the card :) But still, nice to know it's got a use.

Cas :)

spasi

Quote from: "princec"Heh. I reckon you'll find it does it on the CPU before it gets to the card :)

I hope not, but even if it does it on the CPU, it would be much faster than doing it in Java. Anyway, do you know where I can find some info on this? Just to be certain.

ATI_separate_stencil is missing... :lol:

elias

Knowing the Keyboard CAPS LOCK state etc. sounds like you're working around what could be a LWJGL translation bug. Can you give more specific detail as to what is broken in the translation?

- elias

spasi

Well, as functionality is concerned, the numeric keypad keys don't translate to any characters, whether num lock is on or off.

As with bugs...I haven't managed to isolate it yet. There's some strange behavior going on, but only some times. I guess it may have something to do with other applications I'm running (I'm on WinXP by the way). I don't know. But here is an example of what happens when I encounter the bug:

Normally if you press and hold Shift, press and release A, then release Shift, you should get the following events:

Shift (pressed)
A (pressed)
A (released)
Shift (released)

Without translation enabled, it always does it right. But sometimes, with translation enabled, I get the following (with the same presses/releases):

Shift (pressed)
A (pressed)
Shift (released) <- Wrong
A (released)
Shift (pressed) <- Wrong
Shift (released)

I hope this helps...

I'm planning support of greek language input in my TextFields, that will require a map of Keyboard.KEYs to characters anyway. That's why I'm asking for that functionality. I'm just wondering, is it difficult to implement? If it isn't, I think it would be a nice addition to the API.

elias

I looked through the code and couldn't find anything suspicious :/ It would really help if you tracked it down to something reproducible... Anyway, why can't win32 do the greece translation for you?

- elias

spasi

Quote from: "elias"
Anyway, why can't win32 do the greece translation for you?

It could, but it's ugly and I don't trust it.

Ugly, because it returns some odd char values > 256, which still have to be translated to something 0-256 (or 0-128), to look-up characters in my font textures.

Moreover, I'm not sure if machines with different character sets (or whatever they're called), or lack of the appropriate ones, would return the same values for each key. Can I be sure that win32 returns the same values as linux? Or that the user's machine is properly configured and supports languages other than english? That's why I don't trust it. I've seen a lot of problems concerning greek language support, all these years.

I have to be sure everything works as expected, and that's why I want to do it myself.

Anyway, I'm asking for such a little thing...  :roll:

spasi

Also, by doing it myself, a user will be able to see and type greek text, even if there's no support for it by the OS. Don't you think that's a big advantage?

elias

Weird chars? Aren't they just unicode? Anyway, it's not much you ask for for, but it is still a work around of an existing feature, and I don't like to have two different methods of doing the same thing instead of fixing the existing one (or replacing it).

Anyway, X Windows cannot give you the LED status in a portable way.

- elias

princec

My font code works fine with Unicode, and even renders Hebrew. All the support is built in to Java if you want to use it. However it's sad to say that this stuff really isn't meant to be in the LWJGL library. We provide a very raw interface to the hardware and very little else. And on the face of things, it's probably very noble to spend a lot of time writing a game that you can type your name in Greek on the hiscore table but it's also probably a total, utter waste of time from a business perspective in terms of cost-benefit.

Despite using plain ol' English in Alien Flux, which would imply that the UK would be represented a little better, Alien Flux's current purchase statistics show that nearly 90% of the customers are Americans or Canadians, even though only 40% of the site visitors are from there. It follows that this is likely to be the case for other games, give or take. The Greek market is almost certainly going to be <1% of your customer base.

Lowest common denominators. Don't you just love them? That's why we're still stuck with 8.3 names here and there. Criminy.

Cas :)

cfmdobbie

Yes, but Spasi is Greek (or at the very least works there).  Just because the Internet gives you a global market doesn't stop there being a local market for software.  And if you're in Greece and know Greek people, I expect the market will be much more than 1% Greek. :?
ellomynameis Charlie Dobbie.

spasi

When we started designing the whole thing we agreed to support two languages at least, english of course and greek. And I'm not talking text only, but speech too. I know the greek market will be only a small percent, but given the fact what we are doing has never been done in Greece before, the enthusiasm of a greek game will be enormous.

cfmdobbie is right. We've seen a couple of pathetic games make considerable sales, just because they were done here. We don't want to miss that  :wink:

Anyway, I guess I'll have to improve my font code.

fenix

We're also doing this for publicity and recognition. History and language is a sensitive subject in Greece (isn't it everywhere?), so having a greek company ship a game about ancient Greece in English wouldn't look good.
postolos Tsakpinis
zDimensions

princec

even so I'm not completely sure why you're having problems.
Do Greek chars work in Alien Flux on the hiscore table?

Cas :)

spasi

Quote from: "princec"
Do Greek chars work in Alien Flux on the hiscore table?

Yes, they do! How did you do that  :shock: ? Does Alien Flux come with greek characters in its textures? Or do you build them at runtime (from what you've said before, I don't think so)? They look fine, except accented characters don't work. I don't know if "accent" is the right word, you know, I mean the "dots" over vowels we put in words. Just like the one on 'i'. Oh, for some strange reason it only works for 'e', that is, an 'e' with a "dot" on it.

Quote from: "princec"
even so I'm not completely sure why you're having problems.

Well, I haven't had any problems yet, only thought about the problem, I was going to implement it later. From my first thoughts, I found that it would be easier to map a Keyboard.KEY to an offset in my textures, but it all came down to the Caps lock problem. It's still doable, except for that. Anyway, I'll have to do it another way now. That is, a map of char values to offsets. This is what you're doing in Flux, right?

By the way, from my tests, the lwjgl translation works right for greek accented characters. It returns the correct unicode, so no worries there.

spasi

I mentioned in this topic that the ATI_separate_stencil extension is missing from lwjgl and I didn't get any responce and I haven't seen it in sourceforge yet. Is it getting in?