How to make openframeworks

Home Forums Spout Support How to make openframeworks

This topic contains 11 replies, has 4 voices, and was last updated by  leadedge 4 months, 1 week ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #819

    hiro
    Participant

    Hellow
    I want to make Openframeworks
    but,I was made ​​to see the file, but could not be made.
    Could you tell me how to make a openframeworks someone?

    #820

    leadedge
    Keymaster

    Hello hiro.

    are you using the the current Spout Version 1 dll?

    ..\Program Files\Spout\SPOUTDLL\

    Are you able to create a project and compile the sender example?

    ..\Program Files\Spout\SPOUTDLL\Example\Openframeworks\src\ofSpoutSender\

    The easiest way to do this is make a copy of the Openframeworks example project and replace the source files with the Spout example.

    Let me know what the problem is and I will try to help.

    #821

    hiro
    Participant

    Hi leadedge!

    Thank you for your quick reply.

    My under system environment is
    ・windows7
    ・openrameworks ver0.8.3
    ・Microsoft Visual Studio Express 2012 for Windows Desktop

    The following procedures were followed.

    ① I made 「ofxSpout」folder
    【openframeworks\of_v0.8.3_vs_release\addons\ofxSpout】
    next,
    Spout\SPOUTDLL\Example\Openframeworks\src
    Spout\SPOUTDLL\Example\Openframeworks\bin
    src and bin file was put in the ofxSpout.
    so,
    openframeworks\of_v0.8.3_vs_release\addons\ofxSpout\src
    openframeworks\of_v0.8.3_vs_release\addons\ofxSpout\bin

    ②I made new projectfile of openframeworks
    use projectGenerator
    then check a ofxSpout

    ③file of「main.cpp , ofApp.cpp , ofApp.h」 was rewritten to 「main.cpp,testApp.cpp,testApp.h」of ofSpoutSender.

    but I can’t build
    What will be the cause?

    #822

    leadedge
    Keymaster

    The Spout Openframeworks example is not an addon, so you don’t copy the files into the addon folder.

    Also I am sorry that I forgot to check your Openframeworks version and remind you that the examples were made with an older version of Openframeworks, Version 071, so the source file names are different. With Version 083, the project generator produces ofApp.cpp and ofApp.h, so if you replace them with the old style testApp.cpp and testApp.h, the project will not find the original files and it will not compile.

    I can’t update to Openframeworks 083 just yet due to other problems with VS2012 and VS2013, and Version 083 is not compatible with VS2010, so I can’t provide a working copy for you.

    What I would suggest is to create an empty project with projectgenerator and make sure that it compiles. I suggest using release instead of debug. Then you can copy and paste parts of the Spout example into the files ofApp.cpp and ofApp.h.

    Start by copying Spout.h into your project src folder. Then paste the code from the header file testApp.h into ofApp.h and check whether it compiles OK. It might complain about exit being missing. If so, comment that out in the header for now.

    After you get that working, you will need “SpoutLogoMarble3.bmp” in the data folder and “Spout32.dll” in the bin folder.

    Then copy parts from the Spout example testApp.cpp into ofApp.cpp. Start by adding the function “InitTexture” and make sure you change testApp to ofApp and check if it compiles OK.

    Then copy all of the Setup function. If it compiles, you are half way there. Continue with exit and windowresized and finally draw.

    Along the way you will probably find changes from 071 to 083. As I say, I can’t test this for you so I hope you can get it working.

    With the new Spout2 SDK in development I will be looking at updating the Openframeworks example.

    Let me know how you get on.

    #823

    hiro
    Participant

    Thank you for the connection.
    I try instantly.
    I will report, if a result comes out.

    #901

    MatLoz
    Participant

    I just created a small addon to simplify the integration with an OpenFrameworks project :
    https://github.com/Mat-Loz/ofxSpout

    #902

    leadedge
    Keymaster

    That’s brilliant. Hold that thought and we will work on this shortly with Spout 2.

    #903

    MatLoz
    Participant

    Thanks. By the way, I just noticed that image in receiver is upside down

    #904

    leadedge
    Keymaster

    OK. Try :

    SendTexture(_spoutTexture, GL_TEXTURE_2D, _width, _height, true); // invert = true

    Let us know if this fixes it.

    Corrected in Version 2.

    #909

    MatLoz
    Participant

    That fixed it, thanks !

    #3474

    Aurelian24
    Participant

    Hello there ! Sorry for reviving this post, im tryng to compile the OF example .

    I´ve already have all the spout files in my proyect thought im having this weird error :

    Cant include ‘resource.h’:

    #3475

    leadedge
    Keymaster

    resource.h and resource.rc are included with the example source, but they are only there to load a custom icon and really the example should be more basic. Anyway, check that you have these files in the “src” folder.

    Otherwise just remove :

    From ofApp.h :

    #include "resource.h" // for custom icon

    From ofApp.cpp :

    SetClassLong(GetActiveWindow(), GCL_HICON, (LONG)LoadIconA(GetModuleHandle(NULL), MAKEINTRESOURCEA(IDI_ICON1)));

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.