Starting to Learn 3D, first question...

Post Reply
Sylus101
Posts: 179
Joined: Wed Dec 24, 2008 5:08 am

Starting to Learn 3D, first question...

Post by Sylus101 » Thu Oct 01, 2009 4:31 pm

This is likely a very simple question, but I'm going to ask anyway.

Looking at early OpenGL examples, there is a glClear() command to clear the screen before being redrawn. This is missing from the nds 3D examples. Is it safe to assume, that the regular hardware clearing of the screen before redrawing is just happening automatically?
Last edited by Sylus101 on Thu Oct 01, 2009 4:46 pm, edited 1 time in total.
-Sylus "Not Stylus..." McFrederickson

Come visit my web site.

User avatar
vuurrobin
Posts: 219
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands
Contact:

Re: Starting to Learn 3D, first question...

Post by vuurrobin » Thu Oct 01, 2009 4:38 pm

well, the 2d hardware redraws the screen between vblanks, so I asume the 3d hardware does it also...

I suggest you try it out.

Sylus101
Posts: 179
Joined: Wed Dec 24, 2008 5:08 am

Re: Starting to Learn 3D, first question...

Post by Sylus101 » Thu Oct 01, 2009 5:03 pm

I hear ya, and that is my assumption (since it does appear to be working that way) but I can't help but want to try and get some clarification from an "expert." I don't ever take anything I learn in programming for granted.
-Sylus "Not Stylus..." McFrederickson

Come visit my web site.

Discostew
Posts: 103
Joined: Sun Mar 08, 2009 7:24 pm

Re: Starting to Learn 3D, first question...

Post by Discostew » Fri Oct 02, 2009 5:32 pm

OpenGL has glClear() because it has a full-screen buffer that gets rendered to the screen. On the NDS in normal situations, there is no full-screen buffer that holds the final render, but there is an internal 48-scanline ring buffer that starts filling during the VBlank (scanline 214), and continues to be filled and used during the screen refresh (which can be finished as early as scanline 144). Because the ring buffer continues to be rewritten, there is no need for glClear() as the data it uses is never kept in between frames.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests