|
programminginiTreeStructure (iniTree with vertices output)Some days ago I posted iniTree plugin, that allow to draw recursive ternary trees. Gtoledo suggested to rewrite the plugin as a provider. Asking the community what is the best way to output a structure from a QCplugin, I used the method suggested by dust, and the implemented iniTreeStructure, which is a iniTree plugin witch outputs vertices positions. Inputs:
Outputs:
xCode error on compilationI've been trying to get some OpenGL and GLSL stuff done as executables in xCode, whilst porting GLSL stuff back to QC's GLSL level of support. When trying to compile Shader Maker from source [it's executable fails to stay loaded in OS X 10.7.x] I got the following error Any ideas as to why that is happening and what can be done to rectify the problem? Just can't see the wood for the trees on this at present :-)
How to output a vertices structure from a custom plugin (with code)Hi to all, I'm trying to extend my iniTree plugin with a custom plugin that outputs a structure with vertices position every frame, as suggested by gToledo. To try this kind of output I tried to modify my drawTest plugin so instead of render vertices it outputs vertices position.. but I cannot make it work properly. This is my approach:
float v[VSIZE][3];
for(int x=0;x<numV;x++){ [currVertex removeAllObjects]; [currVertex addObject:[NSNumber numberWithFloat:v[x][0]]]; [currVertex addObject:[NSNumber numberWithFloat:v[x][1]]]; [currVertex addObject:[NSNumber numberWithFloat:v[x][2]]]; [currVertex addObject:[NSNumber numberWithFloat:1.0]]; [outputVertices addObject:currVertex]; } //create output structure self.output_struct = [NSArray arrayWithArray:outputVertices]; It seems to output the same kind of result of a mesh importer (you can see it in outputs img), but for some reason my plugin output doesn't work. In the zip you can find xcode project, a composition example and a dae mesh to test it. I think I don't build the structure in the correct way. For example, in the Apple developer guide I read that we must use NSDictionary to output a structure, but I can't use it in the correct way. Anyone knows the correct way to output a structure from a custom plugin?
My first Plug-in problem! Blending modesI'm making my first plug-in. It's a simple consumer plug in that renders filled ellipses. I have a problem/question at the moment: How to implement different0 blending modes in it (As same as the KinemeGL render patches )?
Using GLUT in QC custom pluginHi,
is it possible to use GLUT library inside a custom QC plugin? I tried to do that in this way: #import <OpenGL/OpenGL.h> #import <OpenGL/gl.h> #import <OpenGL/glu.h> in my plugin.h now, if in the execute method I try to make a simple sphere with this simple code.. - (BOOL) execute:(id<QCPlugInContext>)context atTime:(NSTimeInterval)time withArguments:(NSDictionary*)arguments { [...] GLUquadricObj *quadratic; quadratic=gluNewQuadric(); gluQuadricNormals(quadratic, GLU_SMOOTH); gluQuadricTexture(quadratic, GL_TRUE); gluSphere(quadratic,10.3f,32,32); [...] } ..nothing happens. Where I am wrong? Thank you, Luke
|