replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Company Logo in OpenGL Window
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Company Logo in OpenGL Window

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
EKruck



Joined: 09 Jan 2010
Posts: 224
Location: Aalen, Germany

PostPosted: Mon Jun 04, 2012 8:54 am    Post subject: Company Logo in OpenGL Window Reply with quote

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
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Mon Jun 04, 2012 3:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
EKruck



Joined: 09 Jan 2010
Posts: 224
Location: Aalen, Germany

PostPosted: Mon Jun 04, 2012 7:59 pm    Post subject: Reply with quote

Thanks Eddie,

however, this function is only for %gr windows.

Erwin
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Tue Jun 05, 2012 7:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: N�rnberg, Germany

PostPosted: Tue Jun 05, 2012 7:33 pm    Post subject: Reply with quote

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 Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group