Class OGL12Graphics
java.lang.Object
com.blackrook.gloop.opengl.OGLGraphics
com.blackrook.gloop.opengl.gl1.OGL11Graphics
com.blackrook.gloop.opengl.gl1.OGL12Graphics
- All Implemented Interfaces:
OGLVersioned
- Direct Known Subclasses:
OGL13Graphics
OpenGL 1.2 Graphics Implementation.
- Author:
- Matthew Tropiano
-
Nested Class Summary
Nested classes/interfaces inherited from class OGL11Graphics
OGL11Graphics.Info11Nested classes/interfaces inherited from class OGLGraphics
OGLGraphics.ErrorHandlingType, OGLGraphics.Info, OGLGraphics.Options -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a texture builder.voiddrawGeometryElementRange(GeometryType geometryType, DataType dataType, int startIndex, int endIndex, int count) Draws geometry using the current bound, enabled coordinate arrays/buffers as data, plus an element buffer to describe the ordering.voidsetTextureData(TextureTargetType target, ByteBuffer imageData, ColorFormat colorFormat, TextureFormat format, int texlevel, int width, int height, int depth, int border) Sends a texture into OpenGL's memory for the current texture bound to the specified target.voidsetTextureSubData(TextureTargetType target, ByteBuffer imageData, ColorFormat colorFormat, int texlevel, int width, int height, int depth, int xoffs, int yoffs, int zoffs) Sends a subset of data to the currently-bound 2D texture already in OpenGL's memory.voidsetTextureWrapping(TextureTargetType target, TextureWrapType wrapS, TextureWrapType wrapT, TextureWrapType wrapR) Sets the current wrapping for the current texture bound to the specified target.Methods inherited from class OGL11Graphics
accumulate, attribPop, attribPush, checkLightId, clear, clear, clientAttribPop, clientAttribPush, createInfo, createTexture, destroyTexture, drawBitmap, drawGeometryArray, drawGeometryElements, endFrame, finish, flush, getCurrentActiveTextureState, getCurrentActiveTextureUnitState, getCurrentMatrixId, getCurrentMatrixStack, getCurrentMatrixStack, getPixelPackAlignment, getPixelUnpackAlignment, getTexture, matrixAspectOrtho, matrixFrustum, matrixGet, matrixGet, matrixLookAt, matrixMode, matrixMultiply, matrixMultiply, matrixOrtho, matrixPerspective, matrixPop, matrixPush, matrixReset, matrixRotateX, matrixRotateY, matrixRotateZ, matrixScale, matrixSet, matrixSet, matrixTranslate, readFrameBuffer, resolveCurrentMatrixStack, setAutoNormalGen, setBackFillMode, setBlendingEnabled, setBlendingFunc, setBlendingFunc, setClearAccum, setClearColor, setClearDepth, setClearStencil, setColor, setColor, setColorARGB, setColorArrayEnabled, setColorArrayPointer, setColorMask, setColorMask, setCurrentActiveTextureState, setCurrentActiveTextureUnitState, setCurrentMatrixId, setDepthFunc, setDepthMask, setDepthTestEnabled, setFaceCullingEnabled, setFaceCullingSide, setFaceFront, setFillMode, setFogColor, setFogColor, setFogColor, setFogDensity, setFogEnabled, setFogEnd, setFogExponent, setFogExponentSquared, setFogFormula, setFogLinear, setFogStart, setFrameBufferRead, setFrameBufferWrite, setFrontFillMode, setHint, setLight, setLightAmbientColor, setLightAmbientColor, setLightAmbientColor, setLightAttenuation, setLightDiffuseColor, setLightDiffuseColor, setLightDiffuseColor, setLightEnabled, setLightingEnabled, setLightPosition, setLightShadeType, setLightSpecularColor, setLightSpecularColor, setLightSpecularColor, setLineSmoothingEnabled, setLineWidth, setMaterial, setMaterial, setMaterialAmbientColor, setMaterialAmbientColor, setMaterialAmbientColor, setMaterialDiffuseColor, setMaterialDiffuseColor, setMaterialDiffuseColor, setMaterialEmissionColor, setMaterialEmissionColor, setMaterialEmissionColor, setMaterialShininessFactor, setMaterialSpecularColor, setMaterialSpecularColor, setMaterialSpecularColor, setNormalArrayEnabled, setNormalArrayPointer, setPixelPackAlignment, setPixelUnpackAlignment, setPointSize, setPointSmoothingEnabled, setRasterPosition, setScissorBounds, setScissorTestEnabled, setStencilMask, setStencilTestEnabled, setStencilTestFunc, setStencilTestOperations, setTexGenEyePlane, setTexGenMode, setTexGenObjectPlane, setTexGenQEnabled, setTexGenREnabled, setTexGenSEnabled, setTexGenTEnabled, setTexture, setTextureCoordinateArrayEnabled, setTextureCoordinateArrayPointer, setTextureData, setTextureData, setTextureDataFromReadBuffer, setTextureDataFromReadBuffer, setTextureEnabled, setTextureEnvironment, setTextureFiltering, setTextureFiltering, setTextureSubData, setTextureSubData, setTextureSubDataFromReadBuffer, setTextureSubDataFromReadBuffer, setTextureWrapping, setTextureWrapping, setVertexArrayEnabled, setVertexArrayPointer, setViewport, unsetTextureMethods inherited from class OGLGraphics
checkError, clearError, currentBlit, currentFrame, currentNanos, currentTime, currentTimeMillis, currentTimeStepMillis, currentTimeStepNanos, destroyObject, fromGLBool, getCanvasAspect, getCanvasHeight, getCanvasWidth, getFloat, getFloats, getGLErrorName, getInfo, getInt, getInts, handleUndeletedObjects, isCore, setClientFlag, setFlag, supports, toGLBool, verifyFeatureSupport, verifyNonCore
-
Constructor Details
-
OGL12Graphics
-
-
Method Details
-
getVersion
- Specified by:
getVersionin interfaceOGLVersioned- Overrides:
getVersionin classOGL11Graphics- Returns:
- the version that this object or value is available for (and higher).
-
createTextureBuilder
Creates a texture builder.This texture builder aids in building texture objects, and its
TextureBuilder.create()method will bind a new texture to its required target, send the data, set the filtering and build mipmaps, unbind the target, and return the new object.Limitations on this implementation version are: No compression, no auto mipmapgen.
- Overrides:
createTextureBuilderin classOGL11Graphics- Returns:
- a new texture builder.
-
setTextureWrapping
public void setTextureWrapping(TextureTargetType target, TextureWrapType wrapS, TextureWrapType wrapT, TextureWrapType wrapR) Sets the current wrapping for the current texture bound to the specified target.- Parameters:
target- the texture target.wrapS- the wrapping mode, S-axis.wrapT- the wrapping mode, T-axis.wrapR- the wrapping mode, R-axis.- Throws:
UnsupportedOperationException- if any provided type is unavailable in this version.GraphicsException- if the target is not a three-dimensionally-sampled target.
-
setTextureData
public void setTextureData(TextureTargetType target, ByteBuffer imageData, ColorFormat colorFormat, TextureFormat format, int texlevel, int width, int height, int depth, int border) Sends a texture into OpenGL's memory for the current texture bound to the specified target.- Parameters:
target- the texture target.imageData- the image to send.colorFormat- the pixel storage format of the buffer data.format- the internal format.texlevel- the mipmapping level to copy this into (0 is topmost).width- the texture width in texels.height- the texture height in texels.depth- the texture depth in texels.border- the texel border to add, if any.- Throws:
UnsupportedOperationException- if any provided type or format is unavailable in this version.GraphicsException- if the buffer provided is not direct, or if the target is not stored three-dimensionally.
-
setTextureSubData
public void setTextureSubData(TextureTargetType target, ByteBuffer imageData, ColorFormat colorFormat, int texlevel, int width, int height, int depth, int xoffs, int yoffs, int zoffs) Sends a subset of data to the currently-bound 2D texture already in OpenGL's memory.- Parameters:
target- the texture target.imageData- the image to send.colorFormat- the pixel storage format of the buffer data.texlevel- the mipmapping level to copy this into (0 is topmost).width- the texture width in texels.height- the texture height in texels.depth- the texture depth in texels.xoffs- the texel offset.yoffs- the texel offset.zoffs- the texel offset.- Throws:
UnsupportedOperationException- if any provided type or format is unavailable in this version.GraphicsException- if the buffer provided is not direct, or if the target is not stored three-dimensionally.
-
drawGeometryElementRange
public void drawGeometryElementRange(GeometryType geometryType, DataType dataType, int startIndex, int endIndex, int count) Draws geometry using the current bound, enabled coordinate arrays/buffers as data, plus an element buffer to describe the ordering.- Parameters:
geometryType- the geometry type - tells how to interpret the data.dataType- the data type of the indices in theBufferTargetType.INDICES-bound buffer (must be an unsigned type).startIndex- the starting index into theBufferTargetType.INDICES-bound buffer.endIndex- the ending index in the range.count- the amount of element indices to read.- See Also:
-