EAE6320Assignment4

Add to
My games
Add to
Wishlist
Save to
Collection
No reviews
Exceptional
Meh
Skip

About

Write Up:

Question:

What was the point of the assignment?

Answer:

The point of this assignment was to learn about reference counting and to implement a way for a user to submit geometry data to be rendered with a specific effect.

Question: 

What did you do personally to complete the assignment?

Answer:

For this assignment I created factory functions for both for my geometry class and my effect class. I also created a function in the graphics.cpp  that would allow a user to submit and array of geometry objects and effect objects that allows them to be rendered during the next frame after the data was submitted. You can see in one of the screenshots how this data gets submitted and how to create the structs that the function requires.

Question: 

Did you get any help from a fellow student?

Answer:

Yes, I received some help from Byreave, Kent,  Sumi, Mit, and Emma on this assignment.  Mostly they helped me by reminding me that I need to check my usage of namespaces and pointers.

Question: 

Explain to us why we have to submit things to be drawn the way that we do. (In other words, why do we have to cache all of the data for a single frame rather than just rendering things immediately?)

Answer:

Because that way we always have the next set of data ready to be rendered. Which reduces any lag we might have from having to cache data that we need to render immediately.

Question: 

Tell us the sizeof(YOUR OBJECT) in both platforms after you have made it reference counted (use the compiler or debugger to tell you the exact sizeof())

  • Is there any way that you could make it smaller? (If so, you should!)
  • Is there any way that you could make it bigger? (If so, don't!)
  • (I am specifically asking about your object representation and what data it's required to store and how that data is laid out. Yes, you could add random member variables that don't do anything to make it any arbitrarily large size, but that's not what I'm asking. Instead, tell us: Is there any way to change the member variables that you currently have to make it smaller? Is there any way that you could reorder the member variables that you have to make it smaller or bigger? If so, tell us specifically what you could do.)

Answer:

Size of cGeometry is 4 in OpenGL and 8 in Direct 3D.

I think that my implementation is a small as it could be. I really can't think of a way of making this bigger without having it be an arbitrary change. It seems like adding the reference counting didn't make my implementation any bigger.

Question: 

Tell us the sizeof(YOUR EFFECT) in both platforms after you have made it reference counted (use the compiler or debugger to tell you the exact sizeof())

  • Is there any way that you could make it smaller? (If so, you should!)
  • Is there any way that you could make it bigger? (If so, don't!)
  • (I am specifically asking about your effect representation. See the explanation above about objects and answer the same specific questions for your effects.)

Answer:

size of cEffect is 4 in OpenGL and 8 in Direct 3D.

I think that my implementation is a small as it could be. I could make it bigger by saving the address of the effect being used . I really can't think of a way of  making this bigger without having it be an arbitrary change. It seems like adding the reference counting didn't make my implementation any bigger.

Question: 

Tell us the total memory that you have budgeted to your Graphics project for data to render frames

  • You will have to do some math for this. There are:
    • 2 sDataRequiredToRenderAFrame structs
    • Each of those structs will have a size (use sizeof() to make sure you get an accurate count)
    • Some of the data stored in those structs may be pointers. You will have to decide whether the memory that these pointers point at should be included or not.

Answer:

For Direct3D:

Visual studio is telling me that each sDataRequiredToRenderAFrame is 320 bytes.

The frame data takes up 144 bytes and there are 4 floats that each take up 4 bytes. So it seems like the pointer arrays I used to hold the geometry objects and effect objects takes up the remainder of the 320 bytes. The arrays are of size 10 each.

For OpenGL:

Visual studio is telling me that each sDataRequiredToRenderAFrame is 240 bytes.

The frame data takes up 144 bytes and there are 4 floats that each take up 4 bytes. So it seems like the pointer arrays I used to hold the geometry objects and effect objects takes up the remainder of the 240 bytes. The arrays are of size 10 each.

All required screenshots can be found on the screenshot panel on the right  ->

Platforms
Release date
Developer
Luis Garcia Remes
Age rating
Not rated
Edit the game info
Last Modified: Sep 20, 2019

Where to buy

itch.io