Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/346445901503533056
added 691 characters in body
Source Link
Dono
  • 73
  • 2
  • 9

I'm trying to make a 2D Graphic engine for training me. I've actually made it with immediate draw and I've made the renderer outside (so I can switch between OpenGL and DirectX).

How can I manage Vertex Buffer Object and Vertex Array Object? I've made a geometry object, and I don't think VBO and VAO need to be here.

It is the work of my renderer to manage the scene? (Group object in a large VBO, hide object out of screen, Order object by transparency, …)

More explications on my architecture:

  • Spacial : Spacial element containing spacial elements (like a node).
  • Mesh : Object with a geometry and a material
  • Scene : Manage spacial element (like mesh) and lights.
  • Renderer : Draw the given scene (mesh and lights)

Where I should manage buffers (Index buffer, Vertex Object Buffer and Vertex Array Buffer)? In first, I started to put them in the Geometry class, but it seem obvious because a buffer can stock multiple Geometry object.

So, I'm thinking to put buffers in a buffer manager (in the scene object) -> Scene can manage meshes (order + static/dynamic to regroup them in buffers).

What do you think about that?

Thanks!

I'm trying to make a 2D Graphic engine for training me. I've actually made it with immediate draw and I've made the renderer outside (so I can switch between OpenGL and DirectX).

How can I manage Vertex Buffer Object and Vertex Array Object? I've made a geometry object, and I don't think VBO and VAO need to be here.

It is the work of my renderer to manage the scene? (Group object in a large VBO, hide object out of screen, Order object by transparency, …)

Thanks!

I'm trying to make a 2D Graphic engine for training me. I've actually made it with immediate draw and I've made the renderer outside (so I can switch between OpenGL and DirectX).

How can I manage Vertex Buffer Object and Vertex Array Object? I've made a geometry object, and I don't think VBO and VAO need to be here.

It is the work of my renderer to manage the scene? (Group object in a large VBO, hide object out of screen, Order object by transparency, …)

More explications on my architecture:

  • Spacial : Spacial element containing spacial elements (like a node).
  • Mesh : Object with a geometry and a material
  • Scene : Manage spacial element (like mesh) and lights.
  • Renderer : Draw the given scene (mesh and lights)

Where I should manage buffers (Index buffer, Vertex Object Buffer and Vertex Array Buffer)? In first, I started to put them in the Geometry class, but it seem obvious because a buffer can stock multiple Geometry object.

So, I'm thinking to put buffers in a buffer manager (in the scene object) -> Scene can manage meshes (order + static/dynamic to regroup them in buffers).

What do you think about that?

Thanks!

Source Link
Dono
  • 73
  • 2
  • 9

Manage VBO/VAO in a graphic engine

I'm trying to make a 2D Graphic engine for training me. I've actually made it with immediate draw and I've made the renderer outside (so I can switch between OpenGL and DirectX).

How can I manage Vertex Buffer Object and Vertex Array Object? I've made a geometry object, and I don't think VBO and VAO need to be here.

It is the work of my renderer to manage the scene? (Group object in a large VBO, hide object out of screen, Order object by transparency, …)

Thanks!