Jump to content
  • Advertisement
Sign in to follow this  

OpenGL how can we make super fast real-time calculation processing in OpenGL?

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

Actually I just want to know that what is the best method to make real-time processing in OpenGL? I am not talking about real-time rendering of triangles or any geometric rendering.

for example, I have some processes (i.e. some long time mathematical calculation), and I need to put in the real-time rendering so what is the best method in OpenGL to do this kind of thing.

what I am doing now is

void Display() // display function of openGL




so do you think this is the only way to do real-time processes?
which one is fast?
glutIdleFunc(); the idle function of openGL or display() function ?

If you have any suggestion kindly guide me.


Share this post

Link to post
Share on other sites
Off the top of my head, based off the info given, and with the assumption that it's not 100% imperative that the [color="#1C2837"]some_lengthy_mathematic_calculation();[color="#1C2837"] finish before every single frame is rendered (IE: it can afford to skip a few frames), the obvious answer would be to push it off into its own thread and then sync up the results for the next frame. You would, of course, need to add a check to see if it's currently calculating and skip it if it is.

[color="#1C2837"]If it has to finish for every frame...I don't know the answer.
[color="#1C2837"]EDIT: Or, have a deeper look at your [color="#1C2837"]some_lengthy_mathematic_calculation(); and see if you can split its calculations up across multiple cores, providing the user has them.

Share this post

Link to post
Share on other sites
OpenCL : Compute language, which is for running whatever code on the GPU.

Or transform feedback in GL for getting back results in a VBO.

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.

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!