aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
Commit message (Collapse)AuthorAgeFilesLines
* MemoryObject: Use proper generics styleSven Gothel2012-02-231-1/+1
|
* Minor GL/GLContext additions / cleanups (GL_BGRA, isNPOTTextureAvailable())Sven Gothel2012-02-221-0/+4
| | | | | | | | - Subsume GL_EXT_texture_format_BGRA8888 -> GL, Added GLContext.isTextureFormatBGRA8888Available() - Movied generic isNPOTTextureAvailable() from GL -> GLContext, used by GL (desktop), added simplified impl. in GLES1/GLES2 (false/true)
* Misc Rename/Reloc; GLArrayData*/PMVMatrix enhancments; Test fixes/adds ↵Sven Gothel2011-08-221-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GearsES1/ES2) rename/reloc: - javax.media.nativewindow.util: DimensionReadOnly -> DimensionImmutable PointReadOnly -> PointImmutable RectangleReadOnly -> RectangleImmutable unified 'immutable' name as used within jogamp already - remove array handler from public API com.jogamp.opengl.util.GL*ArrayHandler -> jogamp.opengl.util.GL*ArrayHandler - GLArrayData: Clarify method names getComponentNumber() -> getComponentCount() getComponentSize() -> getComponentSizeInBytes() getElementNumber() -> getElementCount() getByteSize() -> getSizeInBytes() - FixedFuncPipeline: Moved def. array names to GLPointerFuncUtil enhancement: - GLArrayDataServer: Add support for interleaved arrays/VBO - GLArrayData*.createFixed(..) remove 'name' argument (non sense for fixed function) - PMVMatrix: - one nio buffer - removed 'Pmv' multiplied matrix - removed 2x2 cut down 'Mvi' normal matrix (use 4x4 Mvi) - tests: - RedSquare -> RedSquareES1/RedSquareES2 - Gears ES1 fixed + ES2 added. Both work properly and share common Gears VBO construction - Added TestMapBuffer01NEWT, testing glMapBuffer
* JOGL: Add GLBase::isGLES2Compatible()Sven Gothel2011-07-311-0/+4
| | | | | Indicates whether this GL object is compatible with OpenGL ES2, i.e. has the extension <code>GL_ARB_ES2_compatibility</code>
* GLBuffers fix ; GL imageSizeInBytes fix / unit tests.Sven Gothel2011-06-091-54/+0
| | | | | | | | | | - Moved implementation of prev GL imageSizeInBytes(..) -> GLBuffers.sizeof() for all GL profiles - GLBuffers.*: Added missing formats and types (GL2.1, GL3.3 and GL4.1) - GLBuffers.sizeof(): Fail fast if format/type is unhandled, or alignment invalid - Added unit test for GLBuffers.sizeof()
* FIX: Refactor GLArrayData and all it's implementations/sub-interfaces (VBO ↵Sven Gothel2011-04-081-4/+4
| | | | | | | | | | target, comments, names) VBO target: Allowing ELEMENT_VERTEX_ARRAY w/o corresponding GLSL/Fixed attribute Names: Clarified method named. Comments: Added and fixed comments
* Fix buffer size: 64bit GLBufferSizeTracker, hash over addr+size, save ↵Sven Gothel2010-11-061-40/+23
| | | | | | | | | | fail-fast hash cache, .. Relates to GlueGen 6b6b9b3b81cdc85b7260664ebec547756a6be5d7, branch sgothel_wip_fixes01. Memory object size is ptrdiff_t, hence long (64bit). The hash value must include size as well, otherwise boundaries cannot be verified. (security) Double check hash collisions while adding a new MemoryObject.
* Fix file modesSven Gothel2010-07-071-0/+0
|
* Fix: Locking/Threading; Common IntIntHashMap and Buffers; Fix: ↵Sven Gothel2010-06-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glMap*Buffer*; GLX/WGL/CgGL: All runtime dynamic; Misc .. TODO: Compile and test on MacOSX .. Fix: ===== Multithreading/Locking: See jogl/doc/Implementation/MultiThreading.txt - Locking layer is not platform agnostic, ie GLContextImpl, GLDrawableImpl, .. and NEWT: Window/Display - No more use of JAWT global lock necessary, removed. - No need for X11 Display lock, on the contrary, this made the NV driver hang. - Use common window/surface lock - All NativeWindow surfaceLock's are recursive now glMapBuffer: If size is 0, don't do cont with the native call. glMapBufferRange: Fix capacity. glNamedBufferDataEXT: Track the size. glMapNamedBufferEXT: Manual impl. - use the tracked size glXGetVisualFromFBConfig, glXChooseFBConfig, glXChooseVisual: Instead of ignoring and implement a renamed version (*Copied), we just use ManualImplementation for the proper copy-result code. DesktopGLDynamicLookupHelper: Initialize _hasGLBinding* attributes in the determing loadGLJNILibrary() method, which is called by super(). Otherwise static init will overwrite them after the super() call. X11GLXDrawableFactory: Don't release anything at shutdown (removed sharedContext.destroy()), since this caused a freeze/SEGV sometimes. Fixed NEWT's reparentWindow() functionality incl NewtCanvasAWT usage. - Native: if not visible, don't focus, etc - NewtCanvasAWT: Use the container size to start with - Run the command on the EDT Using GlueGen's new DynamicLibraryBundle utility: - X11, Windows and MacOSX OpenGL adapted to DynamicLibraryBundleInfo. - X11GLXDynamicLookupHelper -> X11GLXDynamicLibraryBundleInfo - Remove all path from lib names. - GL order: libGL.so.1, libGL.so, GL - shallLinkGlobal: true -> to server some 'old' DRI systems -> http://dri.sourceforge.net/doc/DRIuserguide.html - shallLookupGlobal: false - Try both : glXGetProcAddressARB and glXGetProcAddress - Using bootstrap: GLX.glXGetProcAddress(long glxGetProcAddressHandle, String glFuncName) Found the issue with LIBGL_DRIVERS_PATH, ie if not set no valid GL instance can be found (ie ATI fglrx/DRI). This may happen if using a differen user than the desktop user for whom the env var is set within some /etc/X11/Xsession.d/ script. Enhancements: ============= GLBufferSizeTracker: Use IntIntHashMap and add DirectState size tracking. GLBufferStateTracker: Use IntIntHashMap. GLStateTracker: Use IntIntHashMap. GLDynamicLookupHelper: More generic (global loading/lookup and GetProcAddress function name list), remove redundant code. FIXME: MacOSXCGLDynamicLookupHelper: - Not tested - Not using NSImage lookup anymore as recommended by OSX API Doc, so dlsym is used always (to be tested) WindowsWGLDynamicLookupHelper: - Not tested GLX/WGL/CgGL is all runtime-dynamic as now, ie loaded and looked-up at runtime, no compile time dependencies to GL anymore, nor a need to specify CgGL. Split up WGL in GDI and WGL, to allow proper dynamic runtime linkage of OpenGL32 while using static binding to GDI32 NEWT events generated by native code are enqueued and not send directly. This should ease locking mechanisms .. if any are necessary. NEWT: More platform specific code moved to *Impl method, simplifying the generic code of the superclass and impl protocol. Cleanup: ========= Replace all InternalBufferUtil's with com.jogamp.common.nio.Buffers Removed all InternalBufferUtil's from repository Removed GLContextImpl notion of 'optimized' surface locking, where the surface gets unlocked during makeCurrent/release. This just makes no sense and would impact multithreading in a horrible way.
* JOGL GL4 preperation (cont):Sven Gothel2010-04-201-41/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - All available OpenGL versions (native/platform) are verified at GLProfile initialization and can be queried .. A mapping of major,compat -> major,minor,options is created. - Removal of temp context creation, when creating a context. This was necessary to query general availability of ARB_create_context. Due to the shared context of X11GLXDrawableFactory and WindowsWGLDrawableFactory, this is no more necessary. Due to the version mapping, the ARB_create_context paramters are known. - NativeWindow X11Lib: Added X11ErrorHandler, throwing a RuntimeException. Necessary to catch BadMatch .. etc X11 errors, eg for glXCreateContextAttribsARB Hence all X11 calls are covered now. - X11DummyGLXDrawable needs to use an own Window, otherwise GLn n>2 fails - Flattening the desktop GL* implementation, all use GL4bcImpl, which reduces the footprint dramatically. - GL*Impl.isGL*() (desktop) utilizes the GLContext.isGL*(), hence the results reflect the actual native context version. - GLContextImpl makeCurrent/create: Added workflow documentation, clarified code, defined abstract methods to have a protocol. - Removed moved files (from here to gluegen), see gluegen a01cb3d59715a41153380f1977ec75263b762dc6 - NativeLibLoader -> <TYPE>JNILibLoader - Fixed Exception Handling (as in gluegen bce53b52c8638729750c4286dbc04cb14329fd34), ie removed empty catch Throwable .. - GLContext.setSwapInterval(): Nop in offscreen case, otherwise X11IOError (NVIDIA Bug) Test: Tests - Junit - demos.gears.Gears - demos.jrefract.JRefract Platforms - Linux 64/32 ATI/NVidia - MacOsX - Windows (virtualbox 3.1.6, offscreen failed) TODO/BUGS: - FIXME ATI GLn n>2 with AWT, can't make context current, works well on NVIDIA though - FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available! - Add GL 3.3 to GL3/gl3ext.h - Add GL 4.0 to GL3/gl3ext.h and fix the GL3/GL4 seperation - Rename jogl.gl2.jar -> jogl.gldesktop.jar (as done with it's native lib already)
* JOGL GL4 preperation:Sven Gothel2010-04-161-0/+16
| | | | | | | | | | | | | | - Re-Enable GL3bc native library build, works .. - Adding all the is/get GL4/GL4bc stubs .. - Adding dummy interface GL4 and GL4bc, will be removed when done - Context creation refactoring: - Move Version information to GLContext - Determine version by creation if possible (ARB_create_context), only use the unreliable GL_VERSION string if necessary. - Offering an almost platform independent ARB_create_context path: - createContextARBImpl - platform dependent GLX calls - createContextARB - platform independent setup and version loop
* Add OpenGL 3.x compatibility profile GL3bc,Sven Gothel2009-10-181-2/+10
| | | | | | | | | | | where 'bc' is not a religious remark, but simply means 'backward compatible' :) GL3bc := GL2 + GL3, hence the interface does not define any new values or methods. Moved GL3's 3.1 part from gl3.h to gl3ext.h, so it can be included in gl3bc.c, besides gl2.h.
* All tracker are aggregated in the GLContext nowSven Gothel2009-10-171-2/+5
| | | | | | | | | | | | | | | and used within the GL*Impl. New GLStateTracker: - Tracking client/server states - Currently supports PixelStorei - Prologued in glPixelStorei and glGetIntegerv, the latter will return the tracked state if available and not call the GL method. Impacts performance and ES1 compatibility (supports ALIGNMENT). Fixed 'imageSizeInBytes' calculation: - skipPixels and skipRows is a static one time offset
* Update GlueGen to 7dc9c5601d5689dcbc003ca51cfe826942ea3e6b (latest)Sven Gothel2009-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | - Fixes for OpenGL 3.2 - More strict define/function checking - Better documentation in source code: extension relation - GL extension marker exclusion is done by GlueGen now - Adapted gluegen cfg files Added OpenGL 3.2 extensions for GL3 Revalidation of all OpenGL 2.0/3.0/3.1 and 3.2 extensions GL2GL3 based on OpenGL 2.0/3.0 headers EGL shares common egl-common.cfg file Removed experimental java system property 'jogl.GLContext.3_2', try a 3.2 context in case of GL3. X11GLXContext: - Always try to make a created context current, to verify it's usability. This is different than under WGL. - Temporary removed usage: GLX.GLX_CONTEXT_PROFILE_MASK_ARB NV driver bug.
* Fix SwapInterval (return value, check ctx current, egl), add getSwapInterval.sg2158892009-07-301-0/+4
|
* Fixed GL* documentation. Moved common GL functions to GLBase. Moved ↵sg2158892009-07-291-8/+8
| | | | glAllocateMemoryNV to GL2GL3 only. Add GL2GL3 interface. Fix some GL2 signatures. BroadcomEGL disable custom setSize().
* Copied JOGL_2_SANDBOX r1957 on to trunk; JOGL_2_SANDBOX branch is now closedKenneth Russel2009-06-151-0/+355
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1959 232f8b59-042b-4e1e-8c03-345bb8c30851