Top Description Fields Constructors Methods
org.lwjgl.nanovg

public Class NanoVGGLES3

extends Object
Class Inheritance
Imports
javax.annotation.*, org.lwjgl.system.*

Implementation of the NanoVG API using OpenGL ES 3.0.

Field Summary

Modifier and TypeField and Description
public static final int
NVG_ANTIALIAS

Create flags.

public static final int
NVG_DEBUG

Create flags.

public static final int
NVG_IMAGE_NODELETE

These are additional flags on top of NVGimageFlags.

public static final int
NVG_STENCIL_STROKES

Create flags.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static native long
nnvgCreate(int flags)

Unsafe version of: Create

public static native void
nnvgDelete(long ctx)

Unsafe version of: Delete

public static native int
nnvglCreateImageFromHandle(long ctx, int textureId, int w, int h, int flags)

Unsafe version of: lCreateImageFromHandle

public static native int
nnvglImageHandle(long ctx, int image)

Unsafe version of: lImageHandle

public static native void
nnvgluBindFramebuffer(long ctx, long fb)

Unsafe version of: luBindFramebuffer

public static native long
nnvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags)

Unsafe version of: luCreateFramebuffer

public static native void
nnvgluDeleteFramebuffer(long ctx, long fb)

Unsafe version of: luDeleteFramebuffer

public static long
nvgCreate(int
the context flags. One of:
ANTIALIASSTENCIL_STROKESDEBUG
flags
)

Creates a NanoVG context with an OpenGL ES 3.0 rendering back-end.

public static void
nvgDelete(long
the NanoVG context
ctx
)

Deletes a NanoVG context created with Create.

public static int

Returns:

a handle to the image
nvglCreateImageFromHandle
(long
the NanoVG context
ctx
,
int
the OpenGL texture id
textureId
,
int
the image width
w
,
int
the image height
h
,
int
the image flags
flags
)

Creates a NanoVG image from an OpenGL texture.

public static int
nvglImageHandle(long
the NanoVG context
ctx
,
int
the image handle
image
)

Returns the OpenGL texture id associated with a NanoVG image.

public static void
nvgluBindFramebuffer(long
the NanoVG context
ctx
,
NVGLUFramebuffer
the framebuffer to bind
fb
)

Binds the framebuffer object associated with the specified NVGLUFramebuffer.

public static NVGLUFramebuffer
nvgluCreateFramebuffer(long
the NanoVG context
ctx
,
int
the framebuffer width
w
,
int
the framebuffer height
h
,
int
the image flags
imageFlags
)

Creates a framebuffer object to render to.

public static void
nvgluDeleteFramebuffer(long
the NanoVG context
ctx
,
NVGLUFramebuffer
the framebuffer to delete
fb
)

Deletes an NVGLUFramebuffer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

NVG_ANTIALIASback to summary
public static final int NVG_ANTIALIAS

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_DEBUGback to summary
public static final int 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_NODELETEback to summary
public static final int NVG_IMAGE_NODELETE

These are additional flags on top of NVGimageFlags.

Enum values:
NVG_STENCIL_STROKESback to summary
public static final int NVG_STENCIL_STROKES

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.

Constructor Detail

NanoVGGLES3back to summary
protected NanoVGGLES3()

Method Detail

nnvgCreateback to summary
public static native long nnvgCreate(int flags)

Unsafe version of: Create

nnvgDeleteback to summary
public static native void nnvgDelete(long ctx)

Unsafe version of: Delete

nnvglCreateImageFromHandleback to summary
public static native int nnvglCreateImageFromHandle(long ctx, int textureId, int w, int h, int flags)

Unsafe version of: lCreateImageFromHandle

nnvglImageHandleback to summary
public static native int nnvglImageHandle(long ctx, int image)

Unsafe version of: lImageHandle

nnvgluBindFramebufferback to summary
public static native void nnvgluBindFramebuffer(long ctx, long fb)

Unsafe version of: luBindFramebuffer

nnvgluCreateFramebufferback to summary
public static native long nnvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags)

Unsafe version of: luCreateFramebuffer

nnvgluDeleteFramebufferback to summary
public static native void nnvgluDeleteFramebuffer(long ctx, long fb)

Unsafe version of: luDeleteFramebuffer

nvgCreateback to summary
public static long nvgCreate(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:int

the context flags. One of:

ANTIALIASSTENCIL_STROKESDEBUG
Annotations
@NativeType:NVGcontext *
nvgDeleteback to summary
public static void nvgDelete(long ctx)

Deletes a NanoVG context created with Create.

Parameters
ctx:long

the NanoVG context

nvglCreateImageFromHandleback to summary
public static int nvglCreateImageFromHandle(long ctx, int textureId, int w, int h, int flags)

Creates a NanoVG image from an OpenGL texture.

Parameters
ctx:long

the NanoVG context

textureId:int

the OpenGL texture id

w:int

the image width

h:int

the image height

flags:int

the image flags

Returns:int

a handle to the image

nvglImageHandleback to summary
public static int nvglImageHandle(long ctx, int image)

Returns the OpenGL texture id associated with a NanoVG image.

Parameters
ctx:long

the NanoVG context

image:int

the image handle

Annotations
@NativeType:GLuint
nvgluBindFramebufferback to summary
public static void nvgluBindFramebuffer(long ctx, NVGLUFramebuffer fb)

Binds the framebuffer object associated with the specified NVGLUFramebuffer.

Parameters
ctx:long

the NanoVG context

fb:NVGLUFramebuffer

the framebuffer to bind

nvgluCreateFramebufferback to summary
public static NVGLUFramebuffer nvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags)

Creates a framebuffer object to render to.

Parameters
ctx:long

the NanoVG context

w:int

the framebuffer width

h:int

the framebuffer height

imageFlags:int

the image flags

Annotations
@Nullable
@NativeType:NVGLUframebuffer *
nvgluDeleteFramebufferback to summary
public static void nvgluDeleteFramebuffer(long ctx, NVGLUFramebuffer fb)

Deletes an NVGLUFramebuffer.

Parameters
ctx:long

the NanoVG context

fb:NVGLUFramebuffer

the framebuffer to delete