Top Description Inners Fields Constructors Methods
org.lwjgl.bgfx

public Class BGFXPlatform

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

Native bindings to the C platform API of the bgfx library.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
BGFXPlatform.Functions

Contains the function pointers loaded from BGFX.getLibrary().

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static BGFXInternalData
bgfx_get_internal_data()

Gets internal data for interop.

public static long

Returns:

native API pointer to texture. If result is 0, texture is not created yet from the main thread.
bgfx_override_internal_texture
(short
texture handle
_handle
,
int
width
_width
,
int
height
_height
,
int
number of mip-maps
_numMips
,
int
texture format
_format
,
long
default texture sampling mode is linear, and wrap mode is repeat
_flags
)

Overrides internal texture by creating new texture.

public static long

Returns:

native API pointer to texture. If result is 0, texture is not created yet from the main thread.
bgfx_override_internal_texture_ptr
(short
texture handle
_handle
,
long
native API pointer to texture
_ptr
)

Overrides internal texture with externally created texture.

public static int
bgfx_render_frame(int
timeout in milliseconds
_msecs
)

Render frame.

public static void
bgfx_set_platform_data(BGFXPlatformData
the platform data to set
_data
)

Sets platform data.

public static long
public static long
nbgfx_override_internal_texture(short _handle, short _width, short _height, byte _numMips, int _format, long _flags)

Unsafe version of: override_internal_texture

public static void
nbgfx_set_platform_data(long _data)

Unsafe version of: set_platform_data

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BGFX_RENDER_FRAME_COUNTback to summary
public static final int BGFX_RENDER_FRAME_COUNT

Render frame. (bgfx_render_frame_t)

Enum values:
BGFX_RENDER_FRAME_EXITINGback to summary
public static final int BGFX_RENDER_FRAME_EXITING

Render frame. (bgfx_render_frame_t)

Enum values:
BGFX_RENDER_FRAME_NO_CONTEXTback to summary
public static final int BGFX_RENDER_FRAME_NO_CONTEXT

Render frame. (bgfx_render_frame_t)

Enum values:
BGFX_RENDER_FRAME_RENDERback to summary
public static final int BGFX_RENDER_FRAME_RENDER

Render frame. (bgfx_render_frame_t)

Enum values:
BGFX_RENDER_FRAME_TIMEOUTback to summary
public static final int BGFX_RENDER_FRAME_TIMEOUT

Render frame. (bgfx_render_frame_t)

Enum values:

Constructor Detail

BGFXPlatformback to summary
protected BGFXPlatform()

Method Detail

bgfx_get_internal_databack to summary
public static BGFXInternalData bgfx_get_internal_data()

Gets internal data for interop.

Annotations
@Nullable
@NativeType:bgfx_internal_data_t const *
bgfx_override_internal_textureback to summary
public static long bgfx_override_internal_texture(short _handle, int _width, int _height, int _numMips, int _format, long _flags)

Overrides internal texture by creating new texture. Previously created internal texture will released.

It's expected you understand some bgfx internals before you use this call.

Must be called only on render thread.

Parameters
_handle:short

texture handle

_width:int

width

_height:int

height

_numMips:int

number of mip-maps

_format:int

texture format

_flags:long

default texture sampling mode is linear, and wrap mode is repeat

Returns:long

native API pointer to texture. If result is 0, texture is not created yet from the main thread.

Annotations
@NativeType:uintptr_t
bgfx_override_internal_texture_ptrback to summary
public static long bgfx_override_internal_texture_ptr(short _handle, long _ptr)

Overrides internal texture with externally created texture. Previously created internal texture will released.

It's expected you understand some bgfx internals before you use this call.

Must be called only on render thread.

Parameters
_handle:short

texture handle

_ptr:long

native API pointer to texture

Returns:long

native API pointer to texture. If result is 0, texture is not created yet from the main thread.

Annotations
@NativeType:uintptr_t
bgfx_render_frameback to summary
public static int bgfx_render_frame(int _msecs)

Render frame.

bgfx_render_frame is blocking call. It waits for frame to be called from API thread to process frame. If timeout value is passed call will timeout and return even if bgfx_frame is not called.

This call should be only used on platforms that don't allow creating separate rendering thread. If it is called before to init, render thread won't be created by init call.

Parameters
_msecs:int

timeout in milliseconds

Returns:int

current renderer state. One of: RENDER_FRAME_NO_CONTEXT RENDER_FRAME_RENDER RENDER_FRAME_TIMEOUT RENDER_FRAME_EXITING RENDER_FRAME_COUNT

Annotations
@NativeType:bgfx_render_frame_t
bgfx_set_platform_databack to summary
public static void bgfx_set_platform_data(BGFXPlatformData _data)

Sets platform data.

Must be called before init.

Parameters
_data:BGFXPlatformData

the platform data to set

nbgfx_get_internal_databack to summary
public static long nbgfx_get_internal_data()

Unsafe version of: get_internal_data

nbgfx_override_internal_textureback to summary
public static long nbgfx_override_internal_texture(short _handle, short _width, short _height, byte _numMips, int _format, long _flags)

Unsafe version of: override_internal_texture

nbgfx_set_platform_databack to summary
public static void nbgfx_set_platform_data(long _data)

Unsafe version of: set_platform_data

org.lwjgl.bgfx back to summary

public final Class BGFXPlatform.Functions

extends Object
Class Inheritance

Contains the function pointers loaded from BGFX.getLibrary().

Field Summary

Modifier and TypeField and Description
public static final long
get_internal_data

Function address.

public static final long
override_internal_texture

Function address.

public static final long
public static final long
render_frame

Function address.

public static final long
set_platform_data

Function address.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

get_internal_databack to summary
public static final long get_internal_data

Function address.

override_internal_textureback to summary
public static final long override_internal_texture

Function address.

override_internal_texture_ptrback to summary
public static final long override_internal_texture_ptr

Function address.

render_frameback to summary
public static final long render_frame

Function address.

set_platform_databack to summary
public static final long set_platform_data

Function address.

Constructor Detail

Functionsback to summary
private Functions()