Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
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

Opengl C#

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

#1 jast112   Members   

122
Like
0Likes
Like

Posted 16 April 2008 - 01:43 AM

Hey all.

Anyone can tell me why are my screenshots black???? plz help ty

Im using CsGl
Here is the code.
  Size s = Size;

            Bitmap b = new Bitmap(s.Width, s.Height,
            PixelFormat.Format32bppArgb);
            BitmapData bd = b.LockBits(new Rectangle(0, 0, s.Width, s.Height),
            ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
            GL.glReadPixels(0, 0, 1600, 1200, GL.GL_BGRA_EXT,
            GL.GL_UNSIGNED_BYTE, bd.Scan0);
            b.UnlockBits(bd);
            //b.RotateFlip();
            b.Save(@"D:\screen.bmp", ImageFormat.Bmp);





Regards,

fadah.

[Edited by - jast112 on April 16, 2008 11:40:33 AM]

#2 jast112   Members   

122
Like
0Likes
Like

Posted 16 April 2008 - 05:41 AM

Why are my screenshots black am i missing something???

#3 sYnced   Members   

102
Like
0Likes
Like

Posted 26 April 2013 - 03:16 PM

what is your library ?



#4 Dave Hunt   Members   

4872
Like
2Likes
Like

Posted 28 April 2013 - 09:40 PM

Is there a reason you specified a format for glReadPixels that doesn't match the format of your Bitmap object?




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.