Jump to content
  • Advertisement
Sign in to follow this  
pavel989

OpenGL C# graphics.

This topic is 3456 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey all, I was learning opengl with C++, when i decided to make a C# pacman for my programming class in school. And im fairly lost because im used to C++/opengl (which so far i like more, but no need for a flame war.... yet?) Anyways, the way im drawing to the screen is that i have 2 graphic objects, one from the actual form and another from a bitmap. and i was saving the bitmap to the bg of the form, and recreating the form graphics. at first it thought that it would make it faster bc it doesnt seem to me as though itd take much processing to set a bg. BUT!! I still get a flicker. And i dont know how to do this correctly. Can anyone explain to me a faster way?

Share this post


Link to post
Share on other sites
Advertisement
If you just want to do this for your class, you'll definitely want to double buffer, as the Mighty Pigeon said. It should be less work to implement that into your existing code than rewriting using OpenGL for C# or XNA.

Just keep in mind that what you're doing is rather slow compared to OpenGL and DirectX. It shouldn't be material for a simple Pac man game, but when you go beyond you should definitely go for XNA as Mike suggested.

Share this post


Link to post
Share on other sites
well to my understanding, id have to install the XNA libraries, and the computers at school are heavily restricted.

If i could've used additional graphics libraries, i couldve been done by now.

Also, i already had double buffering on, through the form options, but i followed the directions, and it still flickers. im pretty sure my code is inefficient which im looking into.

but thanks for the help

Share this post


Link to post
Share on other sites
Maybe you could enlighten us to the specs of your schools PCs. GDI is a slow beast IMO, but if your school is like my previous employment (a training facility), then you have Celeron 666's with some kinda intel integrated graphics thing that can barely play Doom.

Share this post


Link to post
Share on other sites
http://reviews.cnet.com/desktops/gateway-profile-6-sbb/4507-3118_7-31814646.html?tag=mncol;psum


but even my pc at home which pulls gears of war quite well, was flickering.

Share this post


Link to post
Share on other sites
If you're comfortable with OpenGL, you could just use it in C# via Tao.OpenGL: http://www.mono-project.com/Tao

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!