Click here to Skip to main content
16,021,417 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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:
VB
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

1 solution

I think the glBegin(GL_POLYGON) is wrong. Change it into glBegin(GL_TRIANGLES)
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900