Jump to content

  • Log In with Google      Sign In   
  • Create Account

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

#2   Members   -  Reputation: 122

Like
0Likes
Like

Posted 16 April 2008 - 05:41 AM

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

#3   Members   -  Reputation: 102

Like
0Likes
Like

Posted 26 April 2013 - 03:16 PM

what is your library ?



#4   Crossbones+   -  Reputation: 4779

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