Silverfrost Forums

Welcome to our forums

Company Logo in OpenGL Window

4 Jun 2012 7:54 #10269

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

4 Jun 2012 2:21 #10272

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

4 Jun 2012 6:59 #10273

Thanks Eddie,

however, this function is only for %gr windows.

Erwin

5 Jun 2012 6:07 #10275

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 [u:e3b09116ff]in[/u:e3b09116ff] OpenGL. I was concentrating on where you might import the image in the z-order.

E

5 Jun 2012 6:33 #10276

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 😉

Please login to reply.