Jump to content
  • Advertisement


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

I've got a problem

This topic is 6340 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 writing a program in openGL, and using NeHe''s base code. For some reason, when I run the compiled .exe file, when I quit, it doesn''t set my resolution back to what it was before I started the program. It didn''t used to do that, but it does now. Does anyone know what I could have goofed up ? Thanks a bunch. Also, does anyone know how to calculate the angle of a quad/tri in relation to another one ? Like the angle that they intersect or meet at ? That could be extremely helpful. The Kid I don''''t know what the future holds, but I know who holds the future.

Share this post

Link to post
Share on other sites
use your debugger/print statements to figure out exaclty where the program hangs.

for angle between quad/tri, find the normals for both the objects.

if normals are N1(x1,y1,z1) N2(x2,y2,z2) you can find angle between them using dot product

N1.N2 = |N1||N2|cos(theta)

N1.N2 works out to x1*x2 + y1*y2 + z1*z2
|N1| is sqrt(x1^2 + y1^2 + z^2)

do a cos inverse and then find angle theta!

i dun know if theres a simpler way

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!