Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Mesh-Buffer Interaction

4: Adsense

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 Robson   Members   

4056
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.





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.