|
|
Thank you for the reply DEJAN Actually I need guidence with FLUID on Linux. --------------------------------------------------------------------------- 1 ) Already installed FLUID in Linux Fedora core - 4. ( switching from MS Visual Studio/ Fluid ) 2 ) I am able to create Windows & Widgets in Fluid Editor. 3 )&nb
sp; Saved .FL file , .cxx file , .h file.
4 ) HOW TO BUILD, COMPILE & RUN in LINUX ? --------------------------------------------------------------------------- In what way ECLIPSE can associate with FLUID ? --------------------------------------------------------------------------- My interest in FLUID only. I hope the above will make clear. Regards Uthaman
fltk-opengl-request-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org wrote: Send fltk-opengl mailing list submissions to fltk-opengl-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.easysw.com/mailman/listinfo/fltk-opengl or, via email, send a message with subject or body 'help'
to fltk-opengl-request-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org
You can reach the person managing the list
at fltk-opengl-owner-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of fltk-opengl digest..."
Today's Topics:
1. Re: Developing FLTK applications in Eclipse-LINUX (Dejan Lekic) 2. Re: Re: How to draw ???fixed??? text in OpenGL windows (Simon) 3. Re: Re: How to draw ???fixed??? text in OpenGL windows (Shai Ayal) 4. Re: Re: [fltk.opengl] Re: How to draw ???fixed??? text in OpenGL windows (Linda) 5. Re: Re: [fltk.opengl] Re: How to draw ???fixed??? text in OpenGL windows (Shai Ayal)
----------------------------------------------------------------------
Message: 1 Date: Thu, 02 Mar 2006 12:37:49 -0500 From: Dejan Lekic Subject: Re: [fltk.opengl] Developing FLTK applications in Eclipse-LINUX To: fltk-opengl-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org Message-ID: <929-fltk
.opengl-+FT6Wyec2gCDR8wcTNDzOQ@public.gmane.org> Content-Type: text/plain; charset=us-ascii
I must admit I do
not understand Your mail... My tutorial is actually covering Eclipse on Linux, and it is pretty much straightforward. Do you actually need some guidence with FLUID?
-- ........... Dejan Lekic http://dejan.lekic.org
------------------------------
Message: 2 Date: Thu, 02 Mar 2006 18:42:01 +0100 From: Simon Subject: Re: [fltk.opengl] Re: How to draw ???fixed??? text in OpenGL windows To: "Mirror of fltk.opengl Newsgroup" Message-ID: Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1
simply switch to 2d drawing mode before drawing the text and then switch back to 3d afterwards
On Thu, 02 Mar 2006 09:38:25 +0100, Linda wrote:
> I searched the previous articles i
n the forum. Now I understant why the > text is transformed just like an object. My
question still remains. How > to draw the text specified in screen coordinates? Thanks for all helps. > > With best wishes, > > Linda > _______________________________________________ > fltk-opengl mailing list > fltk-opengl-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org > http://lists.easysw.com/mailman/listinfo/fltk-opengl >
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
------------------------------
Message: 3 Date: Thu, 2 Mar 2006 18:58:29 +0200 From: "Shai Ayal" Subject: Re: [fltk.opengl] Re: How to draw ???fixed??? text in OpenGL windows To: "Mirror of fltk.opengl Newsgroup" Message-ID: <420fb9e60603020858u529e64eblc4b224c064c1dd4b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> Content-Type: text/plain; charset=ISO-8859-1
Well,
either
display the text before you do the transformations, or calculate the transformed coords
corrsponding to the screen coords you want. for the, have a look at the gluUnProject function
Shai
On 3/2/06, Linda wrote: > I searched the previous articles in the forum. Now I understant why the text is transformed just like an object. My question still remains. How to draw the text specified in screen coordinates? Thanks for all helps. > > With best wishes, > > Linda > _______________________________________________ > fltk-opengl mailing list > fltk-opengl-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org > http://lists.easysw.com/mailman/listinfo/fltk-opengl >
------------------------------
Message: 4 Date: Thu, 02 Mar 2006 22:24:41 -0500 From: Linda Subject: Re: Re: [fltk.opengl] Re: How to draw ???fixed??? text in OpenGL windows To: fltk-opengl@ea
sysw.com Message-ID: <932-fltk.opengl-+FT6Wyec2gCDR8wcTNDzOQ@public.gmane.org>
Thank you Shai for your
advice. Below is my code. I unproject the screen coordinates to the world coordinates.
// x, y, z, and w=1 are object coordinates for the raster position void AnimationOpenGLwindow::drawText(const char* str, GLfloat x, GLfloat y, GLfloat z) { glRasterPos3f(x, y, z); gl_draw(str, strlen(str)); }
// x and y are screen coordinates void AnimationOpenGLwindow::drawText_screen(const char* str, int x, int y) { GLdouble modelviewMatrix[16], projMatrix[16]; GLint viewport[4]; GLdouble winx = x, winy = y, winz = 0.001; // unproject to the near plane winz = 0.0 GLdouble objx, objy, objz;
glGetDoublev(GL_MODELVIEW_MATRIX, modelviewMatrix); glGetDoublev(GL_PROJECTION_MATRIX, projMatrix); glGetIntegerv(GL_VIEWPORT, viewport);
gluUnProject(winx, winy, winz, modelviewMatrix, projMatrix, viewport, &objx, &objy, &objz);
drawText(str, objx, objy, objz); }
I wonder if there is a more effinceint way
to do the work.
Regards,
Linda
> Well, > > either display the text before you do the transformations, or > calculate the transformed coords corrsponding to the screen coords you > want. for the, have a look at the gluUnProject function > > Shai > > On 3/2/06, Linda wrote: > > I searched the previous articles in the forum. Now I understant why the t= > ext is transformed just like an object. My question still remains. How to d= > raw the text specified in screen coordinates? Thanks for all helps. > > > > With best wishes, > > > > Linda > > _______________________________________________ > > fltk-opengl mailing list > > fltk-opengl-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org > > http://lists.easysw.com/mailman/listinf
o/fltk-opengl > > >
------------------------------
Message:
5 Date: Fri, 3 Mar 2006 12:33:42 +0200 From: "Shai Ayal" Subject: Re: Re: [fltk.opengl] Re: How to draw ???fixed??? text in OpenGL windows To: "Mirror of fltk.opengl Newsgroup" Message-ID: <420fb9e60603030233h54097c2bqee35695a157cc54d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> Content-Type: text/plain; charset=ISO-8859-1
You can do it more efficiently if you use some prior knowledge on how simple your projections are. gluUnproject works for the general case. However lets say all your transformations were translations only, than it would be easy for you to "untranslate" the coordinates without calling gluUnproject at all and saving a lot of matrix math.
Shai
On 3/3/06, Linda wrote: > Thank you Shai for your advice. Below is my code. I unproject the screen coordinates to
the world coordinates. > > // x, y, z, and w=1 are object coordinates for the raster
position > void AnimationOpenGLwindow::drawText(const char* str, GLfloat x, GLfloat y, GLfloat z) > { > glRasterPos3f(x, y, z); > gl_draw(str, strlen(str)); > } > > > // x and y are screen coordinates > void AnimationOpenGLwindow::drawText_screen(const char* str, int x, int y) > { > GLdouble modelviewMatrix[16], projMatrix[16]; > GLint viewport[4]; > GLdouble winx = x, winy = y, winz = 0.001; // unproject to the near plane winz = 0.0 > GLdouble objx, objy, objz; > > glGetDoublev(GL_MODELVIEW_MATRIX, modelviewMatrix); > glGetDoublev(GL_PROJECTION_MATRIX, projMatrix); > glGetIntegerv(GL_VIEWPORT, viewport); > > gluUnProject(winx, winy, winz, modelviewMatrix, projMatrix, viewport, &objx, &objy, &objz); > > drawText(str, objx, objy, objz); > }
> > > I wonder if there is a more effinceint way to do the
work. > > > Regards, > > Linda > > > > > Well, > > > > either display the text before you do the transformations, or > > calculate the transformed coords corrsponding to the screen coords you > > want. for the, have a look at the gluUnProject function > > > > Shai > > > > On 3/2/06, Linda wrote: > > > I searched the previous articles in the forum. Now I understant why the t= > > ext is transformed just like an object. My question still remains. How to d= > > raw the text specified in screen coordinates? Thanks for all helps. > > > > > > With best wishes, > > > > > > Linda > > > _______________________________________________ > > >
fltk-opengl mailing list > > > fltk-opengl-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org > > >
http://lists.easysw.com/mailman/listinfo/fltk-opengl > > > > > > > _______________________________________________ > fltk-opengl mailing list > fltk-opengl-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org > http://lists.easysw.com/mailman/listinfo/fltk-opengl >
------------------------------
_______________________________________________ fltk-opengl mailing list fltk-opengl-B9D8k9nSxTHQT0dZR+AlfA@public.gmane.org http://lists.easysw.com/mailman/listinfo/fltk-opengl
End of fltk-opengl Digest, Vol 26, Issue 3 ******************************************
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
[ Direct Link to Message ] | |
|
| |