hello everyone:
I am trying to dray something in 3D Scene…using OpenGL commands. like:
import bpy
import bgl
bgl.glBegin(bgl.GL_TRIANGLE_FAN)
bgl.glColor3f(1.0,0.0,0.0)
bgl.glVertex3f( 0.0, 30.0, 0.0)
bgl.glColor3f(0.0,1.0,0.0)
bgl.glVertex3f(-50.0, -50.0, 50.0)
bgl.glColor3f(1.0,1.0,0.0)
bgl.glVertex3f( 50.0, -50.0, 50.0)
bgl.glColor3f(0.0,0.0,1.0)
bgl.glColor3f(1.0,1.0,1.0)
bgl.glVertex3f( -50.0, -50.0, -50.0)
bgl.glColor3f(0.0,1.0,0.0)
bgl.glVertex3f(-50.0, -50.0, 50.0)
bgl.glEnd()
Normally, it should draw a triangle in the 3D scene…but after running it, there’s nothing in the 3D scene…what is the problem? in order to draw something, what should we do?