Advertisement

Realtime in OpenGL

Started by December 10, 2003 04:05 AM
3 comments, last by chrispi 21 years, 2 months ago
Hello, I am a newbie in using OpenGL. I have the following problem. I have created a simple static arrow in C using OpenGL. Now I have an algorithm in another program, where I calculate a new direction of the arrow for example one time a second. In this loop I want to say my OpenGL program, that it shall use the paramters of the arrow and draw the arrow new. I guess, I have to initialize my OpenGL program first and then I open a function of the OpenGL program in the loop. Is it right. Has anybody an idea how to realize this? Perhaps anybody had already a similar problem and has a sample program for me. I would be glad to get answers. Thank''s Christoph
You should go through NeHe''s OpenGL tutorials. Read them comprehensively and you should quickly understand how to do what you want.
Advertisement
I guess I don''t understand it very well...
If you want to use two **distinct** programs, then you''ll need some sort of IPC and everything is starting to be very hard.

If you''ll do it everything in a single program then you will have and easy way and there''s a lot of code samples floating on the net.

Previously "Krohm"

Hello Krohm,
thanks for your reply. The Problem is, that I have a ready program to calculate figures in 3d and save the results. Now I want have the possibility to visualize the results in realtime. So I guess I have to initialize my visualization at the start of my calculation and then to redraw my frame in a loop.

But I don''t have an idea how to connect the visualization to my calculation. If you have an example where sth. like this is done, please let me know.

Thanks a lot,

Christoph
I''d say something like:

int main(){    do_the_calculation_of_the_objects();    do_the_rendering();    return 0;}


Where those two functions are cut and pasted from your two respective programs. If you don''t have access to the source of one of the programs, or if you need one program to work exactly as it does now (as a web service, as a thread in a 68k emulator, whatever), you''ll need some IPC, and a great deal of time to work on it.

This topic is closed to new replies.

Advertisement