Initial commit
This commit is contained in:
113
application/demos/example.opengl/engine/pipeline.c
Normal file
113
application/demos/example.opengl/engine/pipeline.c
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* This file is automaticaly generated, Please dont edit this file!
|
||||
*/
|
||||
#include <engine/pipeline.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void pipeline_addRenderPass( pipeline * this, int count, int datatypes[], ... ) {
|
||||
|
||||
va_list args;
|
||||
|
||||
va_start( args, count );
|
||||
|
||||
int classIndex = datatypes[0];
|
||||
|
||||
vector_int_add( this->classIndices, classIndex );
|
||||
|
||||
|
||||
|
||||
void * voidPointer = va_arg( args, void * );
|
||||
|
||||
int methodIndex = getMethodIndexByPropertyName( classIndex, "prepare" );
|
||||
|
||||
int renderMethodIndex = getMethodIndexByPropertyName( classIndex, "render" );
|
||||
|
||||
|
||||
vector_int_add( this->methodIndices, renderMethodIndex );
|
||||
|
||||
|
||||
|
||||
int classIndexTest = vector_int_get( this->classIndices, 0 );
|
||||
|
||||
|
||||
|
||||
callMethodOfClass( classIndex, methodIndex, voidPointer );
|
||||
|
||||
printf("\n");
|
||||
|
||||
va_end( args );
|
||||
|
||||
|
||||
array_add( this->renderPasses, voidPointer );
|
||||
|
||||
}
|
||||
|
||||
void pipeline_render( pipeline * this ) {
|
||||
|
||||
array * renderPasses = this->renderPasses;
|
||||
|
||||
int renderPassCount = array_length( renderPasses );
|
||||
|
||||
for (int i = 0; i < renderPassCount; ++i)
|
||||
{
|
||||
|
||||
int classIndex = vector_int_get( this->classIndices, i );
|
||||
|
||||
void * voidPointer = array_get( renderPasses, i );
|
||||
|
||||
int methodIndex = vector_int_get( this->methodIndices, i );
|
||||
|
||||
callMethodOfClass( classIndex, methodIndex, voidPointer );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pipeline pipeline_new() {
|
||||
|
||||
pipeline instance;
|
||||
|
||||
instance.__classIndex = 45;
|
||||
|
||||
instance.renderPasses = array_newPointer();
|
||||
|
||||
instance.classIndices = vector_int_newPointer();
|
||||
|
||||
instance.methodIndices = vector_int_newPointer();
|
||||
|
||||
return instance;
|
||||
|
||||
}
|
||||
|
||||
pipeline * pipeline_newPointer() {
|
||||
|
||||
struct pipeline * pointer = malloc( sizeof ( struct pipeline ) );
|
||||
|
||||
pointer->__classIndex = 45;
|
||||
|
||||
pointer->renderPasses = array_newPointer();
|
||||
|
||||
pointer->classIndices = vector_int_newPointer();
|
||||
|
||||
pointer->methodIndices = vector_int_newPointer();
|
||||
|
||||
return pointer;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user