Jump to content

  • Log In with Google      Sign In   
  • Create Account


Several Graphics in single window


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Sh@dow   Members   -  Reputation: 100

Like
0Likes
Like

Posted 19 March 2011 - 02:34 PM

Hi, everyone
I need to plot different types of graphics in one window. I'm using C++ language on Win platform.
My problem is that i can't correctly imagine a whole program architecture.
I have several objects each one draws the specific types of graph(signal, 2d matrix). These objects expect device context as a parameter. But if i have only one window that means i have only one device context. As i understand the device context could not be divided into areas to draw separately into them. I can draw into the whole device context at one time. That's a problem to me because i can't redraw graphics independently.Imagine we have two graphics. When new data comes for graph1 i want to redraw it (not the entire window area and other graph2) so i can't do that.Or maybe i can?:D Is there any way to redraw only part of the window.Some kind of incremental drawing?

Sponsor:

#2 V-man   Members   -  Reputation: 805

Like
0Likes
Like

Posted 20 March 2011 - 08:23 AM

I recommend that you redraw the entire window.

y into them. I can draw into the whole device context at one time. That's a problem to me because i can't redraw graphics independently.Imagine we have two graphics. When new data comes for graph1 i want to redraw it (not the entire window area and other graph2)


Why? Video cards are pretty fast these days.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS