summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-06-27 05:40:32 +0200
committerSven Gothel <[email protected]>2012-06-27 05:40:32 +0200
commit4e2fb5389d22f2b16c1678843d4e31dd948c7902 (patch)
tree49df6dd262394b452877e9ec6a39e8a3a286b0bf /src/jogl/classes/jogamp/opengl/egl/EGLContext.java
parent1d9ce79f9e396599b2503f385c74bd132bf88fed (diff)
Misc cleanup: Add @Override, remove trailing whitespace
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLContext.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLContext.java47
1 files changed, 33 insertions, 14 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
index f5f9f62c4..06cd550b4 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
@@ -1,22 +1,22 @@
/*
* Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
* Copyright (c) 2011 JogAmp Community. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* - Redistribution of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* - Redistribution in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* Neither the name of Sun Microsystems, Inc. or the names of
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,7 +29,7 @@
* DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
* ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
* SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
+ *
* Sun gratefully acknowledges that this software was originally authored
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
@@ -75,7 +75,8 @@ public abstract class EGLContext extends GLContextImpl {
// no inner state _eglExt = null;
super.resetStates();
}
-
+
+ @Override
public Object getPlatformGLExtensions() {
return getEGLExt();
}
@@ -87,6 +88,7 @@ public abstract class EGLContext extends GLContextImpl {
return _eglExt;
}
+ @Override
public final ProcAddressTable getPlatformExtProcAddressTable() {
return eglExtProcAddressTable;
}
@@ -95,14 +97,18 @@ public abstract class EGLContext extends GLContextImpl {
return eglExtProcAddressTable;
}
+ @Override
protected Map<String, String> getFunctionNameMap() { return null; }
+ @Override
protected Map<String, String> getExtensionNameMap() { return null; }
+ @Override
public final boolean isGLReadDrawableAvailable() {
return true;
}
+ @Override
protected void makeCurrentImpl() throws GLException {
if(EGL.EGL_NO_DISPLAY==((EGLDrawable)drawable).getDisplay() ) {
throw new GLException("drawable not properly initialized, NO DISPLAY: "+drawable);
@@ -118,6 +124,7 @@ public abstract class EGLContext extends GLContextImpl {
}
}
+ @Override
protected void releaseImpl() throws GLException {
if (!EGL.eglMakeCurrent(((EGLDrawable)drawable).getDisplay(),
EGL.EGL_NO_SURFACE,
@@ -128,6 +135,7 @@ public abstract class EGLContext extends GLContextImpl {
}
}
+ @Override
protected void destroyImpl() throws GLException {
if (!EGL.eglDestroyContext(((EGLDrawable)drawable).getDisplay(), contextHandle)) {
final int eglError = EGL.eglGetError();
@@ -138,14 +146,17 @@ public abstract class EGLContext extends GLContextImpl {
}
}
+ @Override
protected long createContextARBImpl(long share, boolean direct, int ctp, int major, int minor) {
return 0; // FIXME
}
+ @Override
protected void destroyContextARBImpl(long _context) {
// FIXME
}
+ @Override
protected boolean createImpl(GLContextImpl shareWith) throws GLException {
long eglDisplay = ((EGLDrawable)drawable).getDisplay();
EGLGraphicsConfiguration config = ((EGLDrawable)drawable).getGraphicsConfiguration();
@@ -178,7 +189,7 @@ public abstract class EGLContext extends GLContextImpl {
}
}
- final IntBuffer contextAttrsNIO;
+ final IntBuffer contextAttrsNIO;
{
final int[] contextAttrs = new int[] {
EGL.EGL_CONTEXT_CLIENT_VERSION, -1,
@@ -200,7 +211,7 @@ public abstract class EGLContext extends GLContextImpl {
}
if (DEBUG) {
System.err.println(getThreadName() + ": Created OpenGL context 0x" +
- Long.toHexString(contextHandle) +
+ Long.toHexString(contextHandle) +
",\n\twrite surface 0x" + Long.toHexString(drawable.getHandle()) +
",\n\tread surface 0x" + Long.toHexString(drawableRead.getHandle())+
",\n\t"+this+
@@ -218,13 +229,14 @@ public abstract class EGLContext extends GLContextImpl {
if(glProfile.usesNativeGLES2()) {
ctp |= CTX_IMPL_ES2_COMPAT;
major = 2;
- } else {
+ } else {
major = 1;
}
setGLFunctionAvailability(true, major, 0, ctp);
return true;
}
+ @Override
protected final void updateGLXProcAddressTable() {
final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration();
final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
@@ -255,16 +267,17 @@ public abstract class EGLContext extends GLContextImpl {
}
}
}
-
+
+ @Override
protected final StringBuilder getPlatformExtensionsStringImpl() {
- StringBuilder sb = new StringBuilder();
+ StringBuilder sb = new StringBuilder();
if (!eglQueryStringInitialized) {
eglQueryStringAvailable =
getDrawableImpl().getGLDynamicLookupHelper().dynamicLookupFunction("eglQueryString") != 0;
eglQueryStringInitialized = true;
}
if (eglQueryStringAvailable) {
- final String ret = EGL.eglQueryString(((EGLDrawable)drawable).getDisplay(),
+ final String ret = EGL.eglQueryString(((EGLDrawable)drawable).getDisplay(),
EGL.EGL_EXTENSIONS);
if (DEBUG) {
System.err.println("EGL extensions: " + ret);
@@ -289,8 +302,10 @@ public abstract class EGLContext extends GLContextImpl {
return EGL.eglSwapInterval(((EGLDrawable)drawable).getDisplay(), interval);
}
+ @Override
public abstract void bindPbufferToTexture();
+ @Override
public abstract void releasePbufferFromTexture();
protected static String toHexString(int hex) {
@@ -299,24 +314,28 @@ public abstract class EGLContext extends GLContextImpl {
protected static String toHexString(long hex) {
return GLContext.toHexString(hex);
}
-
+
//----------------------------------------------------------------------
// Currently unimplemented stuff
//
+ @Override
protected void copyImpl(GLContext source, int mask) throws GLException {
throw new GLException("Not yet implemented");
}
+ @Override
public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
throw new GLException("Should not call this");
}
+ @Override
public boolean offscreenImageNeedsVerticalFlip() {
throw new GLException("Should not call this");
}
+ @Override
public int getOffscreenContextPixelDataType() {
throw new GLException("Should not call this");
}