Jump to content
  • Advertisement

OpenGL Particle (star) rendering not working.

Recommended Posts

Haven't read all, so this might already have been pointed out, but:

On 9/29/2019 at 7:52 AM, Sword7 said:

glEnable(GL_PROGRAM_POINT_SIZE); glPointSize(1.0);

This looks wrong according to this.

Share this post

Link to post
Share on other sites
35 minutes ago, _Silence_ said:

Haven't read all, so this might already have been pointed out, but:

This looks wrong according to this.

I already removed glPointSize(1.0) because it is for fixed point size. That is not needed anymore since gl_PointSize is now handled inside shader programs for varying point size. 

1 hour ago, Green_Baron said:

I suspect (but am not sure) that the problem lies elsewhere and may still pop up some time.

In principle, one can create a vertex array and define its vertex attributes before any vertex or element buffer exists and separately from them. When drawing, the array must have a buffer bound to feed the pipeline with data. But the array description and the actual buffer are, to my understanding, separate things. One can leave an array bound (so that the description of the data that is fed into the pipeline stays the same) and switch the buffers associated with that array (Edit: i think that was nonsense; buffers are bound to a target, they are not "associated with an array"). So that for example one buffer is filled by the application while another one is being drawn from. The fact that there is a 1 to 1 relation in all the tutorials between array and buffer is just coincidence. One can even draw without an array and only a vertex buffer bound. It'll be drawn in the order the vertex data comes.

See here for example.

It might be good to keep an eye on it 👁️

Oh! I looked my earlier posts and finally realized that I placed them in constructor instead because other init routine messed up my buffer descriptions! I already fixed it by moving them to by glDrawArrays in render routines. 

I am now working on earth orbits around sun. 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!