Guest User

Untitled

a guest
Apr 20th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. glViewport(0, 0, (GLsizei)Camera::getWindowWidth(), (GLsizei)Camera::getWindowHeight());
  2.  
  3. m_shaderParticles->bind();
  4.  
  5. glBindFramebuffer(GL_FRAMEBUFFER, m_fbo_particles);
  6. glDrawBuffer(GL_COLOR_ATTACHMENT0);
  7.  
  8.  
  9. GLuint positionLoc = m_shaderParticles->get_attrib_location("in_position");
  10. glEnableVertexAttribArray(positionLoc);
  11. glVertexAttribPointer(positionLoc, 3, GL_FLOAT, GL_FALSE, 0, 0);
  12.  
  13. glDrawArrays(GL_TRIANGLES, 0, 3);
  14.  
  15. glBindVertexArray(0);
  16.  
  17.  
  18. glBindFramebuffer(GL_FRAMEBUFFER, 0);
Add Comment
Please, Sign In to add comment