PDA

View Full Version : can somebody plzzzz help me with VB & OGL



mithun_daa
11-11-2003, 02:18 PM
im workin on a vb project and the toughtest time im havin is settin up the viewport. iv set it a few times n everytime i set it i get different results. im using the following code to set it up

Pic1.ScaleMode = vbPixels
intWidth = Abs(Pic1.ScaleWidth)
intHeight = Abs(Pic1.ScaleHeight)
glViewport 0, 0, intWidth, intHeight
glGetDoublev glgViewport, tempx(0)

pic1 is the picture box into which im tryin to render the scene.

does it make a difference on how VB sets the axis and how OGL does? cause with the above approach, the origin is at the top left corner. n i need my origin at the bottom left. i dont know if the VB origin makes a difference when im rendering.
if neone knowz ne linkz to some good tutorials on settin viewports using OGL in VB plz do the needful
thank u

soconne
11-11-2003, 02:28 PM
Try http://nehe.gamedev.net, almost all the OpenGL tutorials have Visual Basic source you can download and look at.