5package com.jogamp.opengl.egl;
8import java.nio.charset.Charset;
9import java.nio.charset.StandardCharsets;
11import com.jogamp.gluegen.runtime.*;
12import com.jogamp.common.os.*;
13import com.jogamp.common.nio.*;
14import jogamp.common.os.MachineDataInfoRuntime;
17import com.jogamp.opengl.*;
18import com.jogamp.opengl.fixedfunc.*;
19import jogamp.opengl.*;
20import com.jogamp.opengl.egl.EGLExt;
21import com.jogamp.opengl.egl.EGLClientPixmapHI;
25 StructAccessor accessor;
27 private static final int mdIdx = MachineDataInfoRuntime.getStatic().ordinal();
28 private final MachineDataInfo md;
30 private static final int[] EGLClientPixmapHI_size =
new int[] { 16 , 16 , 16 , 16 , 16 , 16 , 16 , 24 , 24 , 24 };
31 private static final int[] pData_offset =
new int[] { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
33 private static final int[] iWidth_offset =
new int[] { 4 , 4 , 4 , 4 , 4 , 4 , 4 , 8 , 8 , 8 };
35 private static final int[] iHeight_offset =
new int[] { 8 , 8 , 8 , 8 , 8 , 8 , 8 , 12 , 12 , 12 };
37 private static final int[] iStride_offset =
new int[] { 12 , 12 , 12 , 12 , 12 , 12 , 12 , 16 , 16 , 16 };
47 return EGLClientPixmapHI_size[mdIdx];
52 return create(Buffers.newDirectByteBuffer(
size()));
62 return create( ElementBuffer.derefPointer(
size(), addr, 1).getByteBuffer() );
66 md = MachineDataInfo.StaticConfig.values()[mdIdx].md;
67 accessor =
new StructAccessor(buf);
72 return accessor.getBuffer();
77 return accessor.getDirectBufferAddress();
98 return PointerBuffer.wrap(
getBuffer(), pData_offset[mdIdx], 1).get(0);
108 return accessor.getIntAt(iWidth_offset[mdIdx]);
118 return accessor.getIntAt(iHeight_offset[mdIdx]);
128 return accessor.getIntAt(iStride_offset[mdIdx]);
static EGLClientPixmapHI create()
Returns a new instance with all bytes set to zero.
final int getIWidth()
Getter for native field iWidth, being a struct owned IntType.
final int getIStride()
Getter for native field iStride, being a struct owned IntType.
static EGLClientPixmapHI derefPointer(final long addr)
Returns new instance dereferencing ByteBuffer at given native address addr with size size().
static int size()
Returns the aligned total size of a native instance.
final long getPData()
SKIP setter for immutable native field pData, referencing a struct owned array with fixed element cou...
final int getIHeight()
Getter for native field iHeight, being a struct owned IntType.
final long getDirectBufferAddress()
Returns the native address of the underlying native ByteBuffer getBuffer().
static EGLClientPixmapHI create(java.nio.ByteBuffer buf)
Returns a new instance using the given ByteBuffer having at least {#link size()} bytes capacity.
final java.nio.ByteBuffer getBuffer()
Return the underlying native direct ByteBuffer.
static boolean usesNativeCode()
Returns true if this generated implementation uses native code, otherwise false.