OpenGL Particles

This is a discussion on OpenGL Particles within the Game Programming forums, part of the General Programming Boards category; I'm learning OpenGL now. My question is, I use display lists to draw objects and other complex stuff. But for ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    648

    OpenGL Particles

    I'm learning OpenGL now. My question is, I use display lists to draw objects and other complex stuff. But for particles, since I can't alter a display list after its compiled, I have to make a square at every particle. And when there are 800+ particles, doesn't that slow it down? All those function calls to draw each individual vertex and texture info, color info, etc, for the square? Isn't there a way where I can make an array of verticies (structs) like I do in DirectX Graphics and just change the color directly and draw the particle?

  2. #2
    *******argv[] - hu? darksaidin's Avatar
    Join Date
    Jul 2003
    Posts
    314

    Re: OpenGL Particles

    Originally posted by Speedy5
    And when there are 800+ particles, doesn't that slow it down? All those function calls to draw each individual vertex and texture info, color info, etc, for the square? Isn't there a way where I can make an array of verticies (structs) like I do in DirectX Graphics and just change the color directly and draw the particle?
    You can use a display list for one single particle (2 triangles) and call glTranslate before you call that list. If your particle has a texture that does not change, you can even bind the texture in the list, I believe.
    [code]

    your code here....

    [/code]

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    648
    Hmm, thats a great idea thanks! How come I never thought of that? And there I was using display lists for the other things .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 11:17 AM
  2. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM
  3. proper way to render particles (OpenGL)
    By ... in forum Game Programming
    Replies: 2
    Last Post: 03-29-2004, 10:45 PM
  4. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21