Problem displaying point sprites

Posts: 5
Joined: 2010.02
Post: #1
I'm trying to write a simple particle system, and I'm trying to use point sprites to represent each particle for performance sake. However, I must be missing something when trying to draw my point sprites, because I can't get them to show up on screen. I can verify that they are being updated correctly because if I copy the data into individual triangle strips and draw that, the particles display correctly. I store the particles in the following struct and am attempting to use the following drawing code, with no success:

//A Vector3D is an x,y,z position using three floats
//A Color3D is an RGBA color using four floats
typedef struct
    Color3D color;
    float energy;
    Vector3D position;
    Vector3D velocity;
    float scale;
} Particle;

        glBindTexture(GL_TEXTURE_2D, 6);
    glVertexPointer(3, GL_FLOAT, sizeof(Particle), &particles[0].position);
    glColorPointer(4, GL_FLOAT, sizeof(Particle), &particles[0].color);
        glPointSizePointerOES(GL_FLOAT, sizeof(Particle), &particles[0].scale);
        glDrawArrays(GL_POINTS, 0, arraylength);
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  UIView Subclass not displaying controls... flipflop 7 9,114 May 13, 2010 01:16 PM
Last Post: flipflop
  conditionally displaying interface elements aerospaceman 2 3,652 Jun 25, 2009 12:20 PM
Last Post: aerospaceman
  Point sprites and alpha blending issue OptimisticMonkey 4 6,277 Jun 18, 2009 03:25 PM
Last Post: ThemsAllTook
  OpenGL ES (displaying model) green_ghost 2 3,925 Oct 14, 2008 07:10 AM
Last Post: codetiger