5package com.jogamp.opengl.cg;
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;
16import jogamp.opengl.*;
17import com.jogamp.common.os.DynamicLookupHelper;
18import com.jogamp.common.os.DynamicLibraryBundle;
19import com.jogamp.common.util.SecurityUtil;
20import com.jogamp.opengl.cg.CgDynamicLibraryBundleInfo;
21import java.security.PrivilegedAction;
25 StructAccessor accessor;
27 private static final int mdIdx = MachineDataInfoRuntime.getStatic().ordinal();
28 private final MachineDataInfo md;
30 private static final int[] CGannotation_size =
new int[] { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
39 return CGannotation_size[mdIdx];
44 return create(Buffers.newDirectByteBuffer(
size()));
54 return create( ElementBuffer.derefPointer(
size(), addr, 1).getByteBuffer() );
58 md = MachineDataInfo.StaticConfig.values()[mdIdx].md;
59 accessor =
new StructAccessor(buf);
64 return accessor.getBuffer();
69 return accessor.getDirectBufferAddress();
static CGannotation 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 getDirectBufferAddress()
Returns the native address of the underlying native ByteBuffer getBuffer().
final java.nio.ByteBuffer getBuffer()
Return the underlying native direct ByteBuffer.
static CGannotation create(java.nio.ByteBuffer buf)
Returns a new instance using the given ByteBuffer having at least {#link size()} bytes capacity.
static CGannotation create()
Returns a new instance with all bytes set to zero.
static boolean usesNativeCode()
Returns true if this generated implementation uses native code, otherwise false.