












Labels: practical
The OpenGL Utility Toolkit (GLUT) is a library of utilities for OpenGL programs, which primarily perform system-level I/O with the host operating system. Functions performed include window definition, window control, and monitoring of keyboard and mouse input. Routines for drawing a number of geometric primitives (both in solid and wireframe mode) are also provided, including cubes, spheres, and the Utah teapot. GLUT even has some limited support for creating pop-up menus.
freeglut is an open source alternative to the OpenGL Utility Toolkit (GLUT) library. GLUT (and hence freeglut) allows the user to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard and joystick functions. freeglut is intended to be a full replacement for GLUT, and has only a few differences.
freeglut is now very stable and has fewer bugs than the original GLUT. However, there are places where the original GLUT specification did not make clear what order things like callbacks occur and it is possible for application programs that work under GLUT to fail under freeglut because they assume something that GLUT never guaranteed to be true.
New revisions appear periodically - however since it is now quite stable and no new features are planned, these updates are required less and less often. This would change if there was ever a new release of GLUT.

Labels: what-is-that-a-day
A callback function is a function that handle events. Callback functions determine exactly what function to call next when an event occurs.
myDisplay() is called after glutDisplayFunc(myDisplay) is called as after this line is executed, my screen start to process it's drawing and updating of the graphics on the screen.
Define a struct to represent pixels on the screen.
Define pointer to memory location that will enable pixel plotting.
Based on the screen resolution, a 800x600 memory array is created.
Memory that was created earlier is then transfered into OpenGL’s double buffer.
Buffer will then be cleared to enable a clean surface to work on.
OpenGL’s double buffer will then copy the image onto the VRAM to be displayed on the screen.
Deleting the dynamic array created to prevent memory leak.
24bits. Red, Green and Blue.
800*600*3=1.44MB
glDrawPixels() basically transfers what the buffer had stored into the display to enable the player to see the images. Plot-pixel basically just changes the data of the buffer.

Labels: practical
Question 1I want my game to run at 800 x 600 on 32 bits. How much VRAM do I need?Answer 1800 x 600 x 4 byte = 1920 000 bytes around 1.83 megabytes(Note: 1 megabytes=1024*1 megabytes=1024 kilobytes, 1 kilobytes=1024*1 kilobytes=1024 bytes)Question 2My artist are told they have a maximum of 32MB to use for textures. How many textures can they use if they are limited to 256 x 256, with a 24 bits palette of 8 bits colour depth?Answer 2Total memory allocated = 32 megabytes x 1024 x 1024 = 33554432 bytesMemory taken per texture = 256 x 256 x 1 byte + (256 x 3) = 66304 bytesPossible images allowed = 33556632/66304= 506.0694981roughly = 506 images.Ok, I know alot of you got the answer 512 images, but take note that each images had a palette. In this case, the palette is a 24 bits palette which account to an additional of 768 bytes of memory assign to each texture. That explains the answer.
Labels: lecture

| Title: | Legend of Zelda : The Wind Waker |
| Platform: | Nintendo Gamecube |
| Released: | Mar 24, 2003 |
| Genre: | Fantasy Action Adventure |
| Developer: | Nintendo |
Labels: review
what-is-that-a-day in
"Computer Graphics"
What are computer graphics(CG)? CG are actually visual representation of manipulating pictorial data to the user. CG can be found nearly anywhere in the world today.
CG filled in the void where the world wouldn't be able to offer visually.
Windows Vista from Microsoft
Today computers and computer-generated images touch many aspects of our daily life. CG can construct visual representation of statistics to a form such that it is easier to understand.
A wide array of tools were also created to manipulate computer imagery.
(Left) Gizmodo.com (Middle) Half Life 2: Lost Coast from Valve (Right) AutoCAD from Autodesk
Computer graphics not only change the way the world looks. It changed the way artist express their creativity. It bought a whole new level of expression and possibilities. Art no longer limit itself to just brush and paint, mathematical formula works terrific too. like vector arts.
(Left) estudio portugal by Benbe (Middle and Right) ComputerArts
Since, computer graphics are so good, why not bring it to films too?
WALL-e from Pixar
Britney Spears: A life mosaic by tsevis
For more information about CG, visit:
http://en.wikipedia.org/wiki/Computer_graphics
Now you know what is computer graphics.
Have fun,
Jay
Bleeding Visuals Author
Labels: what-is-that-a-day
Today marks the launch of Bleeding Visuals blog for the CG module I am currently studying in.
Firstly, I thank you for just visiting here.
This blog was created to provide myself an avenue to express my interest in visual elements. Hopefully I won’t mess it up.
As you can see there are not much yet. I’ll post some work and possibly some ‘substance’ soon.
So stay tuned.
Have fun,
Jay C.
Bleeding Visuals Author