I'm trying to write a simple particle system
I use Python ,OpenGL and numpy libraries (on win7)
this is the code I use to draw a single particle

def draw(self, mode):

    ## convert normal point to opengl point
    trns = self.__trans_to_opengl(self.trans) 
    glTranslatef(trns[0], -trns[1], 0.0)

    ## this is the vertex array using numpy
    points = self.points 
    indices = np.arange(len(points))

    ## enable vertex array then draw the elements
    glVertexPointerf( points )
    glDrawElementsui(mode, indices)

the code above, draw the particles only
on part of the screen
I've uploaded an image to show you the problem
Click Here
so what could be the problem?

I forgot to mention that when I use


it works perfectly fine

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.