On Jun 20, 2:21 pm, Claudio Canepa <[email protected]> wrote:
> On Jun 19, 11:25 am, jaber <[email protected]> wrote:
>
>
>
> > How do i make a HUD with cocos2d?
>
> > I made a game which use opengl transform for the camera to follow the
> > player sprite.
>
> > To draw a HUD, I tried using the common way:
> > 1.set matrix mode GL_PROJECTION
> > 2.push the matrix
> > 3.set the orthographic projection with glOrtho or gluOrtho2D
> > 4.draw HUD (texts, sprites)
> > 5.pop the projection matrix to get back to normal perspective
> > projection
> > 6.draw game sprites normally.
>
> > On pyglet, it seems okay,
> > But I messed up cocos2d's opengl transform/projection by the same way.
>
> You can see a simple scrolling world plus HUD in
> hud2.py,http://cocos-discuss.googlegroups.com/web/hud2.py
> Note that it can display wrong with cocos 0.3.0 release; the SVN
> version 863 works ok.
>
> hth
> Claudio
Thanks but,
How do I zoom in/out the layer?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" 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/cocos-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---