Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Opengl C#


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   -  Reputation: 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]

Sponsor:

#2 jast112   Members   -  Reputation: 122

Like
0Likes
Like

Posted 16 April 2008 - 05:41 AM

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

#3 sYnced   Members   -  Reputation: 102

Like
0Likes
Like

Posted 26 April 2013 - 03:16 PM

what is your library ?



#4 Dave Hunt   Crossbones+   -  Reputation: 2469

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.



PARTNERS