Sign in to follow this  
Martijnvdc

fast method to render array of pixels?

Recommended Posts

Martijnvdc    122
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
Erik Rufelt    5901
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

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

Sign in to follow this