Package org.lwjgl.nanovg
Class NanoVGGLES2
- java.lang.Object
-
- org.lwjgl.nanovg.NanoVGGLES2
-
public class NanoVGGLES2 extends java.lang.ObjectImplementation of the NanoVG API using OpenGL ES 2.0.
-
-
Field Summary
Fields Modifier and Type Field Description static intNVG_ANTIALIAS
NVG_DEBUGCreate flags.static intNVG_IMAGE_NODELETEThese are additional flags on top of NVGimageFlags.static intNVG_STENCIL_STROKESCreate flags.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longnnvgCreate(int flags)Unsafe version of:Createstatic voidnnvgDelete(long ctx)Unsafe version of:Deletestatic intnnvglCreateImageFromHandle(long ctx, int textureId, int w, int h, int flags)Unsafe version of:lCreateImageFromHandlestatic intnnvglImageHandle(long ctx, int image)Unsafe version of:lImageHandlestatic voidnnvgluBindFramebuffer(long ctx, long fb)Unsafe version of:luBindFramebufferstatic longnnvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags)Unsafe version of:luCreateFramebufferstatic voidnnvgluDeleteFramebuffer(long ctx, long fb)Unsafe version of:luDeleteFramebufferstatic longnvgCreate(int flags)Creates a NanoVG context with an OpenGL ES 2.0 rendering back-end.static voidnvgDelete(long ctx)Deletes a NanoVG context created withCreate.static intnvglCreateImageFromHandle(long ctx, int textureId, int w, int h, int flags)Creates a NanoVG image from an OpenGL texture.static intnvglImageHandle(long ctx, int image)Returns the OpenGL texture id associated with a NanoVG image.static voidnvgluBindFramebuffer(long ctx, NVGLUFramebuffer fb)Binds the framebuffer object associated with the specifiedNVGLUFramebuffer.static NVGLUFramebuffernvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags)Creates a framebuffer object to render to.static voidnvgluDeleteFramebuffer(long ctx, NVGLUFramebuffer fb)Deletes anNVGLUFramebuffer.
-
-
-
Field Detail
-
NVG_ANTIALIAS, NVG_STENCIL_STROKES, NVG_DEBUG
Create flags.Enum values:
ANTIALIAS- Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).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.DEBUG- Flag indicating that additional debug checks are done.
-
NVG_IMAGE_NODELETE
These are additional flags on top of NVGimageFlags.Enum values:
IMAGE_NODELETE- Do not delete GL texture handle.
-
-
Method Detail
-
nnvglCreateImageFromHandle
public static int nnvglCreateImageFromHandle(long ctx, int textureId, int w, int h, int flags)Unsafe version of:lCreateImageFromHandle
-
nvglCreateImageFromHandle
public static int nvglCreateImageFromHandle(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- Returns:
- a handle to the image
-
nnvglImageHandle
public static int nnvglImageHandle(long ctx, int image)Unsafe version of:lImageHandle
-
nvglImageHandle
public static int nvglImageHandle(long ctx, int image)Returns the OpenGL texture id associated with a NanoVG image.- Parameters:
ctx- the NanoVG contextimage- the image handle
-
nnvgCreate
public static long nnvgCreate(int flags)
Unsafe version of:Create
-
nvgCreate
public static long nvgCreate(int flags)
Creates a NanoVG context with an OpenGL ES 2.0 rendering back-end.An OpenGL ES 2.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:ANTIALIASSTENCIL_STROKESDEBUG
-
nnvgDelete
public static void nnvgDelete(long ctx)
Unsafe version of:Delete
-
nvgDelete
public static void nvgDelete(long ctx)
Deletes a NanoVG context created withCreate.- Parameters:
ctx- the NanoVG context
-
nnvgluCreateFramebuffer
public static long nnvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags)Unsafe version of:luCreateFramebuffer
-
nvgluCreateFramebuffer
@Nullable 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
-
nnvgluBindFramebuffer
public static void nnvgluBindFramebuffer(long ctx, long fb)Unsafe version of:luBindFramebuffer
-
nvgluBindFramebuffer
public static void nvgluBindFramebuffer(long ctx, @Nullable NVGLUFramebuffer fb)Binds the framebuffer object associated with the specifiedNVGLUFramebuffer.- Parameters:
ctx- the NanoVG contextfb- the framebuffer to bind
-
nnvgluDeleteFramebuffer
public static void nnvgluDeleteFramebuffer(long ctx, long fb)Unsafe version of:luDeleteFramebuffer
-
nvgluDeleteFramebuffer
public static void nvgluDeleteFramebuffer(long ctx, NVGLUFramebuffer fb)Deletes anNVGLUFramebuffer.- Parameters:
ctx- the NanoVG contextfb- the framebuffer to delete
-
-