feat: add lights
This commit is contained in:
		| @@ -73,6 +73,14 @@ void Shader::setup_attribs() const | ||||
| 		    loc, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), | ||||
| 		    reinterpret_cast<const void*>(offsetof(Vertex, tex_coord))); | ||||
| 	} | ||||
|  | ||||
| 	loc = glGetAttribLocation(program_id_, "vnormal"); | ||||
| 	if (loc != -1) { | ||||
| 		glEnableVertexAttribArray(loc); | ||||
| 		glVertexAttribPointer( | ||||
| 		    loc, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), | ||||
| 		    reinterpret_cast<const void*>(offsetof(Vertex, normal))); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| int Shader::uniform_location(const char* key) const | ||||
|   | ||||
		Reference in New Issue
	
	Block a user