Search Results

Search found 2 results on 1 pages for 'chaiscript'.

Page 1/1 | 1 

  • ChaiScript troubles

    - by Ockonal
    Hello guys, I'm using script language ChaiScript with c++ and Qt. I've defined such function: void ChaiPainter::drawRectangle(QPainter *painter, int x, int y, int height, int width) { painter.drawRect(x, y, width, height); } And in application paint-event: void MainWindow::paintEvent(QPaintEvent *event) { QPainter painter(this); chaiPainter->mChai.add(chaiscript::var(&painter), "painter"); chaiPainter->mChai.add(chaiscript::fun(&ChaiPainter::drawRectangle), "drawRect"); chaiPainter->mChai("drawRect(painter, 5, 5, 100, 100)"); } The error is: 'chaiscript::Eval_Error' what(): Error: "No matching function to dispatch to with function 'drawRect'" during evaluation at (1, 1) What I do wrong?

    Read the article

  • C++ Game Library for SVG Based Game

    - by lefticus
    I'm looking into building a cross-platform opensource 2D RPG style game engine for ChaiScript. I want to be able to do all of the graphics with SVG and need joystick input. I also need the libraries I use to be opensource and compatible with the BSD license. I'm familiar with allegro, ClanLib, and SDL. As far as I can tell, none of these libraries have built in or obvious integration for SVG. Also, I'm aware of the previous conversations on this site regarding Qt for SVG game development. I'm hoping to avoid Qt because of the size and complexity of making it a requirement. Also, Qt does not seem to have joystick input support, which would require that SDL or some other library also be used. So my question can be summed up as this: What is the best way to get SVG and joystick support in a 2D C++ library while minimizing dependencies as much as possible (preferably avoiding Qt altogether)?

    Read the article

1