View previous topic :: View next topic |
Author |
Message |
EKruck
Joined: 09 Jan 2010 Posts: 224 Location: Aalen, Germany
|
Posted: Mon Jun 04, 2012 8:54 am Post subject: Company Logo in OpenGL Window |
|
|
I would like to insert our company logo or a text string into a 3D OpenGL window (%og) in the lower right corner. It shall not move in case of rotation or resize.
Any idea?
Erwin |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Mon Jun 04, 2012 3:21 pm Post subject: |
|
|
Don't know about OpenGL, but I imagine the logic is pretty similar to using Clearwin graphics in a %gr region. The logo needs to be created as a bitmap, and specified in your RESOURCES section. Every time the screen is redrawn, you re-import the bitmap and place it on the screen. This line from a program of mine places the North arrow in the lower right hand corner of a map:
CALL IMPORT_IMAGE@ ('NORTH', IXRES - 150, IYRES - 200)
IXRES and IYRES are the screen size values in pixels. After a resize the image is in this case always in the same position relative to the LR corner. Of course it doesn't need to be, and you can even change to a smaller bitmap if the screen is resized too much. You will almost certainly need a much bigger bitmap if you do this on a printout. If you import the logo at the start, you run the risk of overwriting it, if at the end, you risk it overwriting an important part of your image. In that case, you may need to position it in a blank area of the picture decided by the program.
If the logo is a rectangular area, then you can use any type of bitmap, but if it is irregular, you need to use a bitmap format with transparent areas, e.g. a GIF.
Apologies for this not being a specific answer to your question.
Eddie |
|
Back to top |
|
 |
EKruck
Joined: 09 Jan 2010 Posts: 224 Location: Aalen, Germany
|
Posted: Mon Jun 04, 2012 7:59 pm Post subject: |
|
|
Thanks Eddie,
however, this function is only for %gr windows.
Erwin |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Tue Jun 05, 2012 7:07 pm Post subject: |
|
|
I guess some of this was lost in transation, as I didn't intend the meaning that this function would work in OpenGL, only that there had to be an equivalent function in OpenGL. I was concentrating on where you might import the image in the z-order.
E |
|
Back to top |
|
 |
jjgermis
Joined: 21 Jun 2006 Posts: 404 Location: N�rnberg, Germany
|
Posted: Tue Jun 05, 2012 7:33 pm Post subject: |
|
|
Erwin, I recently started with OpenGL and cannot really contribute to your question. At present I work through examples form the following sites:
1.) f90gl
2.) f03gl
You might know this already. If you have such "problems" as where to put the logo, then you must be advanced  |
|
Back to top |
|
 |
|