Friday, October 24, 2008
Here are the answers for the practical questions!!!

Question 1 – Define a Callback function?
A code that passes on to another code as an argument and allows a lower-level software layer to call a defined function in a higher-level layer.
We used the function below as a tool to display whatever we woud like to display.
void myDisplay ()
{
}

Question 2 - When exactly is myDisplay()called? How do you get to your findings?
The function [myDisplay()] is called whenever there is a need to display something.

For example when the function [glutPostRedisplay();] is inserted at the end of [myDisplay()],
It will then call [myDisplay()] out so that if there any changes were made in the previous display, it would show in the next.
The [mydisplay()] function was used to help us display our "sine wave graph", 'the Meltdown" and "the static screen".

Question 3 – List the process to access the VRAM.
Pixel Plotting is somewhat used to access the VRAM.
A struct is created to store the data of all the pixels that is required to be drawn, and then it creates another space which is the same as the VRAM.
Finally, the data is sent to the buffer, and OpenGL accesses the VRAM.

Question 4 - What color format are we using here i.e. 8 bits, 16 bits, 24 bits or 32 bits?
24 bits color.

Question 5 - How much memory have we allocated?
800*600 pixels,
Amount of memory allocated = 800*600*3 bytes=1440000 bytes

Question 7 – Describe what has glDrawPixel() done.
The [glDrawPixels] take all data from the memory you set earlier, which is all the pixels which you want to colour, and the draws it onto the buffer.

Posted at 5:26 AM

Senkai Denibo
start
Links
start
TaggyS!!!
start
Music Player
start
Credits
start
Lyrics
start