Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-12-2008, 08:05 AM
Tronman Tronman is offline
Newbie
 
Join Date: May 2007
Posts: 7
Rep Power: 0
Tronman is on a distinguished road
Question Suggestions on getting a *very* fast frame rate

Hey folks,

I'm doing a relatively simple animation program, but I need to get some rediculously fast frame rates, somewhere on the order of 60 frames per second, but 1000 refreshes/second.

Luckily, the frames themselves are simple: just a full screen (1280x800 resolution, could be less) black screen with some characters on it of different sizes and, maybe, color. I can pre-render the frames if necessary.

I also don't need to completely update the screen every refresh. What I mean is that I would want a particular frame displayed for about 16 ms, then a blank screen for about 75 ms, then another frame for 16 ms, with 30-60 of these in a row. I would do this a with a nil time between the clearing of the first frame and the drawing of the second frame.

I'm working in C++ so far, using the Fast Light Toolkit (FLTK). My experiments show that it takes about 16 ms between the time I call the MyWindow->show() function and the time it takes to get the window on the screen (done by calling gettickcount() before and after the function call). This consistently gives me times on the order of 16 ms, but as I said, I need to frame to display for 16 ms, and I think what this tells me is that it takes 16 ms to draw the frame, not necessarily have the frame on the screen for a full 16ms. I'm also not sure how the monitors refresh rate (60hz, or about refresh each 16.6667 ms) would play into this, but it seems that it would be okay if the frame is draw, to keep it there for 16ms. So maybe, the 16ms it takes to draw the frame isn't a big deal, I'm not sure.

Again, any advice would be helpful, I'd perfer to stick with C++/FLTK but I'm open to 1) using a different GUI toolkit, if that'll help; 2) Using a different rendering engine (I tried my hand at OpenGL but found it quite tricky, even for this, I'd use it if necessary though), 3) Using a different language (I'm quite experienced at VB and Java, but if anything, it seems those would give me much worse drawing times).

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 06-12-2008, 09:19 AM
TkTech TkTech is offline
 
Join Date: Jun 2006
Posts: 897
Last Blog:
Having trouble with yo...
Rep Power: 20
TkTech is on a distinguished road
Send a message via MSN to TkTech
Default Re: Suggestions on getting a *very* fast frame rate

The speed you can redraw is limited by your monitors refresh rate, both hsync anc vsync. Trying to go to fast will cause clipping, where part of the screen is being rendered while another one is getting pushed to the stack. You can get absurd frame rates by bliting your rendered scene to the GPU and let it take care of everything, including frame sync.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-12-2008, 09:26 AM
Tronman Tronman is offline
Newbie
 
Join Date: May 2007
Posts: 7
Rep Power: 0
Tronman is on a distinguished road
Default Re: Suggestions on getting a *very* fast frame rate

Thanks for the reply!

I assume you are referring to the use of the BitBlt API in gdi32, correct? That does sound promising, mind pointing me in the direction of some example code I could look at (if you have some off hand)?

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
animation, c++, fltk, framerate, gui



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How would you rate your web design skills? Nefrit Website Design 92 06-23-2008 02:14 PM
Animated Ripple effect (Simple) - Flash MX 2004 ahsan16 Photoshop Tutorials 10 05-22-2008 05:54 AM
Collapse Outside the frame Kolyn_Kryw JavaScript and CSS 1 04-16-2008 02:27 PM


All times are GMT -5. The time now is 03:39 AM.

Contest Stats

GoogleKeyw ........ 20.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads