Jump to content
  • Advertisement
Sign in to follow this  
cnboy0212

OpenGL need some suggestion on transformation

This topic is 2300 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

I am pretty new to graphics programming. Right now I am trying to make something that, after you transform a image and you can perform pixel perfect collision detection with it. It will be in 2D. I learned a little bit OpenGL, I know I can transform a texture in OpenGL by drawing it drawing it in a Quad with any random 4 vertexes, but I don't know how to make it usable with pixel perfect collision afterward. There will be around 20 to 50 imaging being transform each frame, and the program should run around 20-30 frames per second, so I don't think getting each pixel of every images and transform them into their new coordinate is a good idea. Can someone point me in the right direction on how to accomplish this?

Share this post


Link to post
Share on other sites
Advertisement
Just render your images, but update other texture for every pixel of those entities. If texture already contain info about drawed pixel of other entity, than update 2nd thexture.

After rendering just check if 2nd texture contain any data. If so check which objects where drawed to that pixel.

Though that is some neck breaking technique thought out on the go. :D Maybe you just need to stick to ready library for pixel perfect colisions ?

PS Update thread info about pixel perfoect colisions. Right now its not informative enough.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!