November 30, 2006

FYI: gluScaleImage is (sometimes) GL_REPEAT

Catégorie: OS Tricks — Michel @ 10:39 am

This is a small FYI for gluScaleImage users. It took me a long time to find this feature, and hopefully you'll be able to use it to your advantage.

If you are working on OpenGL, you probably know that you usually need 2^n texture sizes, usually from 64×64 and usually to 2048×2048 (modern cards). Everything else must be scaled.

In all the manuals, they suggest to use the gluScaleImage in order to rescale the image from a format to another, like if you got a 35×53 texture, you probably want a 64×64. In there, gluScaleImage is your friend… usually. First, you must properly initialize your OpenGL environment, and properly set up its flags. Usually this is no big deal. But then, the gluScaleImage algorithm does not set up any guidelines on how the texturing is done internally, all they say is "linear interpolation" and that's what you will expect. Any other parameter will be implementation-dependent.

This includes the wrapping mode. Since there is no way to indicate how you want to wrap the image, it uses what the implementation deems as "best bet", which is the OpenGL 1.0 default mode: GL_REPEAT. So: pixels will warp from one side to the other during the interpolation. It's a very good bet for most textures, as most are meant to be repeated, but then, for HUDs, user-generated pictures and other textures that you will set to GL_CLAMP, GL_CLAMP_TO_EDGE or GL_CLAMP_TO_BORDER, it will not be what you expect. You will see stray pixels on the other side.

The answer to that is : devise your own algorithm. Sorry kiddo but that's your turf now. If you want to properly control how the image is scaled, create your own version of gluScaleImage. That way, your application will be happy and you will not get strange bugs.

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=9202

November 29, 2006

TV TV TV!!!

Catégorie: Carnets francophiles — Michel @ 5:35 pm

Ouazzaaaaaah!

*tombe a genoux*

*pose triomphale*

http://www.tv-links.co.uk

Ils ont beaucoup … beaucoup … d'émissions de télévision … dont Iron Chef Japan!

C'est tellement notre émission préférée.

November 27, 2006

Projets bénévoles, bergers et moutons

Catégorie: Carnets francophiles — Michel @ 7:51 pm

Plusieurs projets que j'ai réalisés sont tombés pour une raison principale: le manque de dictature et de fouet (le genre qui fait mal).

En une phrase, il faut avoir du leadership, et avoir une vision, et surtout ne pas en démordre et avoir assez fait ses devoirs pour pouvoir s'obstiner longtemps avec quiconque qui veut faire changer le projet.

C'est normal, tout le monde veut donner son grain de sel et pousser ce qu'ils recherchent. C'est super aussi. Mais il faut pouvoir répondre "oui… mais non" quand il faut, sinon, le projet n'avancera pas.

Ensuite, il faut avoir la diplomatie pour faire comprendre que si on ne va pas vers une vision de base, eh bien on n'arrivera jamais nulle part. Après, on peut modifier le projet de base, une fois qu'on en a une version, mais pas avant.

Finalement, il faut prendre le fouet et constamment avancer avec les gens. Même si c'est du bénévolat, il faut faire avancer. Sinon, les gens, c'est comme des moutons, ça ne fera jamais un pas tout seul. On peut le remarquer dans des forums de discussion. Si on se rend dans notre forum favori et qu'il n'y a pas de message qui nous attend, la fenêtre est fermée plus rapidement qu'on a le temps d'y penser. Il faut donc prendre le leadership, faire son berger de soi-même et de faire comprendre aux moutons que c'est "par ici la sortie".

On verra pour mon prochain projet comment ça va aller. Pour le moment, je prend de l'expérience.

November 26, 2006

Nouvelle composition: Strings Attached

Catégorie: Carnets francophiles — Michel @ 8:08 pm

Nouvelle compo, à temps perdu.

Trance, un peu (beaucoup) old-style, cutoff avec filtrage, effets, très minimaliste, très relax, "planant", pas autant de niveaux que du goa.

Commentaires appréciés, bien sur. Pub-copinage aussi.

Lien vers la page (c'est la dernière): http://www.micheldonais.com/mes-chansons/#20061118

Speedbandits

Catégorie: English blog — Michel @ 7:11 am

That's something to say the least.

http://speedbandits.dk/

That wouldn't work in here during winter, seriously…

(note: according to some this is not safe for work… what's wrong with that, that country doesn't seem to know, nor in here either… but elsewhere in North America, it seems to be)

November 25, 2006

Howto: Disable the PC speaker beep in Windows

Catégorie: OS Tricks — Michel @ 7:01 pm

I hate sounds. I hate with a passion Windows sounds, in fact. Mac sounds, I can live with, there are really only a few events that trigger a sound, so it's not really a gigantic problem. But on Windows, they seemed compelled to fill in all the available sound positions with something, be it opening a window, a menu, geez, if they thought it would be ok, they would've put a sound whenever you move your mouse.

It's fun in the user interface to be able to put sounds wherever you can, that's cool. To have the ability is cool. To know you can have a different sound for two gazillion events is cool.

But I don't want sounds to bother me.

In other words, I listen to music, I don't listen to user interface.

Last thing I want is to be working, to be listening to some very relax classical music and to hear a very loud "BUD!" from a croaking frog on a stupid screen saver (metaphysical example of course, I don't even use screen savers, it goes directly to energy saver for me thank you).

So I remove all the sounds. I go to Control Panel, then select the "No sounds" scheme, say no to my modified theme (oh the humanity, no I don't want to save that) and that's it.

Only problem is once in a while, I get a PC speaker beep. In other words, I am working, and I receive a mail in Thunderbird and it gets greeted with a BEEP! that not only gets transmitted to my headphones to the maximal possible volume, but that everyone in the whole room (the whole city I'd say by the volume) just jumps.

What the?! When I say I want no sounds, it's not to have it reappear with something even more annoying and loud. Oh no. That's very improper design, Microsoft folks.

At first, I tried to disable it completely, I went to device manager, I tried looking for options, I tried doing whatever I could. To no avail. The PC Speaker is there to stay. Then, I found the problem. The problem is Windows, in its very intelligent way, decides that if you don't have a default sound, it have to find a way to get your attention, so instead of showing some alert, flashing the menu bar like on Mac, or I don't know what, they System Beep.

Hence the tip: In my sound scheme, I use No Sounds. Then, I scroll down a few pages of events until the last one of the first section, and it's aptly named "Default sound". And because there's nothing there, Windows fills in the blank. So I put something there. You could find an empty sound, I could provide one right here, no sweat. But you can choose "Windows XP Start Menu" in the sound bank and it's very close to being "nothing". Totally non-aggressive. And once that is done, no more PC Speaker beep.

Mon bureau Zune

Catégorie: Carnets francophiles — Michel @ 4:24 pm

Ce n'est pas parce que je trouve risible l'idée de la Zune que je n'ai pas téléchargé le thème XP pour ce dernier.

Sérieusement, le thème est super, sauf pour le brun. Ils ont mis la même couleur dans Vista et je trouve ça idiot, c'est une mode qui va bien durer un gros 5 minutes. Voici mon bureau, pour ceux que ça intéresse (et non je n'ai pas gardé ni les sons - tous désactivés hormis le bip par défaut - ni le super fond d'écran cheesy):

[Bureau avec thème Zune]

Le retour de Blink

Catégorie: Carnets francophiles — Michel @ 12:30 pm

Ah non!

Les sites commencent à revenir dans les premières erreurs des premiers moments dudit Web 1.0.

Ça fait quelques jours que je vois une recrudescence des bannières qui flashent noir et blanc, sans compter les pop-ups, les pop-unders … et toutes ces belles créations. Manque juste le retour des consoles et on va avoir la totale.

Putain, il me semblait que c'était enterré et oublié pour le mieux. Non seulement je ferme les pages qui contiennent ces bannières encore plus vite que les sites qui font jouer de la musique poche dès qu'on y met les pieds, mais en plus, je n'y met plus jamais les pieds. Je peux pas croire que ce soit bon pour ce qu'ils annoncent de donner des crises épileptiques aux gens.

November 24, 2006

Ouaouw! La version 3!

Catégorie: Carnets francophiles — Michel @ 12:53 pm

Je m'appelle Michel 3.0 ! Ouah, je pensais pas que j'étais si évolué.

D'ailleurs ça veut tu dire que je suis vieux ou que je suis jeune? Les 2 sont possibles je crois. Faudrait faire de la rhétorique sur le sujet.

(Mise à jour: corrigé le apelle … grrr … quelle belle faute!)

Ok, laulle…

Catégorie: Carnets francophiles — Michel @ 1:55 am

Ça m'a pris du temps à comprendre.

Pour me sauver un clavier, je me connecte d'un mini à l'autre via VNC. Pratique, efficace, adéquat, rapide, surtout en réseau local.

Alors il y a quelques heures, je bouge ma souris, l'économiseur d'écran disparaît, ah je suis sous VNC. Je vais donc chercher mes courriels, et veut sortir de VNC. Je fais donc Commande-P. La souris devient erratique, mais la fenêtre de fermeture n'apparait pas.

Ah… Bug dans VNC peut-être. J'appuie sur retour … et là, je me retrouve avec une souris qui sautille un peu, et une inabilité de me rendre en haut de l'écran à la barre de menus. Bizarre… Bon. Ok, VNC est vraiment planté. Commande-contrôle-échappement (cmd-ctrl-esc ;) ), en me jurant d'envoyer le bug à Cotv. Eh be … la fenêtre n'apparait pas…. Weiiiiird … Ils ont jusqu'à fait ça comme implantation? Okéééé …

J'essaie différentes subtilités, rien n'y fait. Bon, ok, aux grands mots. Je met le mini (serveur) en veilleuse, l'écran devient noir … Bon … … … mais l'interface n'apparait pas. Il est réellement planté, bordel! Peut-être si je met les 2 machines en veilleuse … et les redémarre… L'interface apparait, mais toujours pas de sortie de VNC.

Et pourtant, tout réagit comme si j'étais en VNC, il est ou le problème? Alors là, tanné. Quand ça veut pas, ça veut pas. Je ferme le mini du client … et mon écran reste ouvert avec le stock encore! C'est là que ça a flashé. Oui mon interface souris et clavier passaient par VNC… mais j'avais sélectionné l'écran du serveur directement pour pouvoir voir un vidéo en plus que 2fps.

D'oh!

» Dans le passé »

Engin: WordPress - Modèle créé par Michel Donais.

Contrat Creative Commons
Cette création est mise à disposition sous un contrat Creative Commons.