Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ECKILLER

OpenGL getting vertices in opengl after transformation

This topic is 6930 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am making a 3D map editor. The user has options to create a variety of 3D models and place them in the scene as he likes. When designing this i saw a potential problem. When the user does some transformations on the models and he sets things up in the scene how he likes, how do i get the models vertice points??? I need the vertice points after the transformations so that i can save them to file. Thanks. ECKILLER

Share this post


Link to post
Share on other sites
Advertisement
unfortunatley you cant get the transformed vertices from opengl. There are two ways around this one is the easy way, instead of saving the transformed vertices save the un transformed and then save the values for gltranslate and glrotate that way you have everything you need. The other way is to do the model to world coordinates transforms yourself and just use opengl to do the world to screen transform..

Share this post


Link to post
Share on other sites
fabel - oh yes you CAN get transformed vertices from OpenGL, in fact, it''s one of it''s more useful features for research.

Have a look at glFeedbackBuffer - it''ll tell you all you need to know. If you want projected coordinates, set up as usual, if you want rotations/translations only, you can set your perspective matrix to unity;
OpenGL provides almost every functionality you can think of as far as transformations and operations at a low level go.. I''m just waiting for decent 2D primitives ;-)


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**

Share this post


Link to post
Share on other sites
wow you learn something ne everyday =) I had been trying to figure out how you caould use opengl for everything but never looked close enough at the feedback buffer =) thanks for correcting me.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!