Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Fading the screen in OpenGL

4: Adsense

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
4 replies to this topic

#1 TheGecko   Members   

122
Like
Likes
Like

Posted 18 January 2000 - 01:30 PM

Anyone here know how to fade the screen in OpenGL? I''m trying to program a very simple intro screen in which I load a bitmap and display it on screen.Then that bitmap fades away and then I load up another bitmap file and display it.I can do all this but I''m not sure how to do the fading bit? Any ideas? Thanx in advance!

#2 logistix   Members   

122
Like
Likes
Like

Posted 18 January 2000 - 03:18 PM

Are you using the bitmap as a texture?

If so, try vertex lighting. You use GL_MODULATE to apply the texture, and then glColor() will act as basic lighting for any polys you draw. Start off at glColor3f(1.0, 1.0, 1.0) and work your way down to glColor3f(0.0, 0.0, 0.0)


#3 TheGecko   Members   

122
Like
Likes
Like

Posted 19 January 2000 - 02:45 AM

Hmmm...that''s a good idea...but I''m not using the bitmap as a texture.I''m simply outputing a bitmap to the screen.That''s all
Any other ideas?

#4 Someone   Members   

122
Like
Likes
Like

Posted 21 January 2000 - 02:42 PM

If you''re using glDrawPixels, you can try the glTransferi command (I don''t really remember the exact parameters needed for it right now), and specify each color''s scale value (using GL_RED_SCALE, GL_GREEN_SCALE, GL_BLUE_SCALE as one of its parameters).

That will be a multiplier for your bitmap output. So, set it to 1 for normal, 0 for none of that color component.


#5 SiCrane   Moderators   

11761
Like
Likes
Like

Posted 21 January 2000 - 02:58 PM

You could draw a transparent surface on top of the bitmap, and then slowly change it''s alpha value until it''s black. I remember having trouble getting alphas to behave properly in 2d (only half the image received the alpha value, never found out what went wrong), so that might not work.




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.