Help! Problem with an OpenGL view

Hey guys…ok I have this little problem.I’m making a terrain editor using MFC and one of my view is an OpenGL view.However,it’s not turning out properly.It’s kinda hard to explain in words so I’ve posted a link to my app.Included is the executable and the cpp source code that handles my OpenGL view.Keep resizing the OpenGL view (the one on the bottom right with the 2 triangles) and you’ll see what I mean.I’m not sure what it is I’m doing wrong.So can you guys please download it and take a look at the source code? I would REALLY appreciate it.Thanx!

Here’s the link:

It’s a 270KB download

(If the fortune city website tells you it doesn’t permit links to it’s files then just copy the link to your browser and open it there.)

[This message has been edited by TheGecko (edited 10-08-2000).]

Very strange. Your code looks right (it is identical to mine) so it should be working. The only theory I can offer is that maybe you are handing the wrong values of height and width to the resize function?

What specifically is wrong with the view? It looks fairly normal to me, although the flashing on resize is annoying and if I Alt-Tab away and then back to the app, it doesn’t repaint that view properly.

Matt Craighead

Keep resizing the view and you’ll see what I mean.The 2 triangles are supposed to be centerd at all times and the view should automatically scale itself properly but that’s not what’s happening here.

You’re not calling resize on the OnSize event, only on OnMove…? Could that be it?

  • Matt

You are a GODDAMN GENIUS!!! That worked just fine! thanx!