jsiems / gl_test

Test repository to mess around with opengl.
0 stars 0 forks source link

Separate shader from model #5

Open jsiems opened 6 years ago

jsiems commented 6 years ago

Shader can be very common between many models, we don't want to create and compile one for every object we have. We need to: Be able to send in the shader object when initializing the model. If the shader is already compiled, the model will just store a pointer to the shader struct. If it has NOT been compiled, it will compile it then do the same thing. Something like that... I am not 100% certain how I would like to implement this.

jsiems commented 6 years ago

also separate lighting data from model. We don't need to send the same unfirom lighting data for every signle shader if they are all the same shader, we only need to send what items to draw and where to draw them. Light data should already be passed in before this.

jsiems commented 6 years ago

Kind of completed by 06b89521792b03f49091ff74b341d2f7a0688cd3, still need to add lighting file that handles all lighting stuff