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):
    glLoadIdentity()

    ## 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
    glEnableClientState(GL_VERTEX_ARRAY)
    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

glBegin(GL_QUADS)
...
glEnd()

it works perfectly fine

Be a part of the DaniWeb community

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