Hi all,
i decide to build JOGL with the updated glext.h.
With all unnamed structs like _cl_event, _cl_context, __GLSync etc (which are commented out in jogl official glext.h) deleted, things are still not going well.
I get this:
java.lang.RuntimeException: Error while generating bindings for "void glDebugMessageCallback(void (*callback)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * message, GLvoid * userParam), const void * userParam);" at com.jogamp.gluegen.JavaEmitter.generateMethodBindingEmitters(JavaEmitter.java:726) at com.jogamp.gluegen.procaddress.ProcAddressEmitter.generateMethodBindingEmittersImpl(ProcAddressEmitter.java:129) at com.jogamp.gluegen.procaddress.ProcAddressEmitter.generateMethodBindingEmitters(ProcAddressEmitter.java:116) at com.jogamp.gluegen.JavaEmitter.emitFunctions(JavaEmitter.java:417) at com.jogamp.gluegen.GlueGen.run(GlueGen.java:297) ... 1 more Caused by: java.lang.RuntimeException: Don't know how to convert pointer/array type "GLDEBUGPROCARB" at com.jogamp.gluegen.JavaEmitter.typeToJavaType(JavaEmitter.java:1293) at com.jogamp.gluegen.JavaEmitter.bindFunction(JavaEmitter.java:1718) at com.jogamp.gluegen.JavaEmitter.generateMethodBindingEmitters(JavaEmitter.java:651) ... 5 morefor your ref, the definition of GLDEBUGPROCARB is typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);However, in the JOGL's glext.h, all functions and definitions related to GLDEBUGPROCARB are the same as mine. This makes me very confusing. I hope someone who are experienced with GlueGen can give me some answers. Thanks sincerely |
Administrator
|
Why do you need to use an updated glext.h? I think that those structures are commented for a good reason. @Sven do you have an idea?
Julien Gouesse | Personal blog | Website
|
Hi @gouessej, if that is relevant, i need the newest glext.h to get all latest OpenGL functions such as Bindless stuffs (glProgramUniformHandle*...) for NV Kepler cards and glTextureView etc ... Also pls consider this is a tiny contribution to JOGL in case i can handle it the right way :)
|
Administrator
|
That's an excellent idea! :D If you have any problem, let us know. If you don't succeed, you will have to consider writing a bug report as a request for enhancement. Are those features available only on Nvidia graphics cards?
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by kotloft
On 02/24/2013 03:33 AM, kotloft [via jogamp] wrote:
> Hi @gouessej, if that is relevant, i need the newest glext.h to get all > latest OpenGL functions such as Bindless stuffs (glProgramUniformHandle*...) > for NV Kepler cards and glTextureView etc ... Also pls consider this is a tiny > contribution to JOGL in case i can handle it the right way :) The 'right way' is the difficulty here. First we should speak about new GL profiles, i.e. ES3 and GL4.3, which needs to be added. Are those vendor extensions subsumed into core already? If not, we may want to consider the footprint usability balance of those. Footprint can be reduced while adding NIOOnly .. In case they are not yet in a core profile, what profile are they depending on ? Shall they simply be added to GL/glext.h and GL3/glext.h ? The latter would add them to GL3/GL4 .. core profiles, which is only valid if they have no fixed function dependencies .. etc. So even though there will be no manual coding required thx to GlueGen there is some spec work to do here to put them in the right place, the right way :) You might have noted that I acted pretty conservatively towards vendor extensions to not let it bloat too much. Usually useful extensions will be added to core anyways w/ a ~1 year delay [only]. As we know, this was not true w/ GEOMETRY shaders .. well :) ~Sven signature.asc (911 bytes) Download Attachment |
This post was updated on .
Hi @gouessej, no they are not all nv specific. Things like glTextureView actually belong to GL4.2 ARB extension.
There are lot of other stuffs in the latest glext.h, such as deleting old deprecated functions or providing new macros. Hi @Sven, i see your point. the Kepler stuffs belongs to nv_bindless_texture which are written against GL4.0. and glTextureView belongs to ARB_texture_view which is written against GL4.2 and it is now a core part of GL4.3. Other latest changes includes: OES fixed point routines, khronos ASTC compressed texture routines and macros. As what you have pointed out, i think i better put them into gl3ext.h. Also It appears that a GL4.3 profile might be needed for glTextureView. But, GL4.2 profile should also have this extension according to spec. |
Administrator
|
On 02/24/2013 02:08 PM, kotloft [via jogamp] wrote:
> Hi @gouessej, no they are not all nv specific. Things like glTextureView > actually belong to GL4.2 ARB extension. > There are lot of other stuffs in the latest glext.h, such as deleting old > deprecated functions or providing new macros. > > > Hi @Sven, i see your point. the Kepler stuffs belongs to nv_bindless_texture > which are written against GL4.0. > and glTextureView belongs to ARB_texture_view which is written against GL4.2. > Other latest changes includes: OES fixed point routines, khronos ASTC > compressed texture routines and macros. > As what you have pointed out, i think i better put them into gl3ext.h. It > appears that there's no need for a GL4.3 profile for the time being. however, if you can confirm that these extensions are _not_ subsumed [yet] pls feel free to add the complete extensions to both glext.h (GL and GL3), especially the ARB ones - since they will be subsumed at some point - probably. Adding them to both, GL and GL3 is good, since it will enabled them for compatibility and core profiles. Further more it is necessary to exclude them e.g. for GL2, GL3bc and GL3 if they _depend_ on GL4 (-> ARB_texture_view ?) .. etc. Note that the wording 'written against GL4' does not necessarily mean they require GL4. See the jogl/make/config/jogl gluegen config files, where exclusion etc is defined. After more bug fixing (OSX, .. etc) I will tackle 4.3. Well, I said this month, but in a good way, our many users reported many bugs which should be fixed ASAP. Thank you for your collaboration .. and hopefully you will be here to review and contribute more. ~Sven signature.asc (911 bytes) Download Attachment |
ARB_texture_view is already subsumed into GL4.3. So, following your guidelines, i shall not put it in, but waiting for you to publish GL4.3 support.
I can try to add other non-subsumed extensions though. Hope I dont get the weird GLDEBUGPROCARB bug this time. |
Administrator
|
On 02/25/2013 04:21 AM, kotloft [via jogamp] wrote:
> ARB_texture_view is already subsumed into GL4.3. So, following your > guidelines, i shall not put it in, but waiting for you to publish GL4.3 > support. > I can try to add other non-subsumed extensions though. Hope I dont get the > weird GLDEBUGPROCARB bug this time. BTW .. we support both ARB_debug_output and AMD_debug_output for a long time via jogamp.opengl.GLDebugMessageHandler internally, which invokes javax.media.opengl.GLDebugListener.messageSent(GLDebugMessage event); GL debugging can be controlled by GLContext's: - enableGLDebugMessage(boolean enable) - addGLDebugListener(GLDebugListener listener); - removeGLDebugListener(GLDebugListener listener); - glDebugMessageControl(..) - glDebugMessageInsert(..) Read the API docs and have a look at unit tests: com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug00NEWT com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug01NEWT ~Sven signature.asc (911 bytes) Download Attachment |
Sry for the delay.
I managed to make it pass the compilation and most unit tests. A few newt tests failed (program unresponding), I dont have enough knowledge about newt, so i cannot investigate the errors. No further tests are made at this point of time. Anyway, this is the diff file i made. New extensions are added to glext.h and gl3ext.h. You can review them if you have time. Hope they help. Thanks glext_diff3.patch gl3ext_diff3.patch |
Any news?
I still dont see any function for bindless textures, such as 1. Set Bindless vertex formats (glVertexFormatNV, glNormalFormatNV, glTexCoordFormatNV, etc for fixed functionality or glVertexAttribFormatNV for generic attributes) 2. Enable adequate client states (GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV - for vertex arrays, and GL_ELEMENT_ARRAY_UNIFIED_NV - for index arrays) 3. Create VBOs, grab the pointers and make them resident - glBufferData - glGetBufferParameterui64vNV - glMakeBufferResidentNV 4. Enable vertex attributes and set address range for the pointers - glEnableVertexAttribArray - glBufferAddressRangeNV(GL_VERTEX_ATTRIB_ARRAY_ADDR ESS_NV,...) - for attributes and - glBufferAddressRangeNV(GL_ELEMENT_ARRAY_ADDRESS_NV , ...) - for index or https://www.opengl.org/registry/specs/ARB/bindless_texture.txt New Procedures and Functions uint64 GetTextureHandleARB(uint texture); uint64 GetTextureSamplerHandleARB(uint texture, uint sampler); void MakeTextureHandleResidentARB(uint64 handle); void MakeTextureHandleNonResidentARB(uint64 handle); uint64 GetImageHandleARB(uint texture, int level, boolean layered, int layer, enum format); void MakeImageHandleResidentARB(uint64 handle, enum access); void MakeImageHandleNonResidentARB(uint64 handle); void UniformHandleui64ARB(int location, uint64 value); void UniformHandleui64vARB(int location, sizei count, const uint64 *value); void ProgramUniformHandleui64ARB(uint program, int location, uint64 value); void ProgramUniformHandleui64vARB(uint program, int location, sizei count, const uint64 *values); boolean IsTextureHandleResidentARB(uint64 handle); boolean IsImageHandleResidentARB(uint64 handle); // Inherited from NV_vertex_attrib_integer_64bit: void VertexAttribL1ui64ARB(uint index, uint64EXT x); void VertexAttribL1ui64vARB(uint index, const uint64EXT *v); void GetVertexAttribLui64vARB(uint index, enum pname, uint64EXT *params); |
Administrator
|
Please look at the bug reports to check whether there is already a bug report about that and talk to Sven on IRC. Maybe it's already planned. Sorry. Thanks for the reminder. Of course, it should be added into JOGL.
Julien Gouesse | Personal blog | Website
|
I just looked.. there is nothing unfortunately Thanks for the irc, I didnt know that |
Administrator
|
In reply to this post by elect
On 04/16/2015 11:42 AM, elect [via jogamp] wrote:
> Any news? > > I still dont see any function for bindless textures, such as - most has been subsumed by GL 4.5 - look in GL4 e.g.: > https://www.opengl.org/registry/specs/ARB/bindless_texture.txt > <http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/GL4.html#glGetTextureHandleARB%28int%29> Should be all complete! ~Sven signature.asc (828 bytes) Download Attachment |
It is funny.. if I search the jogl project cloned from your github, I find nothing, sven... I pulled from remote twice to be sure, but I cant see those functions there.. why? |
Administrator
|
These classes are generated, that's why you can't find them in the source code. Just build JOGL by following the instructions in our wiki and you'll see them.
Julien Gouesse | Personal blog | Website
|
What about VertexArrayVertexAttribOffsetEXT?
https://www.opengl.org/registry/specs/EXT/direct_state_access.txt the closest I got is glVertexArrayVertexBuffer + glVertexArrayAttribFormat |
Free forum by Nabble | Edit this page |