Programming Thread

Viewing single post

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

Legend

Haven't worked on it much this past week due to working.  

I'm not sure how it's typically done in C++.  But there is a show method in the gameobject class that our instructor gave us for our class project.  It basically draws the gameobject to the screen.  

Now I'm assuming the way to do this in c++ is to pass a pointer to the graphics code that points to the list of vertices in the gameobject class.  

I have to do some reconstruction on the graphics methods to get everything working that way, but it seems like the way to do it to match up with best practices.  

Still have to figure out textures.

I'm happy though that a month and a half after starting, I'm still excited to work on this project.  

Wish I could be doing more, but it's like at least fourth priority after work, family, house, etc. :P
That's mostly how it works. Every object is called from the CPU to be drawn on the GPU. You can optimise this by batching objects into a single call but it's all the same concept. (not sure if this was the part you were unsure about though  :P )


It sounds like you're really close to actually making the game instead of making the tech. Lighting (can be) relatively simple and is just handled in your shaders if you want to go with forward rendering. Game graphics are pretty much just drawing triangles with textures and lighting as input. Slap a filter on afterwards and call it a day.