I am developing an OpenGL application (mostly 2D Ortho) compiled in gcc.
As a requirement, in order to offer remote online tech support for the application, I need to be able to view and control this application remotely from time to time using something like VNC viewer.
I tried using vnc with the application but found it impossible to work with. In my first experiment, I was able to view the remote computer but it was absolutely impossible to use because the vnc server was sending random blocks of random snapshots of various stages of frame redraw, so you would see blocks of objects that are supposed to be hidden by other objects, or blackness from the initial clear screen command, and other strange things. Yet on the vnc server monitor, everything looks fine.
I also used TightVNC on a windows computer and got different results. In that case, It showed the program correctly, but it would not redraw any further unless I moved the window on the vnc server. So I would have to click something, move the window, click something else, move the window.. etc. That won't work because the target computer will be in full screen mode and that still wont cut it.
I would like to add that I am also using the SDL library for keyboard/mouse and a few other facilities.
This is a very simplified piece of my main loop drawing code:
for (;1;) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Draw();
SDL_GL_SwapBuffers( );
}
I'm guessing that maybe I need to send a message to linux telling it that the screen has redrawn right after the SwapBuffers function. If so, I don't know what that function is or how to go about it.
Or is what I am doing correct? Maybe it is a setting in VNC server that I need to change. Maybe VNC server is the wrong program to use for this.
Thanks in advance for your help guys.