Jump to content

  • Log In with Google      Sign In   
  • Create Account


Mesh-Buffer Interaction


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Irlan   Members   -  Reputation: 1455

Like
0Likes
Like

Posted 19 December 2013 - 07:40 PM

I'm confused with the design of my Structs/Classes. I have a GLContext with the OpenGL functions.
 
GLMB: GL Mesh Buffer
 
Question: the Mesh must be a Class (with functions to GenBuffers, Delete, etc.)?
 
Do I have to extend another class called GLMesh with VAOs and VBOs?

struct Vertex {
Vector3 p;
Vector2 uv; 
Vector3 n;
};


struct Mesh {
vector<Vertex> vertices;
vector<int> indices;


GLMB* glmb;
};


struct Material {
Vector3 a;
Vector3 d;
Vector3 s;
Vector3 e;


GLuint* texname;
};

struct Light {
Vector3 a;
Vector3 d;
Vector3 s;
Vector3 p;
};


struct Model {
Mesh mesh;
Material material;
};

Edited by irlanrobson, 20 December 2013 - 07:44 AM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS