PDA

View Full Version : OpenGl in Visual Basic ?



10-03-2003, 11:16 AM
Hi,

Im very new tho OpenGL and so i don't know how to do this.. I have a simple graphic (2d) that constists of a few lines and 2 circles. Is it possiple that I kan draw this lines and circles via OpenGL? So that they look smoother?

Would this be very complicated and would the performance be better or more bad?

I don't need lights or something, just the lines and the circles.

Thank you very much in advance,
best regards,
Andi

PS: Please excuse my bad english

marcus256
10-05-2003, 09:00 PM
Well, basically you can gett antialiased lines from OpenGL, and my guess is that it would be faster with OpenGL (typically, the OpenGL pipeline can run asyncronously with your program, while direct framebuffer access requires writing/reading non-cached memory).

If you are satisfied with a separate OpenGL-only window, you can look into GLFW (http://hem.passagen.se/opengl/glfw) . Otherwise, there are some tutorials on the net that show how to set up an OpenGL rendering context in a VB-native way.

BTW, there is no core OpenGL function for drawing a circle, but it is not difficult to make your own routine that draws a circle with several connected lines.