Jump to content
  • Advertisement
Sign in to follow this  
Martijnvdc

fast method to render array of pixels?

This topic is 3654 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I made a small ray tracer which returns an array of pixels. Then i render it to a .BMP. But now that i optimised it i would like to see it in realtime(simple scene at low resolution though). I did some tests with opengl by rendering pixels with glBegin(GL_POINTS), but this method seems very slow. I would like to know what you people think is the fastest method to render this array of pixels. Thank you :)

Share this post


Link to post
Share on other sites
Advertisement
You can create a texture and render a quad of this whole texture. Then you can change the pixels of the texture with the function glTexSubImage2d. Search for this function on google and you will find documentation on how to use it.

Share this post


Link to post
Share on other sites
glDrawArrays is the fastest non-extension function.
Depending on what extensions the video card supports there are faster ways.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!