• ### What is your GameDev Story?

#### Archived

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

# I've got a problem

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

## 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 on other sites
It doesn''t set your res back becuase it has an error and doen''t reach that part

##### 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 on other sites
thanks a bundle boys. Until next time.

The Kid

I don''''t know what the future holds, but I know who holds the future.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 10
• 11
• 13
• 9
• 11
• ### Forum Statistics

• Total Topics
634092
• Total Posts
3015447
×