Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualHodgman

Posted 15 July 2012 - 05:32 AM

The way that GL extensions work, is that you won't usually find them in your standard GL headers (otherwise they'd be standard, not extensions Posted Image).
You can read the background on the idea here: http://www.opengl.or.../OGLextensions/

I'm not sure if nVidia supplies "official" headers for their extensions, but anyone can make their own header by following the instructions in the official txt description of the extension. There's projects such as GLee and GLEW that take it upon themselves to try and create comprehensive extension headers to simplify this process.

That header that you've linked to (which comes from the official GL authority -- the khronos group) defines a new "function pointer" type (PFNGLDRAWBUFFERSNVPROC), which is able to hold the address of your glDrawBuffersNV function. The OS will have a mechanism where you can ask for the address of a GL function by name, e.g. "glDrawBuffersNV", and it will return a function pointer. You can then cast this function pointer to the above type, and then call it as if it were a real function.

On Windows, you do this name->function-pointer lookup using the wglGetProcAddress function, I assume android has something similar, but I'm not familiar with it.

[EDIT] These might be of use:
http://stackoverflow...sions-supported
http://graphicexperiences.wordpress.com/2011/12/01/access-opengl-es-extensions-in-android-2-2-and-early/
It seems Android originally didn't want to allow developers to use vendor-specific extensions...

#3Hodgman

Posted 15 July 2012 - 05:30 AM

The way that GL extensions work, is that you won't usually find them in your standard GL headers (otherwise they'd be standard, not extensions Posted Image).
You can read the background on the idea here: http://www.opengl.or.../OGLextensions/

I'm not sure if nVidia supplies "official" headers for their extensions, but anyone can make their own header by following the instructions in the official txt description of the extension. There's projects such as GLee and GLEW that take it upon themselves to try and create comprehensive extension headers to simplify this process.

That header that you've linked to (which comes from the official GL authority -- the khronos group) defines a new "function pointer" type (PFNGLDRAWBUFFERSNVPROC), which is able to hold the address of your glDrawBuffersNV function. The OS will have a mechanism where you can ask for the address of a GL function by name, e.g. "glDrawBuffersNV", and it will return a function pointer. You can then cast this function pointer to the above type, and then call it as if it were a real function.

On Windows, you do this name->function-pointer lookup using the wglGetProcAddress function, I assume android has something similar, but I'm not familiar with it.
[EDIT] This might be of use:
http://stackoverflow...sions-supported

#2Hodgman

Posted 15 July 2012 - 05:27 AM

The way that GL extensions work, is that you won't usually find them in your standard GL headers (otherwise they'd be standard, not extensions Posted Image).
You can read the background on the idea here: http://www.opengl.or.../OGLextensions/

I'm not sure if nVidia supplies "official" headers for their extensions, but anyone can make their own header by following the instructions in the official txt description of the extension. There's projects such as GLee and GLEW that take it upon themselves to try and create comprehensive extension headers to simplify this process.

That header that you've linked to defines a new "function pointer" type (PFNGLDRAWBUFFERSNVPROC), which is able to hold the address of your glDrawBuffersNV function. The OS will have a mechanism where you can ask for the address of a GL function by name, e.g. "glDrawBuffersNV", and it will return a function pointer. You can then cast this function pointer to the above type, and then call it as if it were a real function.

On Windows, you do this name->function-pointer lookup using the wglGetProcAddress function, I assume android has something similar, but I'm not familiar with it.
[EDIT] This might be of use:
http://stackoverflow.com/questions/6970725/android-opengl-es-all-extensions-supported

#1Hodgman

Posted 15 July 2012 - 05:18 AM

The way that GL extensions work, is that you won't usually find them in your standard GL headers (otherwise they'd be standard, not extensions Posted Image).
You can read the background on the idea here: http://www.opengl.org/archives/resources/features/OGLextensions/

That header that you've linked to defines a new "function pointer" type (PFNGLDRAWBUFFERSNVPROC), which is able to hold the address of your glDrawBuffersNV function. The OS will have a mechanism where you can ask for the address of a GL function by name, e.g. "glDrawBuffersNV", and it will return a function pointer. You can then cast this function pointer to the above type, and then call it as if it were a real function.

On Windows, you do this name->function-pointer lookup using the wglGetProcAddress function, I assume android has something similar, but I'm not familiar with it.

PARTNERS