0

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?

1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by ido098
0

I forgot to mention that when I use

glBegin(GL_QUADS)
...
glEnd()

it works perfectly fine

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.