Java Doc for OGLSurfaceData.java in  » 6.0-JDK-Modules-sun » java2d » sun » java2d » opengl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules sun » java2d » sun.java2d.opengl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   sun.java2d.SurfaceData
      sun.java2d.opengl.OGLSurfaceData

OGLSurfaceData
abstract public class OGLSurfaceData extends SurfaceData (Code)
This class describes an OpenGL "surface", that is, a region of pixels managed via OpenGL. An OGLSurfaceData can be tagged with one of three different SurfaceType objects for the purpose of registering loops, etc. This diagram shows the hierarchy of OGL SurfaceTypes: Any / \ OpenGLSurface OpenGLTexture | OpenGLSurfaceRTT OpenGLSurface This kind of surface can be rendered to using OpenGL APIs. It is also possible to copy an OpenGLSurface to another OpenGLSurface (or to itself). This is typically accomplished by calling MakeContextCurrent(dstSD, srcSD) and then calling glCopyPixels() (although there are other techniques to achieve the same goal). OpenGLTexture This kind of surface cannot be rendered to using OpenGL (in the same sense as in OpenGLSurface). However, it is possible to upload a region of pixels to an OpenGLTexture object via glTexSubImage2D(). One can also copy a surface of type OpenGLTexture to an OpenGLSurface by binding the texture to a quad and then rendering it to the destination surface (this process is known as "texture mapping"). OpenGLSurfaceRTT This kind of surface can be thought of as a sort of hybrid between OpenGLSurface and OpenGLTexture, in that one can render to this kind of surface as if it were of type OpenGLSurface, but the process of copying this kind of surface to another is more like an OpenGLTexture. (Note that "RTT" stands for "render-to-texture".) In addition to these SurfaceType variants, we have also defined some constants that describe in more detail the type of underlying OpenGL surface. This table helps explain the relationships between those "type" constants and their corresponding SurfaceType: OGL Type Corresponding SurfaceType -------- ------------------------- WINDOW OpenGLSurface PBUFFER OpenGLSurface TEXTURE OpenGLTexture FLIP_BACKBUFFER OpenGLSurface FBOBJECT OpenGLSurfaceRTT


Field Summary
final public static  intFBOBJECT
    
final public static  intFLIP_BACKBUFFER
    
final static  SurfaceTypeOpenGLSurface
    
final static  SurfaceTypeOpenGLSurfaceRTT
    
final static  SurfaceTypeOpenGLTexture
    
final public static  intPBUFFER
    
final public static  intPF_BYTE_GRAY
    
final public static  intPF_INT_ARGB
    
final public static  intPF_INT_ARGB_PRE
    
final public static  intPF_INT_BGR
    
final public static  intPF_INT_BGRX
    
final public static  intPF_INT_RGB
    
final public static  intPF_INT_RGBX
    
final public static  intPF_USHORT_555_RGB
    
final public static  intPF_USHORT_555_RGBX
    
final public static  intPF_USHORT_565_RGB
    
final public static  intPF_USHORT_GRAY
    
final public static  intTEXTURE
    
final public static  intUNDEFINED
    
final public static  intWINDOW
    
protected static  OGLDrawImageoglImagePipe
    
protected static  OGLRendereroglRenderPipe
    
protected static  OGLTextRendereroglTextPipe
    
protected static  PixelToShapeConverteroglTxRenderPipe
    
protected  inttype
    

Constructor Summary
protected  OGLSurfaceData(OGLGraphicsConfig gc, ColorModel cm, int type)
    

Method Summary
public  booleancanRenderLCDText(SunGraphics2D sg2d)
     For now, we can only render LCD text if: - the fragment shader extension is available, and - blending is disabled, and - the source color is opaque Eventually, we could enhance the native OGL text rendering code and remove the above restrictions, but that would require significantly more code just to support a few uncommon cases.
public  booleancopyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy)
    
static  voiddispose(long pData, long pConfigInfo)
     Disposes the native resources associated with the given OGLSurfaceData (referenced by the pData parameter).
public  voidflush()
    
final  OGLContextgetContext()
     Returns the OGLContext for the GraphicsConfig associated with this surface.
protected  MaskFillgetMaskFill(SunGraphics2D sg2d)
    
final  OGLGraphicsConfiggetOGLGraphicsConfig()
     Returns the OGLGraphicsConfig associated with this surface.
public  RastergetRaster(int x, int y, int w, int h)
    
final  intgetTextureTarget()
     If this surface is backed by a texture object, returns the target for that texture (either GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB).
final  intgetType()
     Returns one of the surface type constants defined above.
native protected  booleaninitFBObject(long pData, boolean isOpaque, boolean texNonPow2, boolean texRect, int width, int height)
    
native protected  booleaninitFlipBackbuffer(long pData)
    
abstract protected  booleaninitPbuffer(long pData, long pConfigInfo, boolean isOpaque, int width, int height)
    
protected  voidinitSurface(int width, int height)
     Initializes the appropriate OpenGL offscreen surface based on the value of the type parameter.
native protected  booleaninitTexture(long pData, boolean isOpaque, boolean texNonPow2, boolean texRect, int width, int height)
    
 booleanisTexNonPow2Available()
     Returns true if OpenGL textures can have non-power-of-two dimensions when using the basic GL_TEXTURE_2D target.
 booleanisTexRectAvailable()
     Returns true if OpenGL textures can have non-power-of-two dimensions when using the GL_TEXTURE_RECTANGLE_ARB target (only available when the GL_ARB_texture_rectangle extension is present).
public  SurfaceDataProxymakeProxyFor(SurfaceData srcData)
    
static  voidswapBuffers(long window)
    
public  voidvalidatePipe(SunGraphics2D sg2d)
    

Field Detail
FBOBJECT
final public static int FBOBJECT(Code)



FLIP_BACKBUFFER
final public static int FLIP_BACKBUFFER(Code)



OpenGLSurface
final static SurfaceType OpenGLSurface(Code)



OpenGLSurfaceRTT
final static SurfaceType OpenGLSurfaceRTT(Code)



OpenGLTexture
final static SurfaceType OpenGLTexture(Code)



PBUFFER
final public static int PBUFFER(Code)



PF_BYTE_GRAY
final public static int PF_BYTE_GRAY(Code)



PF_INT_ARGB
final public static int PF_INT_ARGB(Code)
Pixel formats



PF_INT_ARGB_PRE
final public static int PF_INT_ARGB_PRE(Code)



PF_INT_BGR
final public static int PF_INT_BGR(Code)



PF_INT_BGRX
final public static int PF_INT_BGRX(Code)



PF_INT_RGB
final public static int PF_INT_RGB(Code)



PF_INT_RGBX
final public static int PF_INT_RGBX(Code)



PF_USHORT_555_RGB
final public static int PF_USHORT_555_RGB(Code)



PF_USHORT_555_RGBX
final public static int PF_USHORT_555_RGBX(Code)



PF_USHORT_565_RGB
final public static int PF_USHORT_565_RGB(Code)



PF_USHORT_GRAY
final public static int PF_USHORT_GRAY(Code)



TEXTURE
final public static int TEXTURE(Code)



UNDEFINED
final public static int UNDEFINED(Code)
OGL-specific surface types



WINDOW
final public static int WINDOW(Code)



oglImagePipe
protected static OGLDrawImage oglImagePipe(Code)



oglRenderPipe
protected static OGLRenderer oglRenderPipe(Code)



oglTextPipe
protected static OGLTextRenderer oglTextPipe(Code)



oglTxRenderPipe
protected static PixelToShapeConverter oglTxRenderPipe(Code)



type
protected int type(Code)




Constructor Detail
OGLSurfaceData
protected OGLSurfaceData(OGLGraphicsConfig gc, ColorModel cm, int type)(Code)




Method Detail
canRenderLCDText
public boolean canRenderLCDText(SunGraphics2D sg2d)(Code)
For now, we can only render LCD text if: - the fragment shader extension is available, and - blending is disabled, and - the source color is opaque Eventually, we could enhance the native OGL text rendering code and remove the above restrictions, but that would require significantly more code just to support a few uncommon cases.



copyArea
public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy)(Code)



dispose
static void dispose(long pData, long pConfigInfo)(Code)
Disposes the native resources associated with the given OGLSurfaceData (referenced by the pData parameter). This method is invoked from the native Dispose() method from the Disposer thread when the Java-level OGLSurfaceData object is about to go away. Note that we also pass a reference to the native GLX/WGLGraphicsConfigInfo (pConfigInfo) for the purposes of making a context current.



flush
public void flush()(Code)



getContext
final OGLContext getContext()(Code)
Returns the OGLContext for the GraphicsConfig associated with this surface.



getMaskFill
protected MaskFill getMaskFill(SunGraphics2D sg2d)(Code)



getOGLGraphicsConfig
final OGLGraphicsConfig getOGLGraphicsConfig()(Code)
Returns the OGLGraphicsConfig associated with this surface.



getRaster
public Raster getRaster(int x, int y, int w, int h)(Code)



getTextureTarget
final int getTextureTarget()(Code)
If this surface is backed by a texture object, returns the target for that texture (either GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB). Otherwise, this method will return zero.



getType
final int getType()(Code)
Returns one of the surface type constants defined above.



initFBObject
native protected boolean initFBObject(long pData, boolean isOpaque, boolean texNonPow2, boolean texRect, int width, int height)(Code)



initFlipBackbuffer
native protected boolean initFlipBackbuffer(long pData)(Code)



initPbuffer
abstract protected boolean initPbuffer(long pData, long pConfigInfo, boolean isOpaque, int width, int height)(Code)



initSurface
protected void initSurface(int width, int height)(Code)
Initializes the appropriate OpenGL offscreen surface based on the value of the type parameter. If the surface creation fails for any reason, an OutOfMemoryError will be thrown.



initTexture
native protected boolean initTexture(long pData, boolean isOpaque, boolean texNonPow2, boolean texRect, int width, int height)(Code)



isTexNonPow2Available
boolean isTexNonPow2Available()(Code)
Returns true if OpenGL textures can have non-power-of-two dimensions when using the basic GL_TEXTURE_2D target.



isTexRectAvailable
boolean isTexRectAvailable()(Code)
Returns true if OpenGL textures can have non-power-of-two dimensions when using the GL_TEXTURE_RECTANGLE_ARB target (only available when the GL_ARB_texture_rectangle extension is present).



makeProxyFor
public SurfaceDataProxy makeProxyFor(SurfaceData srcData)(Code)



swapBuffers
static void swapBuffers(long window)(Code)



validatePipe
public void validatePipe(SunGraphics2D sg2d)(Code)



Fields inherited from sun.java2d.SurfaceData
final protected static AAShapePipe AAClipColorShape(Code)(Java Doc)
final protected static PixelToShapeConverter AAClipColorViaShape(Code)(Java Doc)
final protected static AAShapePipe AAClipCompShape(Code)(Java Doc)
final protected static PixelToShapeConverter AAClipCompViaShape(Code)(Java Doc)
final protected static AAShapePipe AAClipPaintShape(Code)(Java Doc)
final protected static PixelToShapeConverter AAClipPaintViaShape(Code)(Java Doc)
final protected static AAShapePipe AAColorShape(Code)(Java Doc)
final protected static PixelToShapeConverter AAColorViaShape(Code)(Java Doc)
final protected static AAShapePipe AACompShape(Code)(Java Doc)
final protected static PixelToShapeConverter AACompViaShape(Code)(Java Doc)
final protected static AAShapePipe AAPaintShape(Code)(Java Doc)
final protected static PixelToShapeConverter AAPaintViaShape(Code)(Java Doc)
final public static TextPipe aaTextRenderer(Code)(Java Doc)
final protected static CompositePipe clipColorPipe(Code)(Java Doc)
final protected static TextPipe clipColorText(Code)(Java Doc)
final protected static CompositePipe clipCompPipe(Code)(Java Doc)
final protected static TextPipe clipCompText(Code)(Java Doc)
final protected static CompositePipe clipPaintPipe(Code)(Java Doc)
final protected static TextPipe clipPaintText(Code)(Java Doc)
final protected static CompositePipe colorPipe(Code)(Java Doc)
final protected static LoopPipe colorPrimitives(Code)(Java Doc)
final protected static TextPipe colorText(Code)(Java Doc)
final protected static PixelToShapeConverter colorViaShape(Code)(Java Doc)
final protected static CompositePipe compPipe(Code)(Java Doc)
final protected static SpanShapeRenderer compShape(Code)(Java Doc)
final protected static TextPipe compText(Code)(Java Doc)
final protected static PixelToShapeConverter compViaShape(Code)(Java Doc)
final protected static DrawImagePipe imagepipe(Code)(Java Doc)
final public static TextPipe lcdTextRenderer(Code)(Java Doc)
final public static TextPipe outlineTextRenderer(Code)(Java Doc)
final protected static CompositePipe paintPipe(Code)(Java Doc)
final protected static SpanShapeRenderer paintShape(Code)(Java Doc)
final protected static TextPipe paintText(Code)(Java Doc)
final protected static PixelToShapeConverter paintViaShape(Code)(Java Doc)
final public static TextPipe solidTextRenderer(Code)(Java Doc)

Methods inherited from sun.java2d.SurfaceData
public boolean canRenderLCDText(SunGraphics2D sg2d)(Code)(Java Doc)
protected void checkCustomComposite()(Code)(Java Doc)
public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy)(Code)(Java Doc)
public void flush()(Code)(Java Doc)
abstract public Rectangle getBounds()(Code)(Java Doc)
final public ColorModel getColorModel()(Code)(Java Doc)
abstract public Object getDestination()(Code)(Java Doc)
abstract public GraphicsConfiguration getDeviceConfiguration()(Code)(Java Doc)
public Object getDisposerReferent()(Code)(Java Doc)
protected MaskFill getMaskFill(SunGraphics2D sg2d)(Code)(Java Doc)
public long getNativeOps()(Code)(Java Doc)
public static SurfaceData getPrimarySurfaceData(Image img)(Code)(Java Doc)
abstract public Raster getRaster(int x, int y, int w, int h)(Code)(Java Doc)
public RenderLoops getRenderLoops(SunGraphics2D sg2d)(Code)(Java Doc)
abstract public SurfaceData getReplacement()(Code)(Java Doc)
public SurfaceData getSourceSurfaceData(Image img, int txtype, CompositeType comp, Color bgColor)(Code)(Java Doc)
public State getState()(Code)(Java Doc)
public StateTracker getStateTracker()(Code)(Java Doc)
final public SurfaceType getSurfaceType()(Code)(Java Doc)
public int getTransparency()(Code)(Java Doc)
public void invalidate()(Code)(Java Doc)
public static boolean isNull(SurfaceData sd)(Code)(Java Doc)
native protected static boolean isOpaqueGray(IndexColorModel icm)(Code)(Java Doc)
public boolean isSurfaceLost()(Code)(Java Doc)
final public boolean isValid()(Code)(Java Doc)
public SurfaceDataProxy makeProxyFor(SurfaceData srcData)(Code)(Java Doc)
public static RenderLoops makeRenderLoops(SurfaceType src, CompositeType comp, SurfaceType dst)(Code)(Java Doc)
final public void markDirty()(Code)(Java Doc)
public int pixelFor(int rgb)(Code)(Java Doc)
public int pixelFor(Color c)(Code)(Java Doc)
public static SurfaceData restoreContents(Image img)(Code)(Java Doc)
public int rgbFor(int pixel)(Code)(Java Doc)
protected void setBlitProxyKey(Object key)(Code)(Java Doc)
public void setSurfaceLost(boolean lost)(Code)(Java Doc)
public boolean useTightBBoxes()(Code)(Java Doc)
public void validatePipe(SunGraphics2D sg2d)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.