Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


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   Crossbones+   -  Reputation: 2915

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.

"Earlier, I become." - Irlan Robson
Irlan Engine: https://irlanengine.wordpress.com/


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