Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


GL_NV_draw_buffers on Android/Tegra. Where can I find the headers?


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
2 replies to this topic

#1 chronozphere   Members   -  Reputation: 142

Like
0Likes
Like

Posted 04 July 2012 - 05:33 AM

Hi,

I would like to use the gl_nv_draw_buffers extension, which should be available on all tegra devices. I found the following header file:

http://www.khronos.org/registry/gles/api/2.0/gl2ext.h

However, I'm not sure how to use this, as it is not part of android. The official NDK doesn't contain a version of gl2ext.h which defines gl_nv_draw_buffers.

I would like to know where to get the official headers as used by NVidia. Also, I would like to know how to use these properly. Should I put them in the android-ndk/platform directory somewhere?

Thanks a bunch!

Edited by chronozphere, 04 July 2012 - 05:34 AM.


Sponsor:

#2 chronozphere   Members   -  Reputation: 142

Like
0Likes
Like

Posted 15 July 2012 - 04:56 AM

Can somebody explain me how I can use the gl_nv_draw_buffer extension, either in JAVA or using native code?

Thanks!

#3 Hodgman   Moderators   -  Reputation: 30965

Like
0Likes
Like

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

Edited by Hodgman, 15 July 2012 - 05:32 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.



PARTNERS