🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Problem about scaling GL window

Started by
0 comments, last by lc_overlord 15 years, 6 months ago
I modified the Lesson 5 (vB 6.0 code) to help me with my work. Simply i have added a mouseUp and mouseDown event. When mouseDown, x coordinate is recorded as xDown. When mouseUp it is recorded as xUp so dx = dx + xUp - xDown then i scale the window like ReSizeGLScene Me.ScaleWidth + dx, Me.ScaleHeight that is; Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) xDown = X End Sub Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) xUp = X dx = dx + xUp - xDown ReSizeGLScene Me.ScaleWidth + dx, Me.ScaleHeight End Sub but the screen is broken when dx is negative can anyone tell me what is the problem?
Advertisement
if you scale a scene in negative values the result would be that you might end up with polygons facing away from the camera because of a reversed winding order,
either don't do it or flip the culling from back to front facing polygons.

This topic is closed to new replies.

Advertisement