| 00:01.09 | kunigami_ | If anyone confirm that I'll change it |
| 00:03.16 | kunigami_ | oops ignore the operator & there |
| 00:22.42 | brlcad | abhi2011: wanting to "write a basic plugin" can mean many many things to a package as large as brl-cad |
| 00:23.06 | abhi2011 | ok |
| 00:23.29 | brlcad | could be new object type, new shaders, new commands, new tools, ... |
| 00:23.31 | abhi2011 | so I am trying to learn how to compile plugins |
| 00:23.41 | abhi2011 | i just want to print something |
| 00:23.48 | abhi2011 | on the console and exit |
| 00:23.55 | brlcad | from what? |
| 00:24.13 | abhi2011 | from inside the plugin |
| 00:24.19 | abhi2011 | this is for the physics engine |
| 00:24.22 | brlcad | still, a plugin to *what* :) |
| 00:24.33 | abhi2011 | we were discussing in the mailing list |
| 00:24.35 | brlcad | brl-cad is a suite of applications |
| 00:24.49 | brlcad | okay, so probably a new command |
| 00:24.54 | abhi2011 | yes |
| 00:24.58 | brlcad | commands go into libged |
| 00:25.06 | abhi2011 | so something like ged_physics() |
| 00:25.46 | bhinesley | src/libged/zap.c is a small example |
| 00:26.57 | abhi2011 | 1 sec i ll ok |
| 00:27.05 | bhinesley | or version.c |
| 00:27.10 | abhi2011 | ok |
| 00:27.14 | brlcad | yeah, there are about 400 examples in there |
| 00:27.30 | abhi2011 | ok....is there any doc which discusses how to compile the plugin |
| 00:27.39 | abhi2011 | that is after i have setup the tcl code and c code |
| 00:27.48 | brlcad | add them to src/mged/setup.c and you'll have it available in mged |
| 00:27.59 | abhi2011 | ah ok |
| 00:28.08 | abhi2011 | well i actually wanted to make a plugin for archer |
| 00:28.47 | abhi2011 | the plugin will allow simple physics ultmately |
| 00:28.48 | brlcad | adding to archer is a bit more involved, save that for later |
| 00:28.57 | abhi2011 | ok |
| 00:29.11 | brlcad | it's easy, but that's code that's in flux, so no need to waste time |
| 00:29.37 | abhi2011 | so to compile the code I guess something like : cc -I/usr/brlcad/include/brlcad -L/usr/brlcad/lib -o rtexample rtexample.c -lbu -lrt -lm |
| 00:29.42 | brlcad | if a new physics command does what you're proposing it will do, then can look into archer hooks |
| 00:29.43 | abhi2011 | should do ? |
| 00:30.06 | brlcad | you could do that, assumes a brl-cad install but better would be to add it to the build logic |
| 00:30.23 | abhi2011 | ok |
| 00:30.34 | brlcad | if you're doing an autotools compile, you edit the Makefile.am; or if you're doing a cmake compile, it's the CMakeLists.txt file |
| 00:30.37 | brlcad | then just make |
| 00:30.48 | abhi2011 | ok |
| 00:30.59 | brlcad | (after running autogen.sh or cmake or configure, depends on which build system you use and your platform) |
| 00:31.08 | brlcad | INSTALL and INSTALL.cmake have details |
| 00:31.16 | abhi2011 | ok |
| 00:31.54 | abhi2011 | by the way I was trying out the example from http://brlcad.org/w/images/3/3d/Application_Development.pdf |
| 00:32.04 | abhi2011 | the rtexample.c file |
| 00:32.06 | brlcad | kunigami_: good find if it is the bug, but I'm not familiar with that shader -- ``Erik wrote it |
| 00:32.15 | abhi2011 | if i compile using cc -I/usr/brlcad/include/brlcad -L/usr/brlcad/lib -o rtexample rtexample.c -lbu -lrt -lm |
| 00:32.16 | brlcad | abhi2011: yes? |
| 00:32.20 | abhi2011 | then i get |
| 00:32.37 | abhi2011 | no bio.h file |
| 00:32.57 | brlcad | need to also include /usr/brlcad/include |
| 00:33.00 | abhi2011 | and this header is indeed not present in /usr/include/brlcad |
| 00:33.33 | abhi2011 | ah ok |
| 00:33.43 | brlcad | actually, you're right |
| 00:33.50 | brlcad | bio.h is considered a private header |
| 00:34.06 | abhi2011 | yah |
| 00:34.11 | abhi2011 | i dont c it there either |
| 00:34.26 | abhi2011 | in /usr/brlcad/include i mean |
| 00:34.46 | abhi2011 | there is a file called fbio.h |
| 00:35.01 | abhi2011 | in /usr/brlcad/include/brlcad |
| 00:35.19 | abhi2011 | i popped that in instead :P |
| 00:35.51 | CIA-62 | BRL-CAD: 03brlcad * r45559 10/brlcad/trunk/src/rt/rtexample.c: doesn't seem to be a real need for bio.h here. remove it since this is an example application meant to compile outside brl-cad's build system. thx abhi2011 for the catch. |
| 00:36.15 | abhi2011 | ok |
| 00:36.18 | abhi2011 | np |
| 00:36.40 | brlcad | technically, http://brlcad.org/w/images/3/3d/Application_Development.pdf doesn't reference bio.h ;) |
| 00:36.57 | abhi2011 | ah ok |
| 00:37.09 | abhi2011 | well no tcl.h now |
| 00:37.21 | abhi2011 | [abhi@abhi rt]$ cc -I/usr/brlcad/include/brlcad -L/usr/brlcad/lib -o rtexample rtexample.c -lbu -lrt -lm |
| 00:37.22 | abhi2011 | In file included from /usr/brlcad/include/brlcad/vmath.h:85:0, |
| 00:37.24 | abhi2011 | <PROTECTED> |
| 00:37.25 | abhi2011 | /usr/brlcad/include/brlcad/bu.h:216:58: fatal error: tcl.h: No such file or directory |
| 00:37.27 | abhi2011 | compilation terminated. |
| 00:37.51 | brlcad | that's system dependent |
| 00:37.58 | abhi2011 | ah ok got it |
| 00:38.00 | brlcad | either in /usr/brlcad/include or somewhere else on your system |
| 00:38.06 | abhi2011 | yes right |
| 00:38.09 | abhi2011 | will put it in |
| 00:38.11 | brlcad | that compile line is just supposed to be notional, no way to make it work for everyone |
| 00:38.20 | abhi2011 | right |
| 00:49.20 | abhi2011 | ok got rtexample.c compiled with cc -I/usr/brlcad/include/brlcad -I/usr/brlcad/include-L/usr/brlcad/lib -o rtexample rtexample.c -lbu -lrt -lm |
| 00:49.58 | abhi2011 | now there is a shared library error with brlcad utility library |
| 00:50.01 | abhi2011 | [abhi@abhi rt]$ ./rtexample sphere.g sph1.s |
| 00:50.03 | abhi2011 | ./rtexample: error while loading shared libraries: libbu.so.19: cannot open shared object file: No such file or directory |
| 00:51.03 | abhi2011 | perhaps its not looking in /usr/brlcad/lib |
| 00:51.17 | abhi2011 | where i can see the library is present |
| 00:52.29 | abhi2011 | hmm....I have given the lib path correctly during compiling though |
| 00:59.35 | abhi2011 | probably load library path |
| 00:59.51 | *** join/#brlcad Stattrav (~Stattrav@117.192.137.87) | |
| 00:59.51 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 01:03.02 | kunigami_ | abhi2011: which OS? |
| 01:03.11 | abhi2011 | right finally got rtexample working |
| 01:03.16 | brlcad | your example line has a typo, before the -L |
| 01:03.18 | abhi2011 | fedora 15 |
| 01:03.26 | brlcad | (no space) |
| 01:03.48 | abhi2011 | yes i corrected that |
| 01:04.25 | abhi2011 | the $LD_LIBRARY_PATH was not pointing to /usr/brlcad/lib |
| 01:04.36 | abhi2011 | i put that in , now it runs |
| 01:04.53 | brlcad | not particularly relevant for implementing a physics engine command, but here's a similar example that shows one of the interfaces for creating procedural geometry: http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk/src/proc-db/wdb_example.c?revision=45559&view=markup |
| 01:05.07 | brlcad | LD_LIBRARY_PATH shouldn't need to point to /usr/brlcad/lib |
| 01:05.13 | brlcad | unless you already had is set |
| 01:05.49 | brlcad | LD_LIBRARY_PATH overrides whatever the binary was compiled to look in, if it was set then the solution was probably to just unset it |
| 01:06.03 | brlcad | unless you have it set due to other apps or something like that |
| 01:06.07 | abhi2011 | well ok i ll try unsetting it |
| 01:06.13 | abhi2011 | it was blank before |
| 01:06.23 | brlcad | set or blank? |
| 01:06.31 | brlcad | er, unset or blank? |
| 01:06.41 | brlcad | empty is not the same as unset |
| 01:06.49 | abhi2011 | it was blank...but the program was complaining when it was blank |
| 01:07.12 | abhi2011 | hmm....it was printing a blank line when i echoed it |
| 01:07.45 | brlcad | so what are you studying? |
| 01:08.06 | abhi2011 | i am doing computer engineering |
| 01:08.17 | brlcad | undergrad or grad? |
| 01:08.22 | abhi2011 | grad |
| 01:08.39 | abhi2011 | you are studying as well ? |
| 01:08.52 | brlcad | always ;) |
| 01:08.58 | abhi2011 | hehe |
| 01:09.00 | brlcad | but not in a university setting any more |
| 01:09.07 | abhi2011 | ok |
| 01:09.17 | abhi2011 | hmm..same error again |
| 01:09.29 | abhi2011 | ./rtexample: error while loading shared libraries: libbu.so.19: cannot open shared object file: No such file or directory |
| 01:10.00 | abhi2011 | but i think the gcc linker will link it in as a static library |
| 01:10.16 | brlcad | ldd rtexample |
| 01:10.26 | abhi2011 | yep abt to do tht |
| 01:10.47 | abhi2011 | hmm |
| 01:10.52 | abhi2011 | [abhi@abhi rt]$ ldd rtexample |
| 01:10.52 | brlcad | there's no reason it shouldn't work non-static and without LD_LIBRARY_PATH set |
| 01:10.53 | abhi2011 | linux-gate.so.1 => (0x00339000) |
| 01:10.56 | abhi2011 | libbu.so.19 => not found |
| 01:10.57 | abhi2011 | librt.so.19 => not found |
| 01:10.58 | abhi2011 | libm.so.6 => /lib/libm.so.6 (0x4d18c000) |
| 01:11.00 | abhi2011 | libc.so.6 => /lib/libc.so.6 (0x4cfd1000) |
| 01:11.02 | abhi2011 | /lib/ld-linux.so.2 (0x4cfb0000) |
| 01:11.54 | brlcad | what does it report if you just run this: cc -I/usr/brlcad/include/brlcad -I/usr/brlcad/include -L/usr/brlcad/lib -o rtexample rtexample.c |
| 01:12.51 | abhi2011 | lots of undefined references |
| 01:13.08 | abhi2011 | [abhi@abhi rt]$ cc -I/usr/brlcad/include/brlcad -I/usr/brlcad/include -L/usr/brlcad/lib -o rtexample rtexample.c |
| 01:13.10 | abhi2011 | /tmp/cchQUtho.o: In function `hit': |
| 01:13.12 | abhi2011 | rtexample.c:(.text+0x58): undefined reference to `bu_log' |
| 01:13.13 | abhi2011 | rtexample.c:(.text+0x133): undefined reference to `bu_badmagic' |
| 01:13.15 | abhi2011 | rtexample.c:(.text+0x1a8): undefined reference to `bu_badmagic' |
| 01:13.17 | abhi2011 | rtexample.c:(.text+0x226): undefined reference to `bu_badmagic' |
| 01:13.18 | abhi2011 | ..... |
| 01:14.04 | abhi2011 | hmm the -L flag should be enough to specify the library path |
| 01:14.06 | brlcad | so then: cc -I/usr/brlcad/include/brlcad -I/usr/brlcad/include -L/usr/brlcad/lib -o rtexample rtexample.c -lrt -lbu -lm |
| 01:15.04 | abhi2011 | that command compiles successfully |
| 01:15.22 | brlcad | but then ldd still says not found? |
| 01:15.31 | abhi2011 | yep |
| 01:15.33 | abhi2011 | [abhi@abhi rt]$ cc -I/usr/brlcad/include/brlcad -I/usr/brlcad/include -L/usr/brlcad/lib -o rtexample rtexample.c -lrt -lbu -lm |
| 01:15.35 | abhi2011 | [abhi@abhi rt]$ ldd rtexample |
| 01:15.37 | abhi2011 | linux-gate.so.1 => (0x00b43000) |
| 01:15.38 | abhi2011 | librt.so.19 => not found |
| 01:15.40 | abhi2011 | libbu.so.19 => not found |
| 01:15.41 | abhi2011 | libm.so.6 => /lib/libm.so.6 (0x4d18c000) |
| 01:15.43 | abhi2011 | libc.so.6 => /lib/libc.so.6 (0x4cfd1000) |
| 01:15.44 | abhi2011 | /lib/ld-linux.so.2 (0x4cfb0000) |
| 01:15.46 | abhi2011 | [abhi@abhi rt]$ |
| 01:15.52 | brlcad | then something with your ld setup doesn't seem standard |
| 01:16.19 | abhi2011 | hmm..its a fresh fedora install |
| 01:16.44 | brlcad | set > file |
| 01:16.50 | brlcad | pastebin the file |
| 01:16.56 | abhi2011 | ok |
| 01:17.15 | brlcad | cc --version |
| 01:17.43 | brlcad | fwiw, it doesn't really matter (at least in terms of getting work done) |
| 01:18.06 | brlcad | it's something particular to either your setup and system or fedora in general |
| 01:18.16 | brlcad | usual integration is to mod the build system |
| 01:18.26 | abhi2011 | ok |
| 01:18.39 | abhi2011 | by the way...what do you mean by paste binning the file |
| 01:18.45 | abhi2011 | i ll just paste it here ? |
| 01:18.48 | brlcad | ~pastebin |
| 01:18.48 | ibot | [~pastebin] A "pastebin" is a web-based service where you should paste anything over 3 lines so you don't flood the channel. Here are links to a few : http://www.pastebin.com , http://pastebin.ca , http://channels.debian.net/paste , http://paste.lisp.org , http://bin.cakephp.org/ , http://asterisk.pastey.net/ , or install pastebinit with yum or aptitude. |
| 01:18.57 | brlcad | don't use the first one |
| 01:19.36 | abhi2011 | ok |
| 01:20.33 | abhi2011 | http://bin.cakephp.org/view/1242653996 |
| 01:23.12 | abhi2011 | [abhi@abhi rt]$ cc --version |
| 01:23.14 | abhi2011 | cc (GCC) 4.6.0 20110530 (Red Hat 4.6.0-9) |
| 01:23.16 | abhi2011 | Copyright (C) 2011 Free Software Foundation, Inc. |
| 01:25.27 | abhi2011 | dont try to hack my system :P |
| 01:32.49 | brlcad | why would I bother with that? :P |
| 01:33.07 | brlcad | so you DO have LD_LIBRARY_PATH set to empty |
| 01:33.14 | brlcad | try: unset LD_LIBRARY_PATH |
| 01:33.19 | brlcad | then ./rtexample |
| 01:36.14 | abhi2011 | haha just kidding :) |
| 01:36.27 | abhi2011 | ok yah i ll try that |
| 01:38.45 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 01:42.06 | abhi2011 | [abhi@abhi rt]$ unset LD_LIBRARY_PATH |
| 01:42.08 | abhi2011 | [abhi@abhi rt]$ ./rtexample |
| 01:42.10 | abhi2011 | ./rtexample: error while loading shared libraries: librt.so.19: cannot open shared object file: No such file or directory |
| 01:42.12 | abhi2011 | [abhi@abhi rt]$ echo $LD_LIBRARY_PATH |
| 01:42.52 | abhi2011 | seems that its unable to find the library without the library path being set |
| 01:47.46 | kunigami_ | Did you try: export LD_LIBRARY_PATH=/usr/brlcad/lib ? |
| 01:50.31 | abhi2011 | yes that does work of course |
| 01:50.57 | abhi2011 | ok so I am trying to add a command to Mged |
| 01:51.28 | abhi2011 | i copied src/libged/zap.c to test.c |
| 01:51.37 | abhi2011 | and i have modified it to : |
| 01:52.06 | abhi2011 | http://bin.cakephp.org/view/118439282 |
| 01:52.36 | abhi2011 | then in setup.c i added a cmd below the zap command |
| 01:52.47 | abhi2011 | <PROTECTED> |
| 01:52.49 | abhi2011 | <PROTECTED> |
| 01:52.50 | abhi2011 | {"T", cmd_test, GED_FUNC_PTR_NULL}, |
| 01:52.52 | abhi2011 | <PROTECTED> |
| 01:52.55 | abhi2011 | the T command for testing |
| 01:53.17 | abhi2011 | now I guess i need to compile these 2 files |
| 01:53.33 | abhi2011 | so do I compile like I did for rtexample.c ? |
| 01:54.00 | CIA-62 | BRL-CAD: 03bhinesley * r45560 10/brlcad/trunk/src/librt/db_fullpath.c: |
| 01:54.00 | CIA-62 | BRL-CAD: db_string_to_path() will trim all leading slashes, but only one trailing slash; |
| 01:54.00 | CIA-62 | BRL-CAD: then it fails when more than one trailing slash is given. I can think of no |
| 01:54.00 | CIA-62 | BRL-CAD: reason why it shouldn't remove all trailing slashes, so now it does. |
| 01:55.11 | abhi2011 | i think the cmd_test still needs to be defined though |
| 01:59.25 | bhinesley | abhi2011: actually, mged isn't using libged for that one... |
| 02:00.18 | bhinesley | you need a better example :) |
| 02:01.36 | bhinesley | archer is using ged_zap, while mged is using cmd_zap |
| 02:04.24 | bhinesley | ged_cat in cat.c is another short one |
| 02:05.14 | bhinesley | what you'll need is something like {"T", cmd_ged_plain_wrapper, ged_test} |
| 02:13.55 | brlcad | abhi2011: the thing is, the library path is supposed to be set in the binary (unless ld or gcc are configured otherwise) |
| 02:14.35 | brlcad | like I said, might be a fedora-specific setting or something different with gcc 4.6 |
| 02:15.03 | brlcad | either way, really doesn't matter -- that's not the usual compile method -- we use a build system |
| 02:15.27 | brlcad | so first step is to compile and install all of brl-cad -- there is a checklist on the wiki of things to do |
| 02:15.47 | brlcad | as for the command, everything bhinesley is saying is spot on :) |
| 02:55.58 | *** join/#brlcad kunigami_ (~kunigami@201.53.206.27) | |
| 04:26.07 | *** join/#brlcad Stattrav (~Stattrav@117.202.21.215) | |
| 04:26.07 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 04:31.06 | *** join/#brlcad Stattrav (~Stattrav@117.202.23.74) | |
| 04:31.06 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 04:58.47 | *** join/#brlcad Stattrav (~Stattrav@117.202.23.74) | |
| 04:58.47 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 06:39.46 | CIA-62 | BRL-CAD: 03bhinesley * r45561 10/brlcad/trunk/src/libged/edit.c: Fixed a bunch of logic bugs. Implemented 'quiet' flagging for edit_str_to_arg, and allowed for conversions to be silently attempted whenever a string *might* contain an arg. |
| 06:54.21 | *** join/#brlcad merzo (~merzo@193.254.217.44) | |
| 07:08.41 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 07:17.12 | CIA-62 | BRL-CAD: 03bhinesley * r45562 10/brlcad/trunk/src/libbu/bomb.c: "not validating 'write' return value; missed this in r45542" |
| 07:24.37 | *** join/#brlcad Stattrav (~Stattrav@117.213.184.187) | |
| 07:24.40 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 07:39.31 | *** join/#brlcad epileg (~epileg@unaffiliated/epileg) | |
| 10:25.26 | *** join/#brlcad kunigami_ (~kunigami@201.53.206.27) | |
| 10:28.32 | *** join/#brlcad merzo (~merzo@193.254.217.44) | |
| 10:55.19 | tharis20 | brlcad: does fixing a broken link on your wiki count as a useful patch? :p |
| 11:07.40 | abhi2011 | brlcad: well i have installed all of brlcad |
| 11:08.44 | abhi2011 | and I have setup a new file in src\libged |
| 11:08.54 | abhi2011 | src\libged\test.c |
| 11:09.57 | abhi2011 | so I want it to be a new command to mged |
| 11:10.29 | abhi2011 | i inserted a new command into setup.c |
| 11:10.59 | abhi2011 | {"T", cmd_ged_plain_wrapper, ged_test}, |
| 11:12.01 | abhi2011 | my question is how do I now compile both the files : setup.c and test.c, so that they become available in mged |
| 11:18.59 | kunigami_ | add test.c to LIBGED_SOURCES at libged/CMakeLists.txt |
| 11:19.37 | CIA-62 | BRL-CAD: 03brlcad * r45563 10/brlcad/trunk/src/libbu/bomb.c: write() returns an ssize_t, simplify test |
| 11:22.55 | brlcad | tharis20: can I apply the fix with the patch command? |
| 11:23.27 | brlcad | abhi2011: did you compile/install using cmake? |
| 11:24.02 | brlcad | if so, then what kunigami_ said, recompile, and test.c should get built |
| 11:24.14 | brlcad | if you used autotool, edit src/libged/Makefile.am, then recompile |
| 11:32.16 | abhi2011 | umm no i nstalled brlcad from the rpm |
| 11:32.32 | abhi2011 | so should i build brlcad from source ? |
| 11:32.51 | abhi2011 | is there no way to compile plugins without compiling all of brlcad ? |
| 11:39.30 | tharis20 | in the features request tracker there are some marked open which are already solved |
| 11:41.41 | brlcad | abhi2011: have you ever worked with open source (development) before? |
| 11:42.00 | brlcad | tharis20: yeah, they've not been reviewed in a little while, couple months out of sync |
| 11:42.33 | brlcad | better are the BUGS and TODO files in the source code, or run the tools until you encounter an issue |
| 11:44.00 | tharis20 | I was reading them so that I could choose one to try to implement and I was always "Ok, I don't understand this... isn't this already implemented? No, otherwise it would be closed. It's probably me not understading..." |
| 11:44.01 | brlcad | abhi2011: you can compile plugins without compiling all of brlcad but if it's not obvious how to do that, then you should build the package from source |
| 11:44.12 | abhi2011 | well i have installed open source software before and I know how to compile softwares from source |
| 11:44.27 | abhi2011 | but no i havent actually worked on an open source project |
| 11:45.27 | brlcad | we make compiling brl-cad about as simple as it gets, especially for a package this big, including adding additions -- but yes, you could set up your own build module outside our build system if you wanted using whatever tools you like |
| 11:45.55 | brlcad | it's just a lot easier to explain the integrated approach and socis will be entirely focused on an integrated approach anyways |
| 11:46.16 | abhi2011 | ok yes, I am fine with that |
| 11:46.32 | abhi2011 | so by the integrated approach you mean using cmake right ? |
| 11:46.40 | brlcad | fwiw, stand-alone development is highly frowned upon around here, we all work together so there should be no hesitation to add to the core |
| 11:46.41 | abhi2011 | using cmake to build brlcad from source ? |
| 11:46.51 | brlcad | cmake or autotools |
| 11:46.55 | brlcad | we have two major build systems |
| 11:47.10 | brlcad | autotools is the older more established, but we're in the process (right now) replacing it with a cmake build |
| 11:47.45 | abhi2011 | yes of course..I do not want to do stand-alone development, i want to do this with the community :) |
| 11:47.47 | brlcad | every major feature we remove, though, goes through a proper deprecation removal process so it's not just yanked out from under our users |
| 11:48.09 | brlcad | so autotools is now considered deprecated, and in a few months there will be only cmake |
| 11:48.16 | abhi2011 | ok |
| 11:48.30 | abhi2011 | all I want to do is learn how to make plugins in brlcad |
| 11:48.41 | brlcad | but in the time being, either/both work (and if you make it into socis, you'd be expected to update both) |
| 11:48.42 | abhi2011 | so I can move on to real development of the physics |
| 11:48.58 | abhi2011 | ok yes i understand |
| 11:49.53 | brlcad | like I said yesterday, we have at least a dozen different concepts of a plugin and they all get hooked in differently -- for libged commands, it's (not necessary, but) easiest to just add to the existing build |
| 11:50.07 | brlcad | tharis20: which feature? |
| 11:50.38 | brlcad | abhi2011: have you looked over http://brlcad.org/wiki/Summer_of_Code/Checklist ? |
| 11:50.49 | tharis20 | brlcad: fbclear, for example |
| 11:51.11 | brlcad | link? |
| 11:51.38 | abhi2011 | ah no not yet. right I ll have a look |
| 11:52.09 | tharis20 | http://sourceforge.net/tracker/?func=detail&aid=3238193&group_id=105292&atid=640805 |
| 11:52.27 | tharis20 | this one also http://sourceforge.net/tracker/?func=detail&aid=3279756&group_id=105292&atid=640805 |
| 11:52.41 | brlcad | tharis20: as far as I know, mged doesn't sport an fbclear command still |
| 11:53.27 | brlcad | the latter for the mater command was a bug and is fixed |
| 11:53.49 | tharis20 | I thought it did, in the Introduction to MGED, it mentions this command |
| 11:53.53 | tharis20 | let me check again |
| 11:54.27 | brlcad | theres a gui fbclear button |
| 11:54.29 | brlcad | but no command |
| 11:56.07 | tharis20 | is the function of the wanted command the same of the button? |
| 11:57.14 | abhi2011 | ok I have a question about the Application requirements for SOCIS |
| 11:57.39 | abhi2011 | so is submitting a patch required for being accepted |
| 12:05.00 | abhi2011 | right I have read through the requirements |
| 12:07.33 | abhi2011 | To write a successful propsal, I am trying to compile brlcad from source and write a basic plugin |
| 12:09.54 | abhi2011 | given the tight timeline for SOCIS, how strictly will the acceptance requirements be followed ? |
| 12:10.24 | abhi2011 | especially submitting a patch within the short timeframe would be really tight |
| 12:11.25 | ``Erik | the patch is just to prove that you can compile the code, follow the coding guidelines in the HACKING file and interface with subversion, it doesn't have to be a major change |
| 12:18.29 | abhi2011 | ok I understand...right I ll get on it |
| 12:29.33 | tharis20 | if there's an app doing something and I just want to make a command that uses that app, what's the best approach? |
| 12:30.46 | tharis20 | system call to that app (I don't think that's a good idea), although the GUI uses it or copying and pasting that part that matters of the code of the original app, or ? |
| 12:37.52 | *** join/#brlcad abhi2011 (~chatzilla@wlan-145-94-187-000.wlan.tudelft.nl) | |
| 13:12.56 | tharis20 | besides adding a line in setup.c, editing src/libged/Makefile.am, what else do I need to do to compile with a new command? is there anything else I need to update? |
| 13:16.33 | kunigami_ | tharis20: I think it's enough. Have you tried compiling with these changes? |
| 13:17.03 | tharis20 | yes, and I always get that the function is undeclared |
| 13:19.55 | kunigami_ | paste the error in a patebin, http://paste.ubuntu.com/, for example |
| 13:22.15 | tharis20 | http://pastebin.com/7pBuvvhJ |
| 13:23.28 | tharis20 | I've also noticed that in libged there's no fbclear.o or fbclear.lo |
| 13:53.01 | *** join/#brlcad kunigami_ (~kunigami@201.53.206.27) | |
| 13:56.08 | CIA-62 | BRL-CAD: 03erikgreenwald * r45564 10/brlcad/trunk/src/libbu/bomb.c: fix signed/unsigned warning |
| 14:06.33 | *** join/#brlcad tharis20_ (~tharis@bl21-60-39.dsl.telepac.pt) | |
| 14:06.57 | tharis20_ | brlcad: can you help me? ^ |
| 14:48.43 | brlcad | tharis20: if it were, there wouldn't be the need for an fbclear command ;) |
| 14:48.56 | brlcad | it calls through some private api to clear the framebuffer |
| 14:49.46 | brlcad | abhi2011: the patch doesn't have to be related to your project proposal, it can be anything -- the point as ``Erik mentioned is to show competency |
| 14:50.36 | abhi2011 | ok yes. I am compiling the brlcad source now from the instructions in INSTALL.cmake file |
| 14:51.18 | brlcad | so the better your patch, the better your proposal, but even a one-line patch that fixes a hard bug can be as amazing or more than a 1000 line patch that implements some new feature |
| 14:51.28 | tharis20 | brlcad: so, the button fbclear doesn't do the same as the command of the feature request |
| 14:51.46 | brlcad | tharis20: it does the desired operation |
| 14:52.00 | brlcad | but you can't use the api that the button uses for the command |
| 14:52.14 | brlcad | they're in different sections of code |
| 14:52.23 | tharis20 | but the command calls the application fbclear through a system call |
| 14:52.38 | brlcad | yes, it eventually gets to that |
| 14:52.39 | tharis20 | *the button |
| 14:52.54 | brlcad | that's kinda lame for a command |
| 14:53.05 | abhi2011 | right i understand, thanks brlcad |
| 14:53.37 | brlcad | it's just as much logic to set up a connection to fork/exec the fbclear binary as it is to open a connection to the framebuffer and issue a clear command |
| 14:53.53 | tharis20 | exactly, that's why I asked what's the best way, trying to avoid the system call |
| 14:53.53 | brlcad | probably < 20 lines of code |
| 14:54.13 | brlcad | basically, the guts to the fbclear command, with some simplification |
| 14:54.21 | brlcad | s/command/tool/ |
| 14:54.54 | tharis20 | ok, I created a fbclear.c in src/libged |
| 14:55.06 | tharis20 | and added it to Makefile.am |
| 14:55.29 | brlcad | the issue in terms of encapsulation is that there "shouldn't" be a direct call into libfb from libged |
| 14:55.44 | tharis20 | what else do I need to do so that when I compile, mged will recognize the command? |
| 14:55.49 | brlcad | so you shouldn't just call fb_clear() .. it should get passed in through the struct ged |
| 14:56.10 | brlcad | you'll need to add a binding for the function in src/mged/setup.c |
| 14:56.22 | tharis20 | yes, I also did that |
| 14:58.32 | brlcad | fwiw, calling the binary would be better than calling the libfb api directly if you can't figure out how to get to the framebuffer through the struct ged |
| 14:59.17 | brlcad | (ged_fbsp) |
| 15:00.02 | brlcad | tharis20: pastebin.com is the worst pastebin service out there and inaccessible to many of us (network blocked) |
| 15:00.06 | tharis20 | I'm calling the binary src/fb/fbclear |
| 15:00.20 | brlcad | if you have a declaration problem, that means what? |
| 15:00.41 | tharis20 | http://pastebin.ubuntu.com/649203/ |
| 15:01.10 | tharis20 | that means I'm not including something, I guess |
| 15:01.12 | brlcad | so what does that error mean? |
| 15:01.21 | brlcad | not exactly |
| 15:01.28 | brlcad | it means something isn't declared |
| 15:01.47 | brlcad | and it tells you exactly what's not declared |
| 15:01.56 | brlcad | so you just need to find where declarations go |
| 15:05.46 | tharis20 | ok, so now it's the linker giving an error |
| 15:05.56 | tharis20 | since fbclear.c was not compiled |
| 15:06.58 | CIA-62 | BRL-CAD: 03brlcad * r45565 10/brlcad/trunk/src/libbu/bomb.c: strlen() returns and write() takes a size_t, so keep the higher precision as far as we can even through write() requires the stupid return type |
| 16:32.15 | *** join/#brlcad kunigami_ (~kunigami@201.53.206.27) | |
| 17:16.52 | brlcad | ``Erik: |
| 17:16.53 | brlcad | simd.c:29: error: can't find a register in class 'BREG' while reloading 'asm' |
| 17:47.34 | *** join/#brlcad Stattrav (~Stattrav@117.192.147.252) | |
| 17:47.34 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 18:31.32 | kunigami_ | question on calculating the visibility of the light: if the normal of the surface points in the same "direction" of the light, then that light is not visible. In this case the function light_obs returns early without setting sw_visible to NULL |
| 18:32.18 | kunigami_ | I made a test. In the following image, whenever there's a visible light in the given point, I shade it white. look the result |
| 18:32.53 | kunigami_ | http://dl.dropbox.com/u/1399996/GSoC/light_obs.png |
| 18:35.21 | kunigami_ | this also seem to be the cause of the strange behavior of the toon shader: http://dl.dropbox.com/u/1399996/GSoC/toon_result.png |
| 18:36.00 | kunigami_ | look how the blue light seems to be casting a shadow in the portion that should be illuminated by the yellow one |
| 18:36.51 | kunigami_ | without the blue light: http://dl.dropbox.com/u/1399996/GSoC/toon_result_2.png |
| 18:42.50 | *** join/#brlcad Stattrav (~Stattrav@117.192.147.252) | |
| 18:42.50 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 18:52.40 | *** join/#brlcad Stattrav (~Stattrav@117.192.147.252) | |
| 18:52.40 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 19:08.44 | *** join/#brlcad Stattrav (~Stattrav@117.192.147.252) | |
| 19:08.44 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 19:12.29 | *** join/#brlcad abhi2011 (~chatzilla@ip170-79-211-87.adsl2.static.versatel.nl) | |
| 20:09.28 | kunigami_ | strange... the result is still this image http://dl.dropbox.com/u/1399996/GSoC/toon_result.png even when I initialize sw_visible to NULL (before calling light_obs). |
| 20:10.03 | kunigami_ | the problem is only solved when I replace sw_tolight by sw_tolight + 3*i (as mentioned yesterday) |
| 20:10.59 | kunigami_ | http://dl.dropbox.com/u/1399996/GSoC/toon_result_3.png |
| 20:12.13 | kunigami_ | I'm not really sure if my changes are the right ones to do. I'll send an email to dev-list asking for a review |
| 20:32.24 | *** join/#brlcad Stattrav (~Stattrav@117.192.147.252) | |
| 20:32.25 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 20:39.51 | *** join/#brlcad Stattrav (~Stattrav@117.192.147.252) | |
| 20:39.51 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 21:01.03 | CIA-62 | BRL-CAD: 03bhinesley * r45566 10/brlcad/trunk/src/libged/edit.c: |
| 21:01.04 | CIA-62 | BRL-CAD: added detection of objects without slashes, nullified dangling |
| 21:01.04 | CIA-62 | BRL-CAD: pointers, misc cleanup |
| 21:07.03 | brlcad | kunigami_: the toon shader is very new, might just have some bugs |
| 21:08.21 | brlcad | ``Erik wrote it, best to ask him |
| 21:08.53 | brlcad | from your images, looks like it is a bug, but not familiar with that shader myself |
| 21:12.03 | ``Erik | should probably eventually finish that shader |
| 21:20.04 | CIA-62 | BRL-CAD: 03erikgreenwald * r45567 10/brlcad/trunk/src/libbu/simd.c: ia32 seems to be unhappy about trying to address ebx at all in PIC mode, so simplify by completely duplicating the asm section to contain all the specialisms |
| 21:22.13 | brlcad | build succeeded here |
| 21:22.41 | ``Erik | yeah, i386 PIC asm code confuses gcc |
| 21:24.58 | CIA-62 | BRL-CAD: 03brlcad * r45568 10/brlcad/trunk/TODO: reports of crashes. red with multiple blank lines and illuminate+Z. |
| 21:36.55 | *** join/#brlcad Elrohir (~kvirc@p5B14A10B.dip.t-dialin.net) | |
| 23:10.44 | *** join/#brlcad Stattrav_ (~Stattrav@117.192.135.247) | |
| 23:15.46 | *** join/#brlcad Stattrav (~Stattrav@117.192.134.79) | |
| 23:15.46 | *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav) | |
| 23:31.08 | CIA-62 | BRL-CAD: 03r_weiss * r45569 10/brlcad/trunk/src/libbn/plane.c: |
| 23:31.09 | CIA-62 | BRL-CAD: Updated the prototype version of function bn_isect_line_lseg and |
| 23:31.09 | CIA-62 | BRL-CAD: bn_isect_line3_line3_new within the libbn library within file plane.c. These |
| 23:31.09 | CIA-62 | BRL-CAD: changes are disabled by default. These functions support the prototype function |
| 23:31.09 | CIA-62 | BRL-CAD: nmg_triangulate_fu. Made changes to code logic and performed code cleanup. This |
| 23:31.09 | CIA-62 | BRL-CAD: is a work in progress. |
| 23:56.23 | CIA-62 | BRL-CAD: 03r_weiss * r45570 10/brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c: |
| 23:56.23 | CIA-62 | BRL-CAD: Updated function nmg_radial_build_list within file nmg_fuse.c. These changes |
| 23:56.23 | CIA-62 | BRL-CAD: support the prototype version of nmg_triangulate_fu. This change corrects a |
| 23:56.23 | CIA-62 | BRL-CAD: problem when the edge radial pointers are not already sorted. These changes are |
| 23:56.23 | CIA-62 | BRL-CAD: disabled by default. This is a work in progress. |