diff options
Diffstat (limited to 'ardor3d-core')
-rw-r--r-- | ardor3d-core/src/main/java/com/ardor3d/renderer/ContextCapabilities.java | 73 |
1 files changed, 53 insertions, 20 deletions
diff --git a/ardor3d-core/src/main/java/com/ardor3d/renderer/ContextCapabilities.java b/ardor3d-core/src/main/java/com/ardor3d/renderer/ContextCapabilities.java index 9599e0e..dd28ee6 100644 --- a/ardor3d-core/src/main/java/com/ardor3d/renderer/ContextCapabilities.java +++ b/ardor3d-core/src/main/java/com/ardor3d/renderer/ContextCapabilities.java @@ -3,7 +3,7 @@ * * This file is part of Ardor3D. * - * Ardor3D is free software: you can redistribute it and/or modify it + * Ardor3D is free software: you can redistribute it and/or modify it * under the terms of its license which may be found in the accompanying * LICENSE file or at <http://www.ardor3d.com/LICENSE>. */ @@ -76,6 +76,15 @@ public class ContextCapabilities { /** The max side of a texture supported. */ protected int _maxTextureSize = -1; + /** The max width of a viewport supported. */ + protected int _maxViewportWidth = -1; + + /** The max height of a viewport supported. */ + protected int _maxViewportHeight = -1; + + /** The max height of a viewport supported. */ + protected int _maxRenderBufferSize = -1; + protected float _maxAnisotropic = -1.0f; /** True if multitexturing is supported. */ @@ -159,6 +168,9 @@ public class ContextCapabilities { _maxGLSLVertexAttribs = source._maxGLSLVertexAttribs; _maxTextureLodBias = source._maxTextureLodBias; _maxTextureSize = source._maxTextureSize; + _maxViewportWidth = source._maxViewportWidth; + _maxViewportHeight = source._maxViewportHeight; + _maxRenderBufferSize = source._maxRenderBufferSize; _maxUserClipPlanes = source._maxUserClipPlanes; _numAuxDrawBuffers = source._numAuxDrawBuffers; _numFixedTexUnits = source._numFixedTexUnits; @@ -391,7 +403,7 @@ public class ContextCapabilities { /** * <code>getNumberOfAuxiliaryDrawBuffers</code> returns the total number of available auxiliary draw buffers this * context supports. - * + * * @return the number of available auxiliary draw buffers supported by the context. */ public int getNumberOfAuxiliaryDrawBuffers() { @@ -400,7 +412,7 @@ public class ContextCapabilities { /** * <code>getTotalNumberOfUnits</code> returns the total number of texture units this context supports. - * + * * @return the total number of texture units supported by the context. */ public int getTotalNumberOfUnits() { @@ -410,7 +422,7 @@ public class ContextCapabilities { /** * <code>getNumberOfFixedUnits</code> returns the number of texture units this context supports, for use in the * fixed pipeline. - * + * * @return the number units. */ public int getNumberOfFixedTextureUnits() { @@ -420,7 +432,7 @@ public class ContextCapabilities { /** * <code>getNumberOfVertexUnits</code> returns the number of texture units available to a vertex shader that this * context supports. - * + * * @return the number of units. */ public int getNumberOfVertexUnits() { @@ -430,7 +442,7 @@ public class ContextCapabilities { /** * <code>getNumberOfFragmentUnits</code> returns the number of texture units available to a fragment shader that * this context supports. - * + * * @return the number of units. */ public int getNumberOfFragmentTextureUnits() { @@ -440,7 +452,7 @@ public class ContextCapabilities { /** * <code>getNumberOfFragmentTexCoordUnits</code> returns the number of texture coordinate sets available that this * context supports. - * + * * @return the number of units. */ public int getNumberOfFragmentTexCoordUnits() { @@ -455,8 +467,29 @@ public class ContextCapabilities { } /** + * @return the max width of viewport that this context supports. + */ + public int getMaxViewportWidth() { + return _maxViewportWidth; + } + + /** + * @return the max height of viewport that this context supports. + */ + public int getMaxViewportHeight() { + return _maxViewportHeight; + } + + /** + * @return the max size (in terms of # pixels) of renderbuffer that this context supports. + */ + public int getMaxRenderBufferSize() { + return _maxRenderBufferSize; + } + + /** * <code>getNumberOfTotalUnits</code> returns the number of texture units this context supports. - * + * * @return the number of units. */ public int getNumberOfTotalTextureUnits() { @@ -465,7 +498,7 @@ public class ContextCapabilities { /** * <code>getMaxFBOColorAttachments</code> returns the MAX_COLOR_ATTACHMENTS for FBOs that this context supports. - * + * * @return the number of buffers. */ public int getMaxFBOColorAttachments() { @@ -474,7 +507,7 @@ public class ContextCapabilities { /** * Returns the maximum anisotropic filter. - * + * * @return The maximum anisotropic filter. */ public float getMaxAnisotropic() { @@ -525,7 +558,7 @@ public class ContextCapabilities { /** * Returns if S3TC compression is available for textures. - * + * * @return true if S3TC is available. */ public boolean isS3TCSupported() { @@ -534,7 +567,7 @@ public class ContextCapabilities { /** * Returns if LATC compression is available for textures. - * + * * @return true if LATC is available. */ public boolean isLATCSupported() { @@ -543,7 +576,7 @@ public class ContextCapabilities { /** * Returns if generic (non-specific) compression is available for textures. - * + * * @return true if available. */ public boolean isGenericTCSupported() { @@ -552,7 +585,7 @@ public class ContextCapabilities { /** * Returns if Texture3D is available for textures. - * + * * @return true if Texture3D is available. */ public boolean isTexture3DSupported() { @@ -561,7 +594,7 @@ public class ContextCapabilities { /** * Returns if TextureCubeMap is available for textures. - * + * * @return true if TextureCubeMap is available. */ public boolean isTextureCubeMapSupported() { @@ -570,7 +603,7 @@ public class ContextCapabilities { /** * Returns if AutomaticMipmap generation is available for textures. - * + * * @return true if AutomaticMipmap generation is available. */ public boolean isAutomaticMipmapsSupported() { @@ -652,7 +685,7 @@ public class ContextCapabilities { /** * Returns the vendor of the graphics adapter - * + * * @return The vendor of the graphics adapter */ public String getDisplayVendor() { @@ -661,7 +694,7 @@ public class ContextCapabilities { /** * Returns renderer details of the adapter - * + * * @return The adapter details */ public String getDisplayRenderer() { @@ -670,7 +703,7 @@ public class ContextCapabilities { /** * Returns the version supported - * + * * @return The version supported */ public String getDisplayVersion() { @@ -679,7 +712,7 @@ public class ContextCapabilities { /** * Returns the supported shading language version. Needs OpenGL 2.0 support to query. - * + * * @return The shading language version supported */ public String getShadingLanguageVersion() { |