QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Double Buffer in OSLib?

This is a discussion on Double Buffer in OSLib? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I can't seem to figure out how to use a double buffer in OSLib. Does it automatically use a double ...

Reply
 
LinkBack Thread Tools
Old 03-28-2008, 12:34 PM   #1
No longer a community member.
 
Join Date: Dec 2005
Posts: 22
Trader Feedback: 0
Default Double Buffer in OSLib?

I can't seem to figure out how to use a double buffer in OSLib. Does it automatically use a double buffer, or do you have to manually specify it?

Here's a basic template to my understanding. Does this set up a double buffer, or do I have to add something?
PHP Code:
int main()
{
    
oslInit(0);
    
oslInitGfx(OSL_PF_8888, 1);
    
    
oslSyncFrameEx(0, 0, 0);
    
int skip = 0;

    while (!
osl_quit)
    {
        if (!
skip)
        {
            
oslStartDrawing();
            
oslReadKeys();            
            
oslCls();
        
            
//Draw stuff
             
            
oslEndDrawing();    
            
oslEndFrame();
        }                 
        
oslSyncFrameEx(0, 6, 0);            
    }
    
    
oslEndGfx();
    
oslQuit();
    return
0;
}
Hardrive is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-28-2008, 03:11 PM   #2

Developer in Making...
 
BlackShark's Avatar
 
Join Date: Oct 2006
Location: Pimp'en in the US F#cking A!!!
Posts: 1,254
Trader Feedback: 0
Default

Quote:
Originally Posted by Hardrive
I can't seem to figure out how to use a double buffer in OSLib. Does it automatically use a double buffer, or do you have to manually specify it?

Here's a basic template to my understanding. Does this set up a double buffer, or do I have to add something?
PHP Code:
int main()
{
    
oslInit(0);
    
oslInitGfx(OSL_PF_8888, 1);
    
    
oslSyncFrameEx(0, 0, 0);
    
int skip = 0;

    while (!
osl_quit)
    {
        if (!
skip)
        {
            
oslStartDrawing();
            
oslReadKeys();            
            
oslCls();
        
            
//Draw stuff
             
            
oslEndDrawing();    
            
oslEndFrame();
        }                 
        
oslSyncFrameEx(0, 6, 0);            
    }
    
    
oslEndGfx();
    
oslQuit();
    return
0;
}
when initializing the graphics like
Code:
"     oslInitGfx(OSL_PF_8888, 1);      "
then you are using double buffering.
__________________
The Wentire Worls in two Sectors....
When did I get dev statz?
Spoiler for my PSP homebrewReleases:
Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
(PvP Pong DL'ed well over 2403 times combined! get yours now!)
Spoiler for Great Quotes:

"No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.
BlackShark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-28-2008, 03:33 PM   #3
No longer a community member.
 
Join Date: Dec 2005
Posts: 22
Trader Feedback: 0
Default

Quote:
Originally Posted by BlackShark
when initializing the graphics like
Code:
"     oslInitGfx(OSL_PF_8888, 1);      "
then you are using double buffering.
I was confused by oslSwapBuffers(), as I couldn't get it to display correctly. Thanks for the help.
Hardrive is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
buffer , double , oslib

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 01:23 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us