Package icyllis.arc3d.compiler
Class CodeGenerator
java.lang.Object
icyllis.arc3d.compiler.CodeGenerator
- Direct Known Subclasses:
- GLSLCodeGenerator,- SPIRVCodeGenerator
Abstract superclass of all code generators, which take a 
TranslationUnit as input
 and produce code as output.- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract @Nullable ByteBufferGenerates the code and returns a buffer slice.protected Context
- 
Field Details- 
mContext
- 
mTranslationUnit
 
- 
- 
Constructor Details- 
CodeGenerator
 
- 
- 
Method Details- 
generateCodeGenerates the code and returns a buffer slice. The code size in bytes isBuffer.remaining().The return value is a direct buffer allocated via ByteBuffer.allocateDirect(int). The byte order isByteOrder.nativeOrder()(i.e. host endianness) and it's safe to pass the result to OpenGL and Vulkan. There is no way to free this buffer explicitly, as it is subject to GC. UseReference.reachabilityFence(Object)to keep it alive.Check errors via Context.getErrorHandler().- Returns:
- the generated code, or null if there's an error
 
- 
getContext
 
-