PDA

View Full Version : opengl in vb



11-03-2000, 07:22 PM
I was messing around with this tonight, and was wondering, is it possible to render onto a picturebox? It didn't seem to like to. I have it on a form ok. (thanks to somebody elses code) If it's possible, is there anything special you have to do?

gumby
11-03-2000, 09:25 PM
nm, I figured it out

edotorpedo
11-05-2000, 01:39 AM
Yes, of course it can be done,

When you are setting up your opengl-stuff, just pass on the hDc from the picture-box in stead of your forms' hdc. Also you need to make sure that your scalemode is vbPixels. Some opengl-vb code with this in it can be downloaded from my site home.conceptsfa.nl/~fredo
from the download-section.

Hope this helps

Edo

11-08-2000, 08:28 AM
>, and was wondering, is it possible to render onto a picturebox? It didn't seem to like to. I have it on a form ok. (thanks to somebody elses code)

I use an OpenGL VB control from the OpenGL Super Bible .The author also has a site where you can download the control for free.The control supplies you automatically with an OpenGL rendering window which will accept all opengl and most glut commands.If you program in VB I think it's the most efficient way to see what your renderings will look like.