Click here to Skip to main content
12,690,904 members (33,592 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB
I would like to Develop OpenGL Applications with VB. I used to do it with C++WinApi Programming. The Problem with using it with VB is: How will i insert an OpenGL view port in VB. I used Tao to Make a View port. I initialized its Contexts. Everything was fine Except the Output Was Terrifically Ridiculous.
for Eg: if I give a simple code:
                   glClearColor(0.0, 0.0, 0.0, 0.0)
                   glClear(GL_COLOR_BUFFER_BIT)
                   glColor3f(1.0, 1.0, 1.0)
                   glOrtho(−1.0, 1.0, −1.0, 1.0, −1.0, 1.0)
                   glBegin(GL_POLYGON)
                   glVertex2f(−0.5, −0.5)
                   glVertex2f(−0.5, 0.5)
                   glVertex2f(0.5, 0.5)
                   glVertex2f(0.5, −0.5)
                   glEnd()
                   glFlush()

the normal output must be like a White Rectangle, the output is like some Deformed Polygon.
I know Tao is Usually used with C#.What will I do with VB. thanks IN advance!!
Posted 28-Sep-12 20:25pm

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

I think the glBegin(GL_POLYGON) is wrong. Change it into glBegin(GL_TRIANGLES)
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170117.1 | Last Updated 29 May 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100