A downloadable game

The reason why we have to submit things to a single frame is because we don’t want to have flickering screen. If we only have one buffer and thread for a drawing screen, the screen will be flickering while we are sending our data.

The size of each class eventually become like this….

 

OpenGL   s3dobjectgeometry -> 28

                  shader                       -> 32

DirectX -> s3dobjectgeometry -> 48

                   shader                       -> 40

 

I made the variables of tracking number of vertices and triangle’s count from integer class to unsigned short class which made -4 byte space for OpenGL. The moment I’m writing this write-up, I just realize those tracking number variables are not necessary to keep inside s3Objectgeometry class (but I think I’m too lazy to change the structure right now).

For the shader class, I change the variables for the pass for the shaders from std::string to char const * class which size down the whole size from 80 to 32 in OpenGL

 

In term of the memory budget for the render frames, I made the structure for storing objectgemetry and effect as vectors, so it is hard to say exactly how much memory it takes. Since the data I restore in the vectors are pointers, I would say I limited it for 100 elements which will end up the total budged in 32bits to be

2 * (28 + 32) * 100 + 32*4 + 144 = 12272 byte

(2 buffers) * (size of objectgeometry and shader) * (number of elements) + (size of background color) + (size of frame class)

Also, because the way I store date is by pointer, this doesn’t include the actual data storage for the coordination and so on.

 

For the control

Space -> change background color

Enter -> change the geometry showing up on screen

Esc    -> Exit the game





Download

Download
Release.zip 21 MB

Leave a comment

Log in with itch.io to leave a comment.