Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

tj963

OpenGL Raytracing and OpenGL

This topic is 5645 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

Hi, I''m trying to add some raytraced elements into OpenGL but I can''t get it to work and run at a decent speed. It''s not the raytracing that is slow, since it''s not actually being done yet. I''ve though of doing it with quads (interpolating a smaller number of rays) and points but at a decent resolution of rays, it''s too much drawing. My other attemp was glDrawPixels but I can''t figure that out at all. All I get is garbage on the screen. Does anybody know either a better way of drawing, or could explain how to use glDrawPixels? Thanks, tj963

Share this post


Link to post
Share on other sites
Advertisement
MSDN says>

The glDrawPixels function writes a block of pixels to the frame buffer.

void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);

And its f****** slow !
So it''s not of use for your raytracing. The quads, or triangle strips are the best, you can get. You can also put points
using glBegin(GL_POINTS); but you have to do it for fixed resolution. And that''s why quads are better.

Share this post


Link to post
Share on other sites
you should use quad strips/triangle strips with vertex arrays & index arrays and maybe some specific gl extension like VAR(vertex array range)

Share this post


Link to post
Share on other sites

  • 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!