If you're interested in embedding, here is the start 
of my test program. Requires SDL2, freetype, OpenGL
and other game like stuff, so we can make it fairly
realistic.

If you can get this running, as well as Felix, you're
in good shape to play with embedding features.

Next step is to integrate Felix in this code, and get
Felix to do some of the processing. You WILL require
the latest Felix from GitHub and be able to rebuild it
since the experiment will involve using this demo
to drive the API design. I'll commit the C++ code when
I can figure out where to put it :)

/* compile with
clang++ --std=c++11 -o evtdemo -I/usr/local/include -framework OpenGL 
-L/usr/local/lib -lSDL2 -lSDL2_ttf -lfreetype evtdemo.cxx 
*/
#include "SDL2/SDL.h"
#include "SDL2/SDL_ttf.h"
int main()
{
  SDL_Init(SDL_INIT_VIDEO);
  TTF_Init();

  char const *font_file = "/Library/Fonts/Courier New Bold.ttf";
  auto font = TTF_OpenFont (font_file, 12);
  auto w = SDL_CreateWindow("Stuff", SDL_WINDOWPOS_CENTERED, 
SDL_WINDOWPOS_CENTERED, 512,512,
   SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
  SDL_PumpEvents();
  SDL_Event e;
  while (1) {
    // SDL Polling Loop
    while(SDL_PollEvent (&e))
    {
      printf("got an event\n");
      if (e.type == SDL_QUIT) goto exit_point;
    }
  }
exit_point:
  SDL_QUIT();
  exit(0);
}



--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to