Historique des modifications - Message

Message #8580

Sujet: ogl camera


Type Date Auteur Contenu
Correction acceptée 23-08-2010 19:06:27 Zorian
Texte original:
gluOrtho2D = gluOrtho avec near = 0.f, far = 1.f wink

edit: c'est j'est trouver pour passer en 2d sans affecter le rendu 3d

Code c++ :


        void draw::switchTo2D()
        {
            glMatrixMode(GL_PROJECTION);
            glPushMatrix();
            glLoadIdentity();
            glOrtho(0, src->getInfo().size.width, src->getInfo().size.height, 0, -1.f, 10.f);
            glMatrixMode(GL_MODELVIEW);
            glPushMatrix();
            glLoadIdentity();
        }
        void draw::endFrom2D()
        {
            glMatrixMode(GL_PROJECTION);
            glPopMatrix();
            glMatrixMode(GL_MODELVIEW);
            glPopMatrix();
        }

que j'apelle dans chaque fonction feusans référence a la 2D
source: http://www.dreamincode.net/forums/topic/143149-opengl-hud/
Correction proposée:
gluOrtho2D = gluOrtho avec near = 0.f, far = 1.f wink

edit: j'ai trouvé pour passer en 2d sans affecter le rendu 3d

Code c++ :


        void draw::switchTo2D()
        {
            glMatrixMode(GL_PROJECTION);
            glPushMatrix();
            glLoadIdentity();
            glOrtho(0, src->getInfo().size.width, src->getInfo().size.height, 0, -1.f, 10.f);
            glMatrixMode(GL_MODELVIEW);
            glPushMatrix();
            glLoadIdentity();
        }
        void draw::endFrom2D()
        {
            glMatrixMode(GL_PROJECTION);
            glPopMatrix();
            glMatrixMode(GL_MODELVIEW);
            glPopMatrix();
        }

que j'appelle dans chaque fonction faisant référence a la 2D
source: http://www.dreamincode.net/forums/topic/143149-opengl-hud/
Dernière modification 23-08-2010 12:59:53 Magun
gluOrtho2D = gluOrtho avec near = 0.f, far = 1.f wink

edit: j'ai trouvé pour passer en 2d sans affecter le rendu 3d

Code c++ :


        void draw::switchTo2D()
        {
            glMatrixMode(GL_PROJECTION);
            glPushMatrix();
            glLoadIdentity();
            glOrtho(0, src->getInfo().size.width, src->getInfo().size.height, 0, -1.f, 10.f);
            glMatrixMode(GL_MODELVIEW);
            glPushMatrix();
            glLoadIdentity();
        }
        void draw::endFrom2D()
        {
            glMatrixMode(GL_PROJECTION);
            glPopMatrix();
            glMatrixMode(GL_MODELVIEW);
            glPopMatrix();
        }

que j'appelle dans chaque fonction faisant référence a la 2D
source: http://www.dreamincode.net/forums/topic/143149-opengl-hud/
Création du message 23-08-2010 11:47:02 Magun
gluOrtho2D = gluOrtho avec near = 0.f, far = 1.f wink

edit: j'ai trouvé pour passer en 2d sans affecter le rendu 3d

Code c++ :


        void draw::switchTo2D()
        {
            glMatrixMode(GL_PROJECTION);
            glPushMatrix();
            glLoadIdentity();
            glOrtho(0, src->getInfo().size.width, src->getInfo().size.height, 0, -1.f, 10.f);
            glMatrixMode(GL_MODELVIEW);
            glPushMatrix();
            glLoadIdentity();
        }
        void draw::endFrom2D()
        {
            glMatrixMode(GL_PROJECTION);
            glPopMatrix();
            glMatrixMode(GL_MODELVIEW);
            glPopMatrix();
        }

que j'appelle dans chaque fonction faisant référence a la 2D
source: http://www.dreamincode.net/forums/topic/143149-opengl-hud/

Retour

Options Liens officiels Caractéristiques Statistiques Communauté
Préférences cookies
Corrections
irrlicht
irrklang
irredit
irrxml
Propulsé par Django
xhtml 1.0
css 2.1
884 membres
1440 sujets
11337 messages
Dernier membre inscrit: Saidov17
151 invités en ligne
membre en ligne: -
RSS Feed