17 transformation.model = Model::identity();
18 transformation.view = View::identity();
19 transformation.projection = Projection::identity();
20 transformation.changed =
true;
47 void Batch::vertex(
float x,
float y) {
51 void Batch::vertex(
float x,
float y,
float z) {
52 vertex(vec3(x, y, z));
55 void Batch::vertex(glm::vec2 vertex) {
56 Batch::vertex(vec3(vertex, 0.0f));
59 void Batch::vertex(glm::vec3 vertex) {
60 vertices.push_back(vertex);
64 void Batch::color(
float r,
float g,
float b) {
68 void Batch::color(
float r,
float g,
float b,
float a) {
69 color(vec4(r, g, b, a));
72 void Batch::color(glm::vec3 color) {
73 Batch::color(vec4(color, 1.0f));
76 void Batch::color(glm::vec4 color) {
77 colors.push_back(color);
80 void Batch::texCoord(
float s,
float t) {
84 void Batch::texCoord(glm::vec2 texCoord) {
85 texCoords.push_back(texCoord);
88 void Batch::normal(
float nx,
float ny,
float nz) {
89 normal(vec3(nx, ny, nz));
92 void Batch::normal(glm::vec3 normal) {
93 normals.push_back(normal);
96 void Batch::setModel(glm::mat4 model) {
97 transformation.model = model;
98 transformation.changed =
true;
101 glm::mat4 Batch::getModel() {
102 return transformation.model;
105 void Batch::setView(glm::mat4 view) {
106 transformation.view = view;
107 transformation.changed =
true;
110 glm::mat4 Batch::getView() {
111 return transformation.view;
114 void Batch::setProjection(glm::mat4 projection) {
115 transformation.projection = projection;
116 transformation.changed =
true;
119 glm::mat4 Batch::getProjection() {
120 return transformation.projection;
Generic namespace for the SimpleGL framework.