Wednesday, July 15, 2009

OpenGL feedback

Hello there. So openGL is done. I learned most of the things I need to know. And what is my grade.... A+ :D Well lets get little into details.

I learned all the needed stuff in GL that in need. After that I did a little performance test:

Remember that when I use SDL and blit a 640x480 background it uses 50 - 60% of my CPU.

So I did the following in OpenGL. First a 3D cube is in the middle of the screen (screen is 800x600)  that is textured with an image and rotates on many dirrections. Then the background is textured with a big image. Then there are many textured boxes (100x100) drawn on the screen, all textured). And the whole screen in rotating.

In the first test I created 50 boxes every frame and textured them with a 640x480 image. That means that a 100x100 place was filled with a 640x480 image. The CPU usage was from 2 - 10%. 

(Open the image in new tab/window to see if fully).

Then I thought about it and figgured out that texturing a 100x100 rect with a 640x480 image isn't realy performance efficient and you don't get a better image. So I resized the image to 100x100 and then textured teh rects with it. But now I created 200 rects every frame. And what came out: 0% CPU ussage :D:D Yep thats great. :D

Conclusion: OpenGL is great. Now I need to get an idea for my next game :D

Bye

2 comments:

  1. OpenGL is great! Now the hard part: getting an idea. I'm stuck in that phase too :(

    ReplyDelete
  2. Hehe yea :D A friend recomended to make Crazy Coin Skydiver with 3D effects :D That wouldn't be hard :P

    ReplyDelete