Quantcast
Channel: advanced - openFrameworks
Viewing all 1244 articles
Browse latest View live

ofxGSTT and missing ofSoundBuffer

$
0
0

@nosarious wrote:

I am trying to create a program that uses the chrome workaround to get text from speech.

I have all appropriate libraries for this (lib sockets, json, ssl, gstt) but now I get an error: unknown type name 'ofSoundBuffer'

I see from this question: http://forum.openframeworks.cc/t/help-trying-to-run-master-branch/18318

that ofsoundbuffer is part of of_9.0.

Do I have to compile the entirety of the latest version of open frameworks (from the master doohickey) to get these missing files, or can I just copy them into open frameworks?

Never mind, I found the latest nightly build, and it fails to compile because 'curl_rule_01' declared as an array with a negative size

I just can't use ofxGSTT for my purposes. I was trying this on the yosemite 10.10 and Xcode.

Posts: 1

Participants: 1

Read full topic


OF on OS X Screensaver

$
0
0

@firm wrote:

I've been trying to get OF app to run as a OS X Screensaver. I've been looking into both latest find from years ago https://github.com/NickHardeman/openframeworks_osx_64/tree/master/apps/ScreenSaver and the older https://github.com/mazbox/of64/tree/master/apps/examples.

Now that latest master had already able to compile 64 bit app. I was hoping that this could finally possible in official taste of OF. I copied over NickHardeman's version of examples and try to get it running on master by fixing whatever Xcode errors. The latest progress I have is here https://github.com/firmread/ofScreenSaver.

Now I'm stuck with this error.


This happens on both master and NickHardeman's 64bit OF.

I notice that many of ofxScreenSaver code seem to replicating/replacing some of OF stuffs. For example, ofxAppMacScreenSaver.h looks a lot like ofAppGlutWindow.h used to be. But I just not familiar with core OF code enough to really figure out what to fix.

Any help would be appreciated, Thanks!
Firm

Posts: 6

Participants: 2

Read full topic

ofMesh to PDF/ofCairoRenderer cannot render colors

$
0
0

@Joao wrote:

Hey guys,

I'm having the following warning when rendering a ofMesh to a PDF using ofCairoRenderer. I'm able to render the wireframe but no colors

[warning] ofCairoRenderer: draw(): cairo mesh rendering doesn't support colors, textures, or normals. drawing wireframe ...

I would need to export at least solid colors, any ideas, suggestions, workaround?

Would really appreciate any help! Thanks in advance

Posts: 1

Participants: 1

Read full topic

Serial Port (OTG) for oF Android?

$
0
0

@rsp5y wrote:

Hi,

I'm trying to read/write to a serial port via openFrameworks using the NDK on Android Studio. I can successfully access my attached USB device in Java but am not finding any success in using OfSerial (doesn't identify any serial devices).

Anyone have any suggestions on how I can get serial read/write access to the attached OTG device?

Thanks!

Posts: 1

Participants: 1

Read full topic

Stop forced exit

$
0
0

@AlexGhost wrote:

Hello.
Such situation: there is openframeworks app, which before the shutdown should run some commands (I put them in the function exit()); openframeworks app ends from outside, from a dotnet application using system.diagnostics.process.kill(); the problem is that openframeworks app does not process command exit(), and off.

Posts: 1

Participants: 1

Read full topic

App store submission - iOS 64bit

$
0
0

@Schreda wrote:

Hello Community,

Is currently someone able to submit an of-app to the app store? I tried it tonight but always get the 64bit error. I worked for the app almost 9 month and I really would like to submit it! any help would be appreciated!!!!

Im currently using the latest build 0.8.4

Thank you
regards

Posts: 2

Participants: 2

Read full topic

3D Rotation of Objects with two Vectors

$
0
0

@toshakluev wrote:

Hi Guys!
I have a dumb question, i know, they are a couple of solutions in this forum but i dont understand how it realy works...

lets say, i have

ofVec3f BoxUpVector (0,1,0);
ofVec3f BoxNormalVector(0,0,1);

some Object for ex.

ofDrawBox(bla bla bla);

and i have two others vectors

ofVec3f NewUpVector (-0.608556, 0.789434, 0.0803312);
ofVec3f NewNormalVector(0.20675, 0.060007, 0.976552);

The BoxUpVector and BoxNormalVector are Vectors that describe a rotation of the Box. How can i rotate my Box, so my BoxUpVector is aligned with NewUpVector and BoxNormalVector with NewNormalVector?

ive tryed this, but it does not works every time.

ofPushMatrix();
   
   // align Normal Vectors
   ofVec3f CrossNewBoxNormals = NewNormalVector.getCrossed(BoxNormalVector);
   float   AngleBetweenNewBox = NewNormalVector.angle(BoxNormalVector);
   ofRotate(AngleBetweenNewBox, CrossNewBoxNormals.x, CrossNewBoxNormals.y, CrossNewBoxNormals.z);

   // rotate BoxUpVector
   ofVec3f RotatedBoxUpVector = BoxUpVector.getRotated(AngleBetweenNewBox, CrossNewBoxNormals);
   
   // Align Up Vectors
   ofVec3f CrossUpVectors      = RotatedBoxUpVector.getCrossed(NewUpVector);
   int RotationDirection       = CrossUpVectors.angle(NewNormalVector) < 1? 1: -1;
   float AngleBetweenUpVectors = RotatedBoxUpVector.angle(NewUpVector) * RotationDirection;
   
   // Rotate
   ofRotateZ(AngleBetweenUpVectors);
   
   // Draw this sh...
   ofDrawBox (0,0,0,100,200,300);

ofPopMatrix();

any suggestions? sunny

Posts: 4

Participants: 2

Read full topic

Cannot instantiate abstract class using 0.9.0: Visual Studio 2015 on Windows 8.1

$
0
0

@tintel_12_02 wrote:

The same code that compiled using Visual Studio 2012 and 0.8.4 will not compile with Visual Studio 2015 and 0.9.0:

This seems to me to be some kind of syntax issue. The 4 methods which the compiler is complaining about can be seen below. Does anyone know the syntax Visual Studio 2015 is looking for?

ofx*.cpp(46): error C2259: 'ofx*': cannot instantiate abstract class
1> ......\addons\ofx*I\libs\src\ofx*.cpp(46): note: due to following members:
1> ......\addons\ofx*I\libs\src\ofx*.cpp(46): note: 'void ofBaseDraws::draw(float,float,float,float) const': is abstract
1> ...of_v0.9.0_vs_release\libs\openFrameworks\types\ofBaseTypes.h(75): note: see declaration of 'ofBaseDraws::draw'

1> ......\addons\ofx*I\libs\src\ofx*.cpp(46): note: 'void ofBaseDraws::draw(float,float) const': is abstract
1> ...of_v0.9.0_vs_release\libs\openFrameworks\types\ofBaseTypes.h(67): note: see declaration of 'ofBaseDraws::draw'

1> ......\addons\ofx*I\libs\src\ofx*.cpp(46): note: 'float ofBaseDraws::getHeight(void) const': is abstract
1> ...of_v0.9.0_vs_release\libs\openFrameworks\types\ofBaseTypes.h(104): note: see declaration of 'ofBaseDraws::getHeight'

1> ......\addons\ofx*I\libs\src\ofx*.cpp(46): note: 'float ofBaseDraws::getWidth(void) const': is abstract
1> ...of_v0.9.0_vs_release\libs\openFrameworks\types\ofBaseTypes.h(108): note: see declaration of 'ofBaseDraws::getWidth'

Posts: 2

Participants: 1

Read full topic


VBO vertex array sorting?

$
0
0

@sam_mcelhinney wrote:

Hello,

I'm working with a large vertex array that exists as a VBO. At present the vertexes have a number of simple operations run on them in a kernel using ofxMSAOpenCL

I'd like to sort the vbo vertexes (by angular relation to a given point) without having to pull them back onto the cpu. Is there a simple way of doing this?

Thanks
Sam

Posts: 1

Participants: 1

Read full topic

ofxMaxim under linux with strange noise

0.9.0 ofTexture retain method causes exception: "map/set iterators incompatible"

$
0
0

@tintel_12_02 wrote:

0.9.0 ofTexture retain method causes exception: "map/set iterators incompatible". This was found on Visual Studio 2015 hosted on Windows 8.1:

Original code:

static void retain(GLuint id){
if(id!=0){
if(getTexturesIndex().find(id)!=getTexturesIndex().end()){
getTexturesIndex()[id]++;
}else{
getTexturesIndex()[id]=1;
}
}
}

Patched code:

void retain(GLuint id){
if(id!=0){

	if((!getTexturesIndex().empty())&&(getTexturesIndex().find(id) != getTexturesIndex().end())){
		getTexturesIndex()[id]++;
	}else{
		getTexturesIndex()[id]=1;
	}
}

}

Posts: 1

Participants: 1

Read full topic

How can I set mirror in ofxni2?

$
0
0

@moru wrote:

hi
I want to reverse y-axis in stream(depth, color images) and coordinate.
so I set Stream,setMirror(true); and Stream.setMirror(false); again and again
but result is same.
Could someone help me?

void Stream::setMirror(bool v)
{
stream.setMirroringEnabled(v);
}

btw, ofxKinectForWindows2 has filp y-axis function?

Posts: 1

Participants: 1

Read full topic

ofEasyCam::disableMouseInput has error on OF0.9RC

$
0
0

@dotchang wrote:

This is a bug report.

I tried to use OF0.9RC on Visual Studio 2015.
When I called disableMouseInput() of ofEasyCam function in the mouseDragged Function of OF, an error happened.

Maybe, in the function,
ofRemoveListener(events->mouseDragged, this, &ofEasyCam::mouseDragged);
made an error such as segmentation fault.

Posts: 1

Participants: 1

Read full topic

Transparencies when drawing an FBO in an FBO

$
0
0

@NaBUru38 wrote:

Hello, I'm developing a graphics program on OpenFrameworks, and I'm having issues with transparencies.

According to this, if you want to draw an FBO with transparencies on the screen, you must write this:

void draw ()
{
   // draw image on FBO

   textureFbo.begin ();  
   ofEnableAlphaBlending ();  
   image.draw (0, 0);  
   ofDisableAlphaBlending ();  
   textureFbo.end ();

   // draw FBO on screen

   glEnable (GL_BLEND);  
   glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
   textureFbo.draw (0,0);  
   glDisable (GL_BLEND);
​}

However, that code isn't working to me. The poster said: "You have to draw the fbo with a different blending mode than when you are drawing to the fbo."

But I'm drawing videos on an FBO, then draw them on another FBO, and then draw them on an ofxGLWarper. So I'm trying to do both things at the same time!

void draw ()
{
    // draw videos on a scene FBO
    
    sceneFbo->begin ();
    drawVideos ();
    sceneFbo->end ();
    
    // draw the scene FBO on a second FBO
    
    alphaFbo->begin ();
    sceneFbo->draw (0, 0);
    alphaFbo->end ();
    
    // draw the second FBO on a quad
    
    quad->begin ();
    alphaFbo->draw (0, 0);
    quad->end ();
​}

Actually it's even more complicated. I don't just draw videos in the scene, but also more FBOs. And the alphaFbo may use an alpha mask with setUniformTexture().

So I'm trying different combinations of glEnable, glBlendFunc and glEnableAlphaBlending but they don't work.

Any suggestions on how to draw an FBO in an FBO with transparencies? Or where can I learn about blending functions? Thanks!

Posts: 3

Participants: 2

Read full topic

How to dump values to the screen and update them every frame?

$
0
0

@pnrp wrote:

Hello,

I wander what is the easiest way of dumping a lot of values to the screen. I've got a vector of 20-30 float values which change every frame, and want to be able to see them on screen real-time.

I tried to use ofxGui with ofParameter but this seems to work if ofParameters are declared as class members (If ofParameters are stored as vector or even dynamic array the values don't update and the gui panel is glitched) And I have a variable number of this parameters.

Is there any pre-defined class or addon which helps in that matter? Or do I have to implement my own using ofDrawBitmapString?

Thanks

Posts: 4

Participants: 3

Read full topic


Stream data from mac/pc to ios/android over wifi/bluetooth

$
0
0

@rjlwest wrote:

can this be done with anything within openframeworks already? if not, any technologies already support this? it will be audio data.

Posts: 1

Participants: 1

Read full topic

Connecting firewire audio interface ruins openframeworks render

$
0
0

@rjlwest wrote:

the problem happens around glfwSwapBuffers, when i connect my echo audiofire 2 audio interface to my macbook on mac osx 10. whilst im testing it i have commented out all rendered objects and none of my code updates, so there is no actual connecting to the interface or anything that needs to be drawn to the screen aapart from the grey openframeworks window.

Any idea why this is happening? I tried setting doublebuffered to false so it woul use flush instead of glfwSwapBuffers but it didnt render anything.

Posts: 1

Participants: 1

Read full topic

Line in (audio thru)

$
0
0

@dimitre wrote:

Hello I'm wondering how to open a different audio input and audio output to make a line thru in my software.
So I can listen to the line in in speakers.
Thanks

Posts: 2

Participants: 2

Read full topic

Open raw binary files and interpret as sound

$
0
0

@rak_multi wrote:

Hey guys,

in Audacity there is a possibility to import almost every raw file as sound files. Like images binaries and so on. Do we have a similar possibility in OF / c++?

Any ideas on this?

Posts: 2

Participants: 2

Read full topic

ofxKinect: is getWorldCoordinateAt unitless or in mm

$
0
0

@osi wrote:

I would really appreciate if someone could answer this as it will help me understand a problem i have. I'm trying to measure two points (lets say a ruler) in real world coordinates (mm or meters). I know the Z axis of the point returned by getWorldCoordinateAt is in mm (since it is obtained from the depth sensor) and i'm assuming x and y should be too?. I knew this at some point (but i have some issues with memory).

Thanks smile

Posts: 1

Participants: 1

Read full topic

Viewing all 1244 articles
Browse latest View live