Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualirreversible

Posted 17 January 2013 - 11:07 PM

Yes, to comply with what's been standard in OpenGL since 3.0 pretty much deprecated the fixed function pipeline, it's good to be always using a VAOs. Furthermore, VAOs have been around in OpenGL forever, so there really is no other excuse to not use them than laziness. The fixed function pipeline is useful for quick-and-dirty mockups and testing, but not really for any kind of serious work.

 

I personally wrote a fixed-allocation wrapper for objects with up to a few thousand vertices that is filled up in software using emulated fixed function notation and then render it as a VAO. It follows the same notational paradigm as OpenGL, but provides a number of benefits:

 

1) it's cross-compatible with D3D once you fill in the buffers

2) it's easy for QnD testing

3) it's both forward-compatible and backwards-compatible

4) it's transparent to the application

5) it's object-oriented so it provides functionality encapsulation

6) it's far easier to write debug code for than horrible GL fixed function calls

7) it can do tessellation on the fly (in particular stuff like quad->triangle conversions)

8) state changes and streams are handled internally (eg no texture coord stream is written or enabled if the first vertex doesn't have a texture coordinate - you don't need to worry about any of this when using it)

9) it's easily extensible to support TNB or any other streams you may need using good old fixed function style notation

 

An example of its use looks like:

 

 

drv->Begin(GD_QUADS);
   drv->TexCoord(0, 0);
   drv->Binormal(bn0);
   drv->Vertex(v0);
   ...
drv->End();

 

 

The only drawback is that you have to write it.

 

For actual time-critical rendering you should always use VBO-s that you keep on the chip at all times. Moreover, once you have your data in a VAO, you can potentially use stuff like transform feedback to cut the CPU out of the loop altogether.

Think of it this way: fixed function is a toy. When you want to play, you get your toys. When you want to get work done, you bring out the tools.


#2irreversible

Posted 17 January 2013 - 10:59 PM

Yes, to comply with what's been standard in OpenGL since 3.0 pretty much deprecated the fixed function pipeline, it's good to be always using a VAOs. Furthermore, VAOs have been around in OpenGL forever, so there really is no other excuse to not use them than laziness. The fixed function pipeline is useful for quick-and-dirty mockups and testing, but not really for any kind of serious work.

 

I personally wrote a fixed-allocation wrapper for objects with up to a few thousand vertices that is filled up in software using emulated fixed function notation and then render it as a VAO. It follows the same notational paradigm as OpenGL, but provides a number of benefits:

 

1) it's cross-compatible with D3D once you fill in the buffers

2) it's easy for QnD testing

3) it's both forward-compatible and backwards-compatible

4) it's transparent to the application

5) it's object-oriented so it provides functionality encapsulation

6) it's far easier to write debug code for than horrible GL fixed function calls

7) it can do tessellation on the fly (in particular stuff like quad->triangle conversions)

8) state changes and streams are handled internally (eg no texture coord stream is written or enable if the first vertex doesn't have a texture coordinate - you don't need to worry about any of this when using it)

9) it's easily extensible to support TNB or any other streams you may need using good old fixed function style notation

 

An example of its use looks like:

 

 

drv->Begin(GD_QUADS);
   drv->TexCoord(0, 0);
   drv->Binormal(bn0);
   drv->Vertex(v0);
   ...
drv->End();

 

 

The only drawback is that you have to write it.

 

For actual time-critical rendering you should always use (if possible, static) VBO-s that you keep on the chip at all times. Moreover, once you have your data in a VAO, you can potentially use stuff like transform feedback to cut the CPU out of the loop altogether.

Think of it this way: fixed function is a toy. When you want to play, you get your toys. When you want to get work done, you bring out the tools.


#1irreversible

Posted 17 January 2013 - 10:55 PM

Yes, to comply with what's been standard in OpenGL since 3.0 pretty much deprecated the fixed function pipeline, it's good to be always using a VAOs. Furthermore, VAOs have been around in OpenGL forever, so there really is no other excuse to not use them than laziness. The fixed function pipeline is useful for quick-and-dirty mockups and testing, but not really for any kind of serious work.

 

I personally wrote a fixed-allocation wrapper for objects with up to a few thousand vertices that is filled up in software using emulated fixed function notation and then render it as a VAO. It follows the same notational paradigm as OpenGL, but provides a number of benefits:

 

1) it's cross-compatible with D3D once you fill in the buffers

2) it's easy for QnD testing

3) it's both forward-compatible and backwards-compatible

4) it's transparent to the application

5) it's object-oriented so it provides functionality encapsulation

6) it's far easier to write debug code for than horrible GL fixed function calls

7) it can do tessellation on the fly (in particular stuff like quad->triangle conversions)

8) state changes and streams are handled internally (eg no texture coord stream is written or enable if the first vertex doesn't have a texture coordinate - you don't need to worry about any of this when using it)

9) it's easily extensible to support TNB or any other streams you may need using good old fixed function style notation

 

An example of its use looks like:

 

drv->Begin(GD_QUADS);
   drv->TexCoord(0, 0);
   drv->Binormal(bn0);
   drv->Vertex(v0);
   ...
drv->End();

 

The only drawback is that you have to write it.

 

For actual time-critical rendering you should always use static VBO-s that you keep on the chip. More over, once you have data in a VAO, you can use transform feedback where possible to cut the CPU out of the loop altogether.


PARTNERS