Ok, I've got it. I'll explain the trick in case someone encounters the same problem :
1. I had to call gluOrtho2D with scale = sc1 (sc1 depends on the zoom) and then call gluLookAt with x,y 2. draw the map 3. call gluOrtho2D with a fix scale sc2 (does not depend on the zoom) 4 call gluLookAt again with coords = x*(sc2/sc1) , y*(sc2/sc1) , instead of x,y 5. draw the pictures and the labels. Now, when I zoom in and out, the map is scaled but the labels keep the same size ;) Rayene, On Sat, Feb 7, 2009 at 1:56 PM, Rayene Ben Rayana < [email protected]> wrote: > Hi, > > I am developing a world map application based on pyglet (a sort of google > maps). > I'm using gluOrtho2D and gluLookAt for zooming and it works perfectly. > The map images get automagically scaled down and get closer each time I > zoom out. > > Now I want to add an extra layer on top of it. > I want to associate text labels and pictures to some locations on the map. > > These images and these labels should not be scaled down each time I zoom > out, > they should just get closer to each other. > > Is there a way to do this easily and efficiently with pyglet/opengl (I > think of some matrix transformation). > Or do I need to re scale them manually each time I zoom in /out ? > > Thanks in advance, > > Rayene, > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
