this the code in python since im using pyopengl. when i run it simpky hangs and only the top bar is visible. Other programs are working fine, which means there is no problem with the library and OS. Here is the code
try:
from OpenGL.GLUT import *
from OpenGL.GL import *
from OpenGL.GLU import *
except: print '''ERROR: PyOpenGL not installed properly.'''
import sys
def init():
glEnable(GL_TEXTURE_2D)
glClearColor(0.0, 0.0, 0.0, 0.0)
glClearDepth(1.0)
glDepthFunc(GL_LESS)
glEnable(GL_DEPTH_TEST)
glShadeModel(GL_SMOOTH)
glMatrixMode(GL_PROJECTION)
glClear(GL_COLOR_BUFFER_BIT)
glLoadIdentity()
glColor3d(0,0,1)
def main():
glutInit(sys.argv)
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB)
glutInitWindowSize (640,480)
glutInitWindowPosition (0,0)
window=glutCreateWindow ("Solar")
glutIdleFunc(mydisplay)
glutDisplayFunc(mydisplay)
glutKeyboardFunc(mydisplay)
glutKeyboardFunc(mydisplay)
init()
glutMainLoop()
exit()
def mydisplay():
glBegin(GL_POINTS)
glVertex2i(10,20)
glEnd()
main()