Package org.lwjgl.nanovg
Class NanoVGGLES3
- java.lang.Object
-
- org.lwjgl.nanovg.NanoVGGLES3
-
public class NanoVGGLES3 extends java.lang.Object
Implementation of the NanoVG API using OpenGL ES 3.0.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
NVG_ANTIALIAS
Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).static int
NVG_DEBUG
Flag indicating that additional debug checks are done.static int
NVG_IMAGE_NODELETE
Do not delete GL texture handle.static int
NVG_STENCIL_STROKES
Flag indicating if strokes should be drawn using stencil buffer.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static long
nvgCreateGLES3(int flags)
Creates a NanoVG context with an OpenGL ES 3.0 rendering back-end.static void
nvgDeleteGLES3(long ctx)
Deletes a NanoVG context created withCreateGLES3
.static int
nvglCreateImageFromHandleGLES3(long ctx, int textureId, int w, int h, int flags)
Creates a NanoVG image from an OpenGL texture.static int
nvglImageHandleGLES3(long ctx, int image)
Returns the OpenGL texture id associated with a NanoVG image.static void
nvgluBindFramebuffer(long ctx, NVGLUFramebuffer fb)
Binds the framebuffer object associated with the specifiedNVGLUFramebuffer
.static NVGLUFramebuffer
nvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags)
Creates a framebuffer object to render to.static void
nvgluDeleteFramebuffer(long ctx, NVGLUFramebuffer fb)
Deletes anNVGLUFramebuffer
.
-
-
-
Field Detail
-
NVG_ANTIALIAS
public static final int NVG_ANTIALIAS
Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).- See Also:
- Constant Field Values
-
NVG_STENCIL_STROKES
public static final int NVG_STENCIL_STROKES
Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little slower, but path overlaps (i.e. self-intersecting or sharp turns) will be drawn just once.- See Also:
- Constant Field Values
-
NVG_DEBUG
public static final int NVG_DEBUG
Flag indicating that additional debug checks are done.- See Also:
- Constant Field Values
-
NVG_IMAGE_NODELETE
public static final int NVG_IMAGE_NODELETE
Do not delete GL texture handle.- See Also:
- Constant Field Values
-
-
Method Detail
-
nvglCreateImageFromHandleGLES3
public static int nvglCreateImageFromHandleGLES3(long ctx, int textureId, int w, int h, int flags)
Creates a NanoVG image from an OpenGL texture.- Parameters:
ctx
- the NanoVG contexttextureId
- the OpenGL texture idw
- the image widthh
- the image heightflags
- the image flags
-
nvglImageHandleGLES3
public static int nvglImageHandleGLES3(long ctx, int image)
Returns the OpenGL texture id associated with a NanoVG image.- Parameters:
ctx
- the NanoVG contextimage
- the image handle
-
nvgCreateGLES3
public static long nvgCreateGLES3(int flags)
Creates a NanoVG context with an OpenGL ES 3.0 rendering back-end.An OpenGL ES 3.0+ context must be current in the current thread when this function is called and the returned NanoVG context may only be used in the thread in which that OpenGL context is current.
- Parameters:
flags
- the context flags. One of:ANTIALIAS
STENCIL_STROKES
DEBUG
-
nvgDeleteGLES3
public static void nvgDeleteGLES3(long ctx)
Deletes a NanoVG context created withCreateGLES3
.- Parameters:
ctx
- the NanoVG context
-
nvgluCreateFramebuffer
public static NVGLUFramebuffer nvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags)
Creates a framebuffer object to render to.- Parameters:
ctx
- the NanoVG contextw
- the framebuffer widthh
- the framebuffer heightimageFlags
- the image flags
-
nvgluBindFramebuffer
public static void nvgluBindFramebuffer(long ctx, NVGLUFramebuffer fb)
Binds the framebuffer object associated with the specifiedNVGLUFramebuffer
.- Parameters:
ctx
- the NanoVG contextfb
- the framebuffer to bind
-
nvgluDeleteFramebuffer
public static void nvgluDeleteFramebuffer(long ctx, NVGLUFramebuffer fb)
Deletes anNVGLUFramebuffer
.- Parameters:
ctx
- the NanoVG contextfb
- the framebuffer to delete
-
-