Software rendering...Scanline conversion... finally some screen shot
Tga file containing a box and a triangle in wireframe mode... in parallel projection with no backface culling. Something is wronge with my maths for perspective projection..does not work ;)
Finally some screenshot... tga file reader wrtiter class is working. The tga class only supports uncompressed 8 or 24 bit gray scale or rgb image format. Very simple... with a header and cpp file.. no lib files :) The above image is rendered by reading the frame buffer and saving as tga file. Still no scanline... should start tonight :)
The project now has two singleton objects defined in SingletonDefinitions.h file...
I need to implement a buffer class... need two buffer objects.. one for the final color value and one for storing depth values (depth buffer). Thinking of making it a singleton class also:)
My next objective is to implement the very basics of scanline.. and should test it with a simple triangle.
Finally some screenshot... tga file reader wrtiter class is working. The tga class only supports uncompressed 8 or 24 bit gray scale or rgb image format. Very simple... with a header and cpp file.. no lib files :) The above image is rendered by reading the frame buffer and saving as tga file. Still no scanline... should start tonight :)
GLbyte *buffer = (GLbyte *)malloc(sizeof(GLbyte) * windowHeight * windowWidth * 3);
glReadPixels(0, 0, windowWidth, windowHeight, GL_RGB, GL_UNSIGNED_BYTE, buffer);
IMAGEPROC->WriteImage("screenshot.tga", (unsigned char *)buffer, windowWidth, windowHeight, 3 * 8, TGA);
The project now has two singleton objects defined in SingletonDefinitions.h file...
CImageProcessor *IMAGEPROC;
CRenderer *RENDERER;
//this function should be called atleast once.. at the beginning of the application..
void defineSingletonObjects(void)
{
IMAGEPROC = RHSingleton::Instance();
RENDERER = RHSingleton::Instance();
}
I need to implement a buffer class... need two buffer objects.. one for the final color value and one for storing depth values (depth buffer). Thinking of making it a singleton class also:)
My next objective is to implement the very basics of scanline.. and should test it with a simple triangle.
0 Comments:
Post a Comment
<< Home