Visual pre-set for accumulator buffer size, default: 0
This value is updated after a GLContext is created with the
original updated value of GLContext !
Visual pre-set for accumulator buffer size, default: 0
This value is updated after a GLContext is created with the
original updated value of GLContext !
This value has a special behavior.
Visual pre-set for accumulator buffer size, default: 0
This value is updated after a GLContext is created with the
original updated value of GLContext !
Constructor Function for offscreen rendering !
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
If a GLContext is fetched, it is current !
Constructor Function for offscreen rendering !
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
If a GLContext is fetched, it is current !
Visual pre-set for RGBA usage, default: true - of course ;-)
This value is updated after a GLContext is created with the
original updated value of GLContext !
Returns the GraphicsConfiguration most closely matching the
specified set of GLCapabilities and your given device !
Return null if there was no matching visual.
Just get the maximum number of Frames per secounds,
which is calculated with the time, one frame needs to render !
this value is avaiable after the thread is started
and the first frames are rendered !
Just get the maximum number of Frames per secounds,
which is calculated with the time, one frame needs to render !
this value is avaiable after the thread is started
and the first frames are rendered !
Constructor
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
We use a visual with doubleBuffer and NO stereoView !
Do not force a new native window !
If a GLContext is fetched, it is current !
Constructor
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
If a GLContext is fetched, it is current !
! WARNING ! This flag is just for testing purpose !!!
Constructor
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
If a GLContext is fetched, it is current !
Constructor
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
If a GLContext is fetched, it is current !
Constructor
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
If a GLContext is fetched, it is current !
Constructor
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
If a GLContext is fetched, it is current !
Constructor
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
If a GLContext is fetched, it is current !
Constructor
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
If a GLContext is fetched, it is current !
Constructor
First the GLContext is fetched from the Component itself !
To do so, the Component is set visible if it is not !
If a GLContext is fetched, it is current !
This Class provides a simple universal
Image/Texture OpenGL Canvas !
A special demo/application for this class can be found
in "demos/MiscDemos/GLImageViewerCanvas.java" !
gljDestroy destroy´s the GL Context
This function should be called when removing
a GLContext !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Call gljFree befor this method, to be sure ..
This functions reads the pixel from the GL frame
and puts it into the pixelDest array,
while using hardware correct AWT and GL pixel format,
using GL_BGR and BufferedImage.TYPE_3BYTE_BGR !
This functions reads the pixel from the GL frame
and puts it into the pixelDest array,
while converting them correctly to the AWT pixel format,
using GL_BGRA and BufferedImage.TYPE_INT_ARGB !
This functions reads the pixel from the GL frame
and puts it into the pixelDest array,
while converting them correctly to the AWT pixel format,
using GL_RGB and BufferedImage.TYPE_USHORT_565_RGB !
native C function of GLJ Library,
which query if the JAWT Surface has changed !
Use this after gljMakeCurrent -> jawt_lock !
If true, we need a new GLContext !
This abstract Class implements the
file and url based methods "readTexture",
to call the specialised implementation
of the stream based "readTexture" method !
Deprecated.The arguments glLibName and gluLibName are obsolete,
because all glj/gl/glu stuff resides within
the gljLib !
Now you can use doLoadNativeLibraries !
Test to load the native library, GLFunc and GLUFunc implementation !
If succesfull, a Frame will created and the GL-Infos (vendor, ...)
are shown in it !
Test to load the native library, GLFunc and GLUFunc implementation !
If succesfull, a Frame will created and the GL-Infos (vendor, ...)
are shown in it !
The resize flag, which indicates a resize for the next paint function !
This flag will bes set in 'componentResized'
and will be cleared after resize (glViewport) in sDisplay !!
The custom set offscreen Size
If this is set to != null,
the offscreen pixmap is used in this size,
not in the components-size (-> faster if smaller)
Must be set via createOffScreenCtx
this function overrides the Canvas paint method !
For the first paint,
the user function preInit is called, a GLContext is created
and the user function init is called !
Also, if a GL Context exist, GLCanvas's sDisplay-method will be called
to do OpenGL-rendering.
this function overrides the Canvas paint method !
For the first paint,
the user function preInit is called, a GLContext is created
and the user function init is called !
Also, if a GL Context exist, GLJPanel's sDisplay-method will be called
to do OpenGL-rendering.
This ´reshape´ method will be invoked after the first paint command
after GLCanvas.componentResize is called AND only if ´gljMakeCurrent´ was
successful (so a call of gljMakeCurrent is redundant).
This ´reshape´ method will be invoked after the first paint command
after GLCanvas.componentResize is called AND only if ´gljMakeCurrent´ was
successful (so a call of gljMakeCurrent is redundant).
This ´reshape´ method will be invoked after the first paint command
after GLCanvas.componentResize is called AND only if ´gljMakeCurrent´ was
successful (so a call of gljMakeCurrent is redundant).
Visual pre-set for RGBA usage, default: true - of course ;-)
This value is updated after a GLContext is created with the
original updated value of GLContext !
Visual pre-set for RGBA usage, default: true - of course ;-)
This value is updated after a GLContext is created with the
original updated value of GLContext !
Visual pre-set for RGBA usage, default: true - of course ;-)
This value is updated after a GLContext is created with the
original updated value of GLContext !
This method can be called,
if you want to have a normal image-data size
with the power of two !
The Ascpect-Ratio is dropped !
You can call this method directly after loading a
texture !
The pixel store mode GL_UNPACK_ALIGNMENT & GL_PACK_ALIGNMENT,
is set temporary to byte alignment, then back to default (4) !
The pixel store mode GL_UNPACK_ROW_LENGTH & GL_PACK_ROW_LENGTH,
is set temporary to imageWidth, then back to default (0) !
This method can be called,
if you want to have an optimal image-data size
which fits best into the texture-MEMORY !
The Ascpect-Ratio is not changed
- seen from the texture-MEMORY-ratio
to the netto-image-MEMORY-ratio !
If you want to render this result with the correct
apsect-ration,
you MUST set the vertices in relation to
the textureWidth and textureHeight !
Look in the demo: "demos/MiscDemos/GLImageWorld1" !
You can call this method directly after loading a
texture !
The pixel store mode GL_UNPACK_ALIGNMENT & GL_PACK_ALIGNMENT,
is set temporary to byte alignment, then back to default (4) !
The pixel store mode GL_UNPACK_ROW_LENGTH & GL_PACK_ROW_LENGTH,
is set temporary to imageWidth, then back to default (0) !
This function enables, disables the GL-Context !
If false is given, the openGL renderer/context is
disabled and disconected (gljFree is called, if initialized) !
If disabled, all GL Functions are disabled but the
Destroy & Free are not !
This function enables, disables the GL-Context !
If false is given, the openGL renderer/context is
disabled and disconected (gljFree is called, if initialized) !
If disabled, all GL Functions are disabled but the
Destroy & Free are not !
This method is called directly after loading
the texture !
You normally do not need to call this method !
The textWidth/textHeight data is set correctly
to a power of 2 !
The normal behavior is to use FpsSleep
But you can overwrite this behavior and
drop the Frame Per Secound sleeps -
so that much frames are rendered as the machine can do !
The normal behavior is to use FpsSleep
But you can overwrite this behavior and
drop the Frame Per Secound sleeps -
so that much frames are rendered as the machine can do !
This function enables, disables the GL-Context !
If false is given, the openGL renderer/context is
disabled and disconected (gljFree is called, if initialized) !
If disabled, all GL Functions are disabled but the
Destroy & Free are not !
The Visible-Flag of this AWT Component is also set to the given value !
The setVisible(boolean) method of Component is called !
This method loads the image into
the current bind GL_TEXTURE_2D texture !
Be sure to have the GL-Context being current !
Be sure to have the GL_TEXTURE_2D bind to
a textureName !
This method creates a target texture (glTexImage2D)
without data,
and substitutes only the unscaled image data (glTexSubImage2D) !
The benefits of this functions is,
that the image/texture is not scaled !
A fine example exists in "demos/MiscDemos/GLImageViewerCanvas" !
The pixel store mode GL_UNPACK_ALIGNMENT,
is set temporary to byte alignment, then back to default (4) !
The pixel store mode GL_UNPACK_ROW_LENGTH,
is set temporary to imageWidth, then back to default (0) !
This method loads the image into
the current bind GL_TEXTURE_2D texture !
Be sure to have the GL-Context being current !
Be sure to have the GL_TEXTURE_2D bind to
a textureName !
This method calls scaleTexture2Pow2() to
make the image of the normal texture size := pow2 !
Then glTexImage2D is called with the texture properties !
The Ascpect-Ratio is dropped !
This method loads the image into
the current bind GL_TEXTURE_2D texture !
Be sure to have the GL-Context being current !
Be sure to have the GL_TEXTURE_2D bind to
a textureName !
This method calls scaleTexture4BestSize() to
make the image of the best fitting size
relative to the texture-size!
Then glTexImage2D is called with the texture properties !
The Ascpect-Ratio is not changed !
A fine example exists in "demos/MiscDemos/GLImageViewerWorld" !
This abstract Class defines the interface
for ALL texture Grabbers !
The TextureGrabber's implementations are used to
save the pixels of the GL Context to a file !
This is Class implements a TGA texture-loader !
At this time, this loader only supports
loading files, which are saved with
the TGATextureGrabber !
This means: 24 bpp, RGB, uncompressed, no-colormap,
no image id-field !
´windowClosing´ is the windowListeners event handler
for the topLevelWindow of this Canvas !
This methods free´s AND destroy´s
the GL Context with ´glj.gljDestroy´ !
´windowClosing´ is the windowListeners event handler
for the topLevelWindow of this Canvas !
This methods free´s AND destroy´s
the GL Context with ´glj.gljDestroy´ !