aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/gluegen
Commit message (Collapse)AuthorAgeFilesLines
* Bug 890 - Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and mappings; ↵Sven Gothel2013-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | Validate isGLES*() usage and definition ; Add and use ShaderCode.createExtensionDirective(..) - Fix GLES3 Profile Mapping, i.e. GL2ES2 queries and mappings - GLProfile: Add GL2ES2 -> ES3 mapping - EGLContext: Reuqest major '3' for ES3 - EGLGLCapabilities/EGLGraphicsConfiguration: Consider EGLExt.EGL_OPENGL_ES3_BIT_KHR - Validate isGLES*() usage and definition - Fix BuildComposablePipeline's isGLES() code - For GLSL related queries use isGLES() instead of isGLES2(), which would exclude ES3 - Add and use ShaderCode.createExtensionDirective(..) - Supporting creating GLSL extension directives while reusing strings from GLExtensions - Minor cleanup of GLContextImpl.setGLFuncAvail(..)
* Bug 876: BuildComposablePipeline: getGL*() shall not return ↵Sven Gothel2013-10-291-13/+20
| | | | | | | | | | | | | | | | | | | downstream.getGL*() [TraceGL* / DebugGL*] ; Simplify GLContextImpl's set Debug/Trace Pipeline Regression of commit 0002fccdcd6383874b2813dc6bbe3e33f5f00924: "Trace/Debug shall utilize downstream identification for isGL*() and getGL*() methods." Using the downstream identification commit is right for the isGL*() case, however, getGL*() returned the downstream object which makes the caller loosing the pipeline! Instead, we shall produce !GEN_GL_IDENTITY_BY_ASSIGNABLE_CLASS: "if( isGL<type>() ) { return this; } throw new GLException("Not a <type> implementation");" or for GEN_GL_IDENTITY_BY_ASSIGNABLE_CLASS: "return this;"
* jogl: indent trace statements in the Trace pipelines when we hit glBeginHarvey Harrison2013-10-231-0/+3
| | | | | | | | | The indent was being reduced on glEnd/glEndList but was never being incremented. The intent appeared to be to indent all statements between glBEgin/glEnd pairs to show the nested context of those calls. Add the increment after printing the glBegin trace statement. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: add final to Debug wrapper error code and fix indentationHarvey Harrison2013-10-231-4/+6
| | | | | | Make the indentation consistent in each function wrapper. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: pass format and arguments directly to the printGLError functionHarvey Harrison2013-10-221-7/+11
| | | | | | | This saves us a bit more code size as the String.format is now in the common helper rather than in every GL wrapper function. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: save on class size in the Debug pipelinesHarvey Harrison2013-10-221-11/+22
| | | | | | | Using a format String and arg list produces smaller class files for the Debug classes as many of the format strings are identical and shared. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: do not generate an extra String for the Debug pipeline wrappersHarvey Harrison2013-10-221-4/+4
| | | | | | | | Build the caller string directly and don't wrap it in an extra constructor. Update the indentation level for the newly added if-block from the previous commit. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: change code generation for Debug pipelines to avoid building large stringsHarvey Harrison2013-10-221-15/+11
| | | | | | | | | - split the check for a GL error from the output of the error string - only build the caller String when there is an error to report - wrap String building in an if() block rather than using an early return as we don't know the return type in the postDownstreamCallHook Signed-off-by: Harvey Harrison <[email protected]>
* jogl: use .format() to build the method signature when generating pipeline codeHarvey Harrison2013-10-211-8/+4
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: adapt code generator to output @Override annotations in various placesHarvey Harrison2013-10-211-1/+2
| | | | | | | This adds the @Override to methods in the GL implementations (debug, trace, etc) for methods implementing a GL Profile. It also adds @Override for the toString() method. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: add missing @Override annotationsHarvey Harrison2013-10-175-0/+42
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: remove all trailing whitespaceHarvey Harrison2013-10-1710-140/+140
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Bug 852: Remove CPU sourced data API entry where not allowed (ES3 and GL ↵Sven Gothel2013-10-102-6/+27
| | | | | | | | | | | | | | | | | | | | | | | core >= 3.0) ; GL2 cfg: Ignore GL2ES3 symbols (super) Remove CPU sourced data API entries via new config 'BufferObjectOnly <name>', listed in 'gl-common-gpubufferonly.cfg' and included in ES3 and all GL core >= 3 interfaces. If BufferObjectOnly is defined for a function, only the 'long offset' variant is being emitted. Due to limitations of GlueGen's 'ExtendedInterfaceSymbolsIgnore A.java', which only identifies the function name and not the signature - all CPU sourced variants are manually added to the compatibility and ES2 GL profiles via '*-common-cpubufferJavaCode.java' files. GLContext: Added 'isCPUSourcedAvail()' to determine whether context allows CPU sourced data, i.e. for GL2ES1 and GLES2 ctx. GLContext/GLProfile/GL: isGLES2() now returns false if having a ES3 context due to 'CPU sourced' incompatibility! +++ GL2 cfg: Added ignore GL2ES3 symbols of it's superclass, removing duplicated symbols.
* Bug 789: glDrawArraysIndirect and glDrawElementsIndirect are using ↵Sven Gothel2013-10-062-2/+6
| | | | GL_DRAW_INDIRECT_BUFFER, add VBO variant and range-check
* GL*, GLContext: Expose isGL2ES3() and getGL2ES3() for convenience.Sven Gothel2013-09-031-0/+2
|
* Fix Bug 815: GL*: Change glIs<Buffer>Enabled() -> glIs<Buffer>Bound() to ↵Sven Gothel2013-08-141-2/+2
| | | | | | | | | | | | | | | | reflect semanics - Also fix the exception message (enabled/disabled -> bound/unbound) Reason of change: Avoid confusion and point to the cause! API change: glIsVBOArrayEnabled() -> glIsVBOArrayBound() glIsVBOElementArrayEnabled() -> glIsVBOElementArrayBound() glIsPBOPackEnabled() -> glIsPBOPackBound() glIsPBOUnpackEnabled() -> glIsPBOUnpackBound() Exception message change: "must be enabled to call this method" -> "must be bound to call this method" "must be disabled to call this method" -> "must be unbound to call this method"
* GL*: Expose isGL*Core(); GLContext: isGL*() API doc cleanup - align queries.Sven Gothel2013-07-161-0/+12
|
* Only use base pipelines for Trace/Debug, mock others (ES2, GL2, ..); ↵Sven Gothel2013-07-161-34/+82
| | | | | | | | | | | | | | | | | | | BuildComposablePipeline: Unify GL identify methods - Only use base pipelines for Trace/Debug, mock others (ES2, GL2, ..) The Trace/Debug generated pipelines consume quite some space and only the actual GL*Impl pipeline is actually required. To make this work, we have to identify the GL type via it's downstream instance to implement isGL*() and getGL*() methods, see below! Adding dummy Trace/Debug type wrapper for GL2, GL3, GL3bc, GL4 and GLES2. BuildComposablePipeline: Unify GL identify methods As described above, Trace/Debug shall utilize downstream identification for isGL*() and getGL*() methods. Custom types, like FixedFuncImpl may choose to be identified by their class inheritance, by passing command-line argument 'gl_identity_by_assignable_class'.
* Fix BuildComposablePipeline's isGL*/getGL* ; GLBase: ↵Sven Gothel2013-07-151-13/+36
| | | | | | | | | | | | | | | | getDownstreamGL()/getRootGL(); GLContext.isGL* added proper API doc., isGL3core()/hasNoDefaultVAO() and getDefaultVAO(). - Fix BuildComposablePipeline's isGL*/getGL* (regression of commit 3a0d7703da32e9a5ddf08a334f18588a78038d880) - GLBase: getDownstreamGL()/getRootGL() Allows user traversing through pipelined GL instances. Also added getRootGL() to GLContext. - GLContext.isGL* added proper API doc.: We test the actual context, not the profile. - GLContext isGL3core()/hasNoDefaultVAO() and getDefaultVAO() - Move isGL3code() def. back to pre 3a0d7703da32e9a5ddf08a334f18588a78038d880, i.e. Includes [ GL4, GL3 ] w/o GLES3. - Added hasNoDefaultVAO() and getDefaultVAO() .. incl. [ GL4, GL3, GLES3 ]
* Add Support for GL 4.3 (Bug 716) and ES 3.0 (Bug 717)Sven Gothel2013-07-154-55/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ES3 / GL4.3: - Update all EGL, GLX, WGL and GL (desktop and mobile) khronos headers to latest version. - GL3/gl3* -> GL/glcorearb* - Explicitly preserve ES2_compatibility and ES3_compatibility in header, most extension grouping was removed in new headers. - Always load all GLHeader to ensure proper extension association across all profiles. - Unified method signatures - Added GL_EXT_map_buffer_range to core - Using common 'glMapBufferImpl(..)' for all glMapBuffer(..) and glMapBufferRange(..) impl. - Init necessary fields of GL instances via 'finalizeInit()' called by reflection, if exist. This allows removing initialization checks, i.e. for all buffer validations. - BuildStaticGLInfo: Can handle new GL header structure, i.e. one CPP extenstion block incl. define + funcs. - GLJavaMethodBindingEmitter: Simply print the - No GL duplication due to new intermediate interfaces, see below - OO lineare inheritance (Added GL2ES3, GL3ES3 and GL4ES3 intemediates): GLBase - GL - GL2ES2 - GLES2 GLBase - GL - GL2ES2 - GL2GL3 - [ GL2, GL3 ] GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - [ GL3 ] GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - GL4ES3 - [ GLES3, GL4, .. ] - Expose 'usable' intermediate interfaces GL3ES3 and GL4ES3 in GLBase/GLProfile/GLContext via is*() and get*(). - GLContext*: - isGL3core() is true if [ GL4, GL3, GLES3 ] (added GLES3) - Added ctxProfile argument to allow handling ES versions: - getMaxMajor(..), getMaxMinor(..), isValidGLVersion(..) and decrementGLVersion(..) - mapGLVersions(..) prepared for ES ARB/KHR validation - EGLContext checks ES3 (via old ctx's GL_VERSION) - ExtensionAvailabilityCache adds GL_ES_Version_X_Y for ES. - Prelim tests w/ Mesa 9.1.3 GL Version 3.0 (ES profile, ES2 compat, ES3 compat, FBO, hardware) - OpenGL ES 3.0 Mesa 9.1.3 [GL 3.0.0, vendor 9.1.3 (Mesa 9.1.3)] - TODO: - Use KHR_create_context in EGLContext.createContextARBImpl(..) - More tests (Mobile, ..) +++ Misc: - GLContext*: - Complete glAllocateMemoryNV w/ glFreeMemoryNV.
* GLEmitter: Better use of priviledged block in generated ↵Sven Gothel2013-06-231-24/+20
| | | | GL*ProcAddressTable's isFunctionAvailableImpl(..), getAddressFor(..)
* GL*ProcAddressTable: Fix regressions: getField(..) -> getDeclaredField(..), ↵Sven Gothel2013-06-211-8/+23
| | | | incl. access check; Move getAddressFor() from ctx -> private dbg-handler (sec); FFMPEGMediaPlayer: Missed fetching func-ptr 'glTexSubImage2D'.
* GL ProcAddressTable: Align w/ GlueGen commit ↵Sven Gothel2013-06-211-17/+41
| | | | f69831574d4927d03d40c330d0b047d8c89622a4 (checkAllLinkPermission() ..)
* jogl: remove executable bit from some java files and a pngHarvey Harrison2013-04-094-0/+0
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* SWT Update: SWT GLCanvas creates lazy when resource is ready; Create new ↵Sven Gothel2012-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | NewtCanvasSWT allowing to parent NEWT windows natively. SWT GLCanvas creates lazy when resource is ready - Ensures drawable and context are created when size > zero and native visualID is valid. The latter is platform dependent. - Note that you cannot utilize custom GLCapabilities w/ this one, since the configurations is already realized - use NewtCanvasSWT. Create new NewtCanvasSWT allowing to parent NEWT windows natively: - Similar to NewtCanvasAWT - Allows attaching / detaching NEWT windows NewtCanvasAWT: Public setNEWTChild(..) fixed Added test cases for the above - tested on Linux, OSX and Windows w/ SWT Note: As usual for OSX, add -XstartOnFirstThread Details: - NEWT Display has new method: 'EDTUtil setEDTUtil(EDTUtil)' allowing to set a custom event dispatch utility. We use this to set our SWTEDTUtil for using NEWT w/ SWT complying w/ SWT threading constraints.
* Bug 599 - FBObject / Offscreen Support - Part 1Sven Gothel2012-07-195-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - New FBObject implementation handling FBO and it's attachments *** API CHANGE: Util -> Core *** while it's size and sample-count can be reconfigured on the fly. - com.jogamp.opengl.util.FBObject -> com.jogamp.opengl.FBObject - agnostic to texture unit - separate attachments using OO hierarchy reflecting FBO - handling MSAA and blitting - no FBO destruction for reconfig (attach/detach) - New GLFBODrawableImpl impl. an FBObject based GLDrawable - Instantiated by a dummy native surface (onscreen and invisible) hooked up to a dummy GLDrawable, which is the delegation for context creation. - Utilizies ProxySurface.UpstreamSurfaceHook for dummy surface avoiding specialization for native platforms. - TODO: Allow to utilize common surface interface as a dummy-surface to supporting API seperation of windowing/GL. The latter allows impl. of createGLDrawable(NativeSurface) with FBO. - New OffscreenAutoDrawable (extends GLAutoDrawableDelegate) for all offscreen drawables. Shall replace GLPbuffer. - New GLCapabilities*.isFBO() / setFBO(boolean) to request FBO offscreen, similar to isPBuffer(). Rule: if both are requested, FBO shall be favored. - GLContext adds raw FBO availability query (min. FBO avail), FBObject contains fine grained queries (TODO: Move parts to GLContext for efficiency). - Add framebuffer tracking, allowing fast querying: - GLBase/GLContext: public int getBoundFramebuffer(int target); public int getDefaultDrawFramebuffer(); public int getDefaultReadFramebuffer(); - GLContextImpl public final void setBoundFramebuffer(int target, int framebufferName) .. called by GL impl bind framebuffer - GL: getDefaultDrawFramebuffer(), getDefaultReadFramebuffer() Adding default framebuffer queries being issued by GL.glBindFramebuffer(target, 0) w/ a default framebuffer, o.e. zero. This allows a transparent use of a custom FBO even in case the applications attempts to reset FBO to zero. Value flow: GL <- GLContext <- GLDrawable, - GLCapabilities handle fbo/pbuffer seperate, don't disable the other - GLContext/GL track read/write framebuffer to be queried by FBObject to determine whether to bind/unbind a framebuffer - Test cases for multiple FBO w/ and w/o MSAA Other Features: - New interface ProxySurface.UpstreamSurfaceHook, allowing to hook an upstream surface of unknown type providing lifecycle and information (size, ..) callbacks. Used for all new dummy NativeSurface impl and SWT GLCanvas. - GLContext -> GLDrawable propagation context/drawable lifecycle via ProxySurface.UpstreamSurfaceHook allowing dynamic resources to react (create, init, ..) - contextRealized() - contextMadeCurrent() - SurfaceChangeable -> MutableSurface currently only contains setting the surface handle. TODO: May need to move ProxySurface.UpstreamSurfaceHook -> MutableSurface.UpstreamSurfaceHook, allowing other impl. classes (NEWT OffscreenWindow) to utilize the new upstream hookup mechanism - will allow FBO/Dummy window to work. - SWT GLCanvas using ProxySurface.UpstreamSurfaceHook for proper size propagation. - New GLAutoDrawable::getUpstreamWidget(), allowing GLEventListener to fetch the owning Java side UI element (NEWT, SWT, AWT, ..). - GLDrawableFactory: Removed createOffscreenSurface() - unused and not GL related - EGLDrawableFactory handles device/profile avail. mapping while actually creating context/drawable. This allows us to learn whether the ES context is software/hardware as well as FBO avail. - EGLDrawable: Removed secret buckets of EGL configs :) Employ native surface (X11, WGL, ..) to EGL 'mapping' in EGLDrawableFactory utilizing new EGLUpstreamSurfaceHook (implements ProxySurface.UpstreamSurfaceHook). Other Bugs: - Add CTX_OPTION_DEBUG to ctx/extension cache key since only a debug ctx may expose the ARB debug capability. This bug caused lack of ARB/AMD debug functionality. - Fix GLProfile deadlock (debug mode, w/ EGL/ES, no X11), dump availability information _after_ lock. - ImmModeSink draw(): Use GL's glDrawElements(..), don't cast for GL2ES1. Fixes use for GL2ES2. - Fix KeyEvent.getKeyChar() comment (-> only stable for keyTyped(..)) Misc: - Refined alot of API doc - New GLExtensions holds commonly used GL extension strings, allows better referencing and usage lookup. - Move GL (interface) decl. to GLBase - GLBuffers: Cleanup API doc (format, types) - TextureIO: Add PAM and PPM static suffix identifier - GLCapabilities getNumSamples() returns 0 if sampleBuffers is disabled, this seems to be more natural. - finalized a lot
* StringBuffer -> StringBuilder (Local objects, no concurrency) ; Impacts: ↵Sven Gothel2012-04-161-3/+3
| | | | Capabilities/GLContext API 'toString(StringBuilder)'
* Mark JOGL/GlueGen NativeSignature*Emitter 'to be reviewed' and adapt it to ↵Sven Gothel2012-03-222-7/+12
| | | | GlueGen commit 3d527ea538c9e9897f86a0f6bdae0cab44d239c3
* GLGLuegen: Enhance debug/analysis code and API commentsSven Gothel2012-02-154-41/+94
| | | | | | | | | | | | | - Use Gluegen.debug() setting - BuildStaticGLInfo.getExtension(name) returns a set of all extension where name occurs - GLConfiguration.shouldIgnoreExtension() reflects all extensions, inclusive the renames one and gives a warning in case the symbol belongs to multiple extension - in debug mode! - API comment: List all extensions, incl. the one from the renames, this allows having a proper list to which extensions the define/function belongs to.
* JOGL: Add GLBase::isGLES2Compatible()Sven Gothel2011-07-311-0/+3
| | | | | Indicates whether this GL object is compatible with OpenGL ES2, i.e. has the extension <code>GL_ARB_ES2_compatibility</code>
* Use GlueGen Platform's OSType enumSven Gothel2011-07-214-0/+4
|
* JOGL/GLDebug/GLTrace: Gluegen/BuildComposablePipeline: print arguments in ↵Sven Gothel2011-05-171-6/+10
| | | | debug pipe; common param print
* Move implementation private files from com.jogamp.<module>.impl. to ↵Sven Gothel2011-02-091-1/+1
| | | | | | | | | | | | | | | jogamp.<module> (2/2) - edit files - com.jogamp.opengl.impl -> jogamp.opengl - com.jogamp.opengl.util.glsl.fixedfunc.impl -> jogamp.opengl.util.glsl.fixedfunc - com.jogamp.nativewindow.impl -> jogamp.nativewindow - com.jogamp.newt.impl -> jogamp.newt This sorts implementation details from the top level, ie skipping the public 'com', allowing a better seperation of public classes and implementation details and also reduces strings. This approach of public/private seperation is also used in the OpenJDK.
* Reformated license tag; Added Khronos licenseSven Gothel2010-11-081-29/+27
|
* Fix imports ..Sven Gothel2010-11-077-32/+82
|
* Fix NativeSignatureJavaMethodBindingEmitter usage; Fix importsSven Gothel2010-11-071-11/+9
|
* Gluegen parts in src/gluegen (clean)Sven Gothel2010-11-0710-0/+3550
- Adding gluegen-gl.jar for GlueGen GL compile time parts. - Removed dead build-gluegen.xml - Adding com/jogamp/gluegen/runtime/opengl/* to jogl core - Moved gluegen gl part to jogl/classes