Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualNeosettler

Posted 27 January 2013 - 09:59 AM

Why are you checking the validity of the object and uploading data almost everywhere in the code?

 

The validity check comes from:

 

- In the old days, resizing a window was emptying the video memory. (Not a valid argument anymore)

- I'm using a mixture of SFML and QT and for some reason, it does prevent me from creating buffer at initialization of my API as there is a switch GL context or some funny stuff similar to this. (I will start by investigate this.)

- I have the option of resetting programs at run time. (I'll make re-initialization on reset() instead.)

 

The uploading data is rather tricky, as my approach supports multi-materials, I have 2 different techniques that I would like to debate:

 

- Geometries hold vertex attributes and meshes.

- Meshes hold face ids.

 

For each geometry:

1 - One VBO for the vertex attributes and one VBO for each mesh(i).

2 - One VBO for the vertex attributes and one VBO for all mesh(i) using buffer offset.

 

Surprisingly, number 2 is giving better performance even if it has to call subData every draw.

 

To resume, You are right, I'm in the process of redesign and I'd love some insights.


#3Neosettler

Posted 27 January 2013 - 09:58 AM

Why are you checking the validity of the object and uploading data almost everywhere in the code?

 

The validity check comes from:

 

- In the old days, resizing a window was emptying the video memory. (Not a valid argument anymore)

- I'm using a mixture of SFML and QT and for some reason, it does prevent me from creating buffer at initialization of my API as there is a switch GL context or some funny stuff similar to this. (I will start by investigate this.)

- I have the option of resetting programs at run time. (I'll make re-initialization on reset() instead.)

 

The uploading data is rather tricky, as my approach supports multi-materials, I have 2 different techniques that I would like to debate:

 

- Geometries hold vertex attributes and meshes.

- Meshes hold face ids.

 

For each geometry:

1 - One VBO for the vertex attributes and one VBO for each mesh(i).

2 - One VBO for the vertex attributes and one VBO for all mesh(i) using buffer offset.

 

Surprisingly, number 2 is giving better performance even if it has to call subData every draw.

 

To resume, You are right, I need a redesign and I'd love some insights.


#2Neosettler

Posted 27 January 2013 - 09:57 AM

Why are you checking the validity of the object and uploading data almost everywhere in the code?

 

The validity check comes from:

 

- In the old days, resizing a window was emptying the video memory. (Not a valid argument anymore)

- I'm using a mixture of SFML and QT and for some reason, it does prevent me from creating buffer at initialization of my API as there is a switch GL context or some funny stuff similar to this. (I will start by investigate this.)

- I have the option of resetting programs at run time. (I'll make re-initialization on reset() instead.)

 

The uploading data is rather tricky, as my approach supports multi-materials, I have 2 different techniques that I would like to debate:

 

- Geometries hold vertex attributes and meshes.

- Meshes hold face ids.

 

For each geometry:

1 - One VBO for the vertex attributes and one VBO for each mesh(i).

2 - One VBO for the vertex attributes and one VBO for all mesh(i) using buffer offset.

 

Surprisingly, number 2 is giving better performance even if it has to can subData every draw.

 

To resume, You are right, I need a redesign and I'd love some insights.


#1Neosettler

Posted 27 January 2013 - 09:55 AM

Why are you checking the validity of the object and uploading data almost everywhere in the code?

 

The validity check comes from:

 

- In the old days, resizing a window was emptying the video memory. (Not a valid argument anymore)

- I'm using a mixture of SFML and QT and for some reason, it does prevent me from creating buffer at initialization of my API as my shader seems to switch context or some funny stuff similar to this. (I will start by investigate this.)

- I have the option of resetting programs at run time. (I'll make re-initialization on reset() instead.)

 

The uploading data is rather tricky, as my approach supports multi-materials, I have 2 different techniques that I would like to debate:

 

- Geometries hold vertex attributes and meshes.

- Meshes hold face ids.

 

For each geometry:

1 - One VBO for the vertex attributes and one VBO for each mesh(i).

2 - One VBO for the vertex attributes and one VBO for all mesh(i) using buffer offset.

 

Surprisingly, number 2 is giving better performance even if it has to can subData every draw.

 

To resume, You are right, I need a redesign and I'd love some insights.


PARTNERS