Historique des modifications - Message

Message #8580

Sujet: ogl camera


TypeDateAuteurContenu
Correction acceptée23-08-2010 19:06:27Zorian
Texte original:
gluOrtho2D = gluOrtho avec near = 0.f, far = 1.fwink

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.fwink

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 modification23-08-2010 12:59:53Magun
gluOrtho2D = gluOrtho avec near = 0.f, far = 1.fwink

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 message23-08-2010 11:47:02Magun
gluOrtho2D = gluOrtho avec near = 0.f, far = 1.fwink

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

OptionsLiens officielsCaractéristiquesStatistiquesCommunauté
Préférences cookies
Corrections
irrlicht
irrklang
irredit
irrxml
Propulsé par Django
xhtml 1.0
css 2.1
884 membres
1441 sujets
11339 messages
Dernier membre inscrit: Saidov17
68 invités en ligne
membre en ligne: -
RSS Feed