Git Product home page Git Product logo

allosphere-research-group / allosystem Goto Github PK

View Code? Open in Web Editor NEW
65.0 65.0 22.0 347.95 MB

AlloSystem is a cross-platform suite of C++ components for building interactive multimedia tools and applications.

Home Page: http://mat.ucsb.edu/allosphere/software.php

License: BSD 3-Clause "New" or "Revised" License

CMake 4.09% C++ 90.46% C 1.91% Lua 0.01% GLSL 0.16% Objective-C++ 1.61% Makefile 0.13% Shell 0.23% HTML 0.07% Python 1.33%

allosystem's People

Contributors

charlieroberts avatar donghaoren avatar drewrwx avatar fishuyo avatar grrrwaaa avatar hannahwolfe avatar jtilbian avatar kamindustries avatar konhyong avatar kybr avatar lanceputnam avatar mantaraya36 avatar matthewjameswright avatar meishengng avatar owengc avatar ryanmichaelmcgee avatar wolftype avatar younkhg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

allosystem's Issues

Fresh clone of AlloSystem *segfaults clang*

here's a gist

https://gist.github.com/52acbe5004f7233500195f4f4df8a30f

here's a "verbose" gist:

https://gist.github.com/82fc04f6b1c7d756cb3ac0f9ba9f98ce

here's the machine info:

$ c++ --version
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

$ uname -a
Darwin audio.10g 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64

$ sw_vers -productVersion
10.9.5

Error with GLV header path

When trying to ./run.sh alloGLV/examples/appGUI.cpp, I get an error

/Users/ljp/code/git/cmake-allosystem/alloGLV/alloGLV/al_ControlGLV.hpp:47:10: fatal error:
'GLV/glv_core.h' file not found

Checking cmake_log.txt I see (paraphrased)

-- Allosystem: Trying make for GLV.
make: Nothing to be done for `all'.
-- checking for module 'libGLV'
-- package 'libGLV' not found
-- Found GLV
...
-- ==== Configuring alloGLV
-- checking for module 'libGLV'
-- package 'libGLV' not found

GLV is located at ../GLV/. I find it strange that it reports both 'package 'libGLV' not found' and 'Found GLV'.

Quarantine deprecated files

While studying AlloSphere rendering I ran into al_WarpBlend.{c,h}pp which appears to be a previous incarnation of al_OmniStereo.{c,h}pp. After some grep-ing, I found that nothing in AlloSystem depends on it, but two of our AlloSphere pieces (mchb, nanomed) require it.

Since AlloSphere projects that aren't in our regular demo lineup may require it, I suggest moving it into a "deprecated" folder and creating a relative symlink at the correct location. The catch is that git supports symlinks, but msysgit does not.

Are there any other (current) files we can cull in a similar fashion?

cmake not tracking headers

I am trying to do allocore development using the cmake system. Things are working as I would expect when I make a change to a .cpp file, but not for a header file (e.g., allocore/allocore/io/al_App.hpp). It seems the only way I can get the build system to recognize a change to the header is to call ./distclean, but this then rebuilds all of allocore and not just the dependents, which takes a long time. It seems the .hpp files are not being tracked properly like the .cpp files are.

So, this works as expected:

[make changes to allocore/src/io/al_App.cpp]
$ ./run.sh ljp/testApp.cpp
[al_App.o gets rebuilt]

this doesn't:

[make changes to allocore/allocore/io/al_App.hpp]
$ ./run.sh ljp/testApp.cpp
[changes to header NOT recognized!]

and this does:

[make changes to allocore/allocore/io/al_App.hpp]
$ ./distclean
$ ./run.sh ljp/testApp.cpp
[allocore gets rebuilt from scratch]
[changes to header recognized!]

I should also note that this problem will arise when a 'git pull' brings in new header files.

More texture examples

On Aug 1, 2012, at 2:38 AM, Lance Putnam wrote:

I could see there being numerous examples based around textures. The
current "texture" examples are meant to be simple examples of how to
send texture data to the GPU and map it onto a quad. We should
probably have additional non-shader examples like "textureFromImage"
and "textureMapFromImage". Since modelShader.cpp is doing more than
loading/displaying a model perhaps it should be called
"textureMapModel" or something...

On Wed, Aug 1, 2012 at 2:12 AM, Matt Wright [email protected] wrote:
Then I would question the naming of these examples. None of the three "texture" examples do what I think of as the most basic way of dealing with a texture (i.e., reading a texture image from a file and UV-mapping it onto a mesh). The one that does doesn't have "texture" in its name. Am I just being dense or is this confusing?

thanks,
-Matt

On Jul 31, 2012, at 1:34 PM, GrrrWaaa wrote:

examples/graphics/modelShader.cpp loads an image, creates a texture, and applies it to a duck.

We should make an FBO example to demonstrate Texture:quad(), if we haven't already.

On Jul 31, 2012, at 12:51 PM, Matt Wright wrote:

All of the examples I can see regarding textures involve procedurally generating the texture on the CPU and then applying them in a shader:

examples/graphics/shaderTexture.cpp
examples/graphics/texture.cpp
examples/graphics/texture3d.cpp

I'd like to see another example in which a texture is read from a file on disk (via the proper search paths mechanism?) into the appropriate CPU data structure (al::Image?) then submitted as a texture to the GPU, then "texture mapped" in the usual way (http://en.wikipedia.org/wiki/Texture_mapping) onto a simple 3D model.

It would also be nice to have an example showing the usage of Texture:quad().

Thanks!
-Matt

Remove trailing whitespace

There is a lot of trailing whitespace and it has been muddying commits from newer contributors.

  • An initial cleaning can be (reasonably safely) accomplished with #49 .
  • First, figure out an automated method to remove whitespace (and other issues).
  • Second, develop a pre-commit hook that enforces the whitespace rules.

Postponed.

al_Zeroconf_OSX.mm does not compile with GCC 4.9

On Mavericks and GCC 4.9 is from MacPorts.

/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm: In function '-[ClientDelegate search:]':
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm:47:22: warning: class 'ClientDelegate' does not implement the 'NSNetServiceBrowserDelegate' protocol
     browser.delegate = self;
                      ^
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm: In function '-[ClientDelegate netServiceBrowser:didFindService:moreComing:]':
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm:80:22: warning: class 'ClientDelegate' does not implement the 'NSNetServiceDelegate' protocol
     service.delegate = self;
                      ^
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm: In function '-[ClientDelegate resolvedService:]':
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm:117:16: error: expected ';' before 'in'
  for(NSData *d in [service addresses]) {
                ^
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm:117:16: error: 'in' was not declared in this scope
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm:117:28: error: expected ']' before 'addresses'
  for(NSData *d in [service addresses]) {
                            ^
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm:117:28: error: expected ';' before 'addresses'
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm:117:28: error: 'addresses' was not declared in this scope
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm:117:37: error: expected ')' before ']' token
  for(NSData *d in [service addresses]) {
                                     ^
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm:117:37: error: expected primary-expression before ']' token
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm: In function '-[ServerDelegate initWithDomain:type:name:port:]':
/Users/dtemp/Development/MAT/AlloScraper/AlloSystem/allocore/src/protocol/al_Zeroconf_OSX.mm:150:23: warning: class 'ServerDelegate' does not implement the 'NSNetServiceDelegate' protocol
   netService.delegate = self;

Determinant not being divided correctly

Here:

https://github.com/AlloSphere-Research-Group/AlloSystem/blob/devel/allocore/allocore/math/al_Mat.hpp#L586

Example:

#include "allocore/al_Allocore.hpp"

using namespace al;

template <class T>
bool invert2(Mat<2,T>& m){
    T det = determinant(m);
    if(det != 0){
        m.set(m(1,1)/det,-m(0,1)/det,
             -m(1,0)/det, m(0,0)/det);
        return true;
    }
    return false;
}

int main (int argc, char * argv[]){
     Mat<2,double> mat(4.0,7.0,2.0,6.0),matInv,matIdent;
     matInv = mat;

     //al_Mat.hpp
     invert(matInv);

     //inver2 defined above
     //invert2(matInv);

     //Multiply to produce identity matrix
     matIdent = mat*matInv;
     printf("%f %f\n%f %f\n\n",matIdent[0],matIdent[2],matIdent[1],matIdent[3]);

    return 0;
}

VCR example not building

Failing both in the makefile-build branch and the devel branch with:

➜ AlloSystem-github git:(makefile-build) ✗>make examples/alloutil/VCR.cpp 
In file included from build//include/allocore/al_Allocore.hpp:80:0,
                 from build//include/allocore/io/al_App.hpp:47,
                 from build//include/allocore/al_Allocore.hpp:54,
                 from examples/alloutil/VCR.cpp:15:
build//include/allocore/sound/al_Dbap.hpp: In member function ‘virtual void al::Dbap::perform(al::AudioIOData&, al::SoundSource&, al::Vec3d&, const int&, int&, float&)’:
build//include/allocore/sound/al_Dbap.hpp:88:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (unsigned i = 0; i < mNumSpeakers; ++i)
                         ^
In file included from build//include/allocore/al_Allocore.hpp:78:0,
                 from build//include/allocore/io/al_App.hpp:47,
                 from build//include/allocore/al_Allocore.hpp:54,
                 from examples/alloutil/VCR.cpp:15:
build//include/allocore/sound/al_AudioScene.hpp: At global scope:
build//include/allocore/sound/al_AudioScene.hpp:118:18: warning: ‘virtual void al::Spatializer::perform(al::AudioIOData&, al::SoundSource&, al::Vec3d&, const int&, float*)’ was hidden [-Woverloaded-virtual]
     virtual void perform(
                  ^
In file included from build//include/allocore/al_Allocore.hpp:81:0,
                 from build//include/allocore/io/al_App.hpp:47,
                 from build//include/allocore/al_Allocore.hpp:54,
                 from examples/alloutil/VCR.cpp:15:
build//include/allocore/sound/al_Vbap.hpp:91:7: warning:   by ‘virtual void al::Vbap::perform(al::AudioIOData&, al::SoundSource&, al::Vec3d&, const int&, int&, float&)’ [-Woverloaded-virtual]
  void perform(AudioIOData& io, SoundSource& src, Vec3d& relpos, const int& numFrames, int& frameIndex, float& sample);
       ^
In file included from examples/alloutil/VCR.cpp:16:0:
build//include/alloutil/al_VCR.hpp: In member function ‘void al::VCR::writeImages(al::Image&)’:
build//include/alloutil/al_VCR.hpp:321:115: error: no matching function for call to ‘al::Image::write(std::string, uint8_t*, int, int, al::Image::Format)’
   image.write<uint8_t>(std::string(path), (uint8_t *)src.data.ptr, (int)src.width(), (int)src.height(), Image::RGB);
                                                                                                                   ^
build//include/alloutil/al_VCR.hpp:321:115: note: candidate is:
In file included from build//include/allocore/al_Allocore.hpp:46:0,
                 from examples/alloutil/VCR.cpp:15:
build//include/allocore/graphics/al_Image.hpp:196:7: note: template<class Pix> void al::Image::write(const Pix&, unsigned int, unsigned int)
  void write(const Pix& pix, unsigned x, unsigned y) {
       ^
build//include/allocore/graphics/al_Image.hpp:196:7: note:   template argument deduction/substitution failed:
In file included from examples/alloutil/VCR.cpp:16:0:
build//include/alloutil/al_VCR.hpp:321:115: note:   cannot convert ‘std::basic_string<char>(((const char*)(& path)), (*(const std::allocator<char>*)(& std::allocator<char>())))’ (type ‘std::string {aka std::basic_string<char>}’) to type ‘const unsigned char&’
   image.write<uint8_t>(std::string(path), (uint8_t *)src.data.ptr, (int)src.width(), (int)src.height(), Image::RGB);
                                                                                                                   ^
examples/alloutil/VCR.cpp: In function ‘int main()’:
examples/alloutil/VCR.cpp:89:2: error: reference to ‘App’ is ambiguous
  App app;
  ^
examples/alloutil/VCR.cpp:24:8: note: candidates are: struct App
 struct App : Window {
        ^
In file included from build//include/allocore/al_Allocore.hpp:54:0,
                 from examples/alloutil/VCR.cpp:15:
build//include/allocore/io/al_App.hpp:178:7: note:                 class al::App
 class App {
       ^
examples/alloutil/VCR.cpp:91:29: warning: ignoring return value of ‘char* getcwd(char*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
     getcwd(cwd, sizeof(cwd));
                             ^
Makefile.buildandrun:44: recipe for target 'examples/alloutil/VCR.cpp' failed
make: *** [examples/alloutil/VCR.cpp] Error 1

AlloNi build broken

There is no dependency installation script and the Makefile needs to be tested once there is.

TCP sockets

There is currently no support for setting up TCP connections nor for creating a listening socket. This should only require a few, non-intrusive modifications to the AlloSystem Socket abstraction.

Build error

Travis build is failing:

[ 87%] Building CXX object alloutil/CMakeFiles/alloutil_examples_cubemap.dir/examples/cubemap.cpp.o

In file included from /home/travis/build/AlloSphere-Research-Group/AlloSystem/build/include/alloutil/al_CubeMapFBO.hpp:48:0,

                 from /home/travis/build/AlloSphere-Research-Group/AlloSystem/alloutil/examples/cubemap.cpp:12:

/home/travis/build/AlloSphere-Research-Group/AlloSystem/build/include/alloutil/al_TextureGL.hpp: In member function ‘void al::CubeMapTexture::drawMapVertex(double, double)’:

/home/travis/build/AlloSphere-Research-Group/AlloSystem/build/include/alloutil/al_TextureGL.hpp:612:25: error: call of overloaded ‘texCoord(al::Vec3d&)’ is ambiguous

/home/travis/build/AlloSphere-Research-Group/AlloSystem/build/include/alloutil/al_TextureGL.hpp:612:25: note: candidates are:

/home/travis/build/AlloSphere-Research-Group/AlloSystem/build/include/allocore/graphics/al_Mesh.hpp:260:7: note: void al::Mesh::texCoord(const TexCoord2&)

/home/travis/build/AlloSphere-Research-Group/AlloSystem/build/include/allocore/graphics/al_Mesh.hpp:266:7: note: void al::Mesh::texCoord(const TexCoord3&)

make[2]: *** [alloutil/CMakeFiles/alloutil_examples_cubemap.dir/examples/cubemap.cpp.o] Error 1

make[1]: *** [alloutil/CMakeFiles/alloutil_examples_cubemap.dir/all] Error 2

make: *** [all] Error 2

Zeroconf example crashing

Something to do with the MsgQueue provided by MainLoop, but can't see where the problem is...

[ 98%] Running: allocore_examples_io_zeroconf
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /home/andres/Documents/src/Allostuff/AlloSystem-github/build/bin/allocore_examples_io_zeroconf...done.
Starting program: /home/andres/Documents/src/Allostuff/AlloSystem-github/build/bin/allocore_examples_io_zeroconf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Zeroconf: Adding service 'allocore:andres-ThinkPad-W530'
Zeroconf: new service 'allocore:andres-ThinkPad-W530' of type '_osc._udp' in domain 'local.'
Zeroconf: new service 'allocore:andres-ThinkPad-W530' of type '_osc._udp' in domain 'local.'
Zeroconf: resolved service 'allocore:andres-ThinkPad-W530' on host 'andres-ThinkPad-W530.local' on port 4110 at address 'fe80::6e88:14ff:fe5f:c5b8'
Zeroconf: resolved service 'allocore:andres-ThinkPad-W530' on host 'andres-ThinkPad-W530.local' on port 4110 at address '192.168.0.105'
allocore_examples_io_zeroconf: /home/andres/Documents/src/Allostuff/AlloSystem-github/allocore/src/types/al_MsgQueue.cpp:57: void al::MsgQueue::sched(al_sec, al::MsgQueue::msg_func, char*, size_t): Assertion `mPool' failed.

Program received signal SIGABRT, Aborted.
0x00002aaaac582037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00002aaaac582037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00002aaaac585698 in __GI_abort () at abort.c:90
#2 0x00002aaaac57ae03 in __assert_fail_base (fmt=0x2aaaac6d2158 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x437e86 "mPool",

file=file@entry=0x437e20 "/home/andres/Documents/src/Allostuff/AlloSystem-github/allocore/src/types/al_MsgQueue.cpp", line=line@entry=57, 
function=function@entry=0x437ea0 <al::MsgQueue::sched(double, void (*)(double, char*), char*, unsigned long)::__PRETTY_FUNCTION__> "void al::MsgQueue::sched(al_sec, al::MsgQueue::msg_func, char*, size_t)") at assert.c:92

#3 0x00002aaaac57aeb2 in __GI___assert_fail (assertion=0x437e86 "mPool",

file=0x437e20 "/home/andres/Documents/src/Allostuff/AlloSystem-github/allocore/src/types/al_MsgQueue.cpp", line=57, 
function=0x437ea0 <al::MsgQueue::sched(double, void (*)(double, char*), char*, unsigned long)::__PRETTY_FUNCTION__> "void al::MsgQueue::sched(al_sec, al::MsgQueue::msg_func, char*, size_t)") at assert.c:101

#4 0x0000000000431041 in al::MsgQueue::sched (this=0x646778, at=1, func=0x42cb60 <al::MsgQueue::send(double, void ()(double))::Data::call(double, char)>,

data=0x7fffffffde90 "x\307B", size=8) at /home/andres/Documents/src/Allostuff/AlloSystem-github/allocore/src/types/al_MsgQueue.cpp:57

#5 0x000000000042cbd3 in al::MsgQueue::send (this=0x646778, at=1, f=0x42c778 <al_avahi_poll(double)>)

at /home/andres/Documents/src/Allostuff/AlloSystem-github/build/include/allocore/types/al_MsgQueue.hpp:85

#6 0x000000000042c7c5 in al_avahi_poll (interval=0.01) at /home/andres/Documents/src/Allostuff/AlloSystem-github/allocore/src/protocol/al_Zeroconf.cpp:28
#7 0x000000000042c9ed in al::zero::Client::poll (interval=0.01) at /home/andres/Documents/src/Allostuff/AlloSystem-github/allocore/src/protocol/al_Zeroconf.cpp:359
#8 0x0000000000421a4c in main () at /home/andres/Documents/src/Allostuff/AlloSystem-github/allocore/examples/io/zeroconf.cpp:60

PeriodicThread symbols not found

I'm trying to use the PeriodicThread class, but I get symbol not found errors upon linking. I presume the problem is that al_PeriodicThread.cpp is not getting compiled?

OSC/Socket constructor with port/address in use

Currently segfaults, but instead should either:

  • print an error and set mImpl = NULL (with NULL checks in all uses of it)
  • print an error and start looking for consecutive port numbers that are available
  • throw an exception

alloGLV: detachableGUI.cpp example giving errors

It's giving me this weird architecture related error.

any ideas?


Kons-MacBook-Pro:alloGLV cannedStar$ make examples/detachableGUI.cpp
CXX src/al_ControlGLV.cpp build/obj/al_ControlGLV.o
CXX src/al_ProtoApp.cpp build/obj/al_ProtoApp.o
AR build/lib/liballoGLV.a
Undefined symbols for architecture x86_64:
"al::GLVDetachable::GLVDetachable()", referenced from:
_main in cc1Je8wK.o
"al::GLVDetachable::parentWindow(al::Window&)", referenced from:
_main in cc1Je8wK.o
"vtable for al::GLVWindowControl", referenced from:
al::GLVDetachable::~GLVDetachable()in cc1Je8wK.o
al::GLVDetachable::~GLVDetachable()in cc1Je8wK.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for al::GLVInputControl", referenced from:
al::GLVDetachable::~GLVDetachable()in cc1Je8wK.o
al::GLVDetachable::~GLVDetachable()in cc1Je8wK.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [examples/detachableGUI.cpp] Error 1

FreeType headers not found under Mountain Lion (grrr...)

Builds of AlloCore under Mountain fail due to missing FreeType headers. Versions of OS X before Mountain Lion seem to have had the FreeType headers in /usr/X11/include/. This is no longer the case and I was not able to locate them anywhere else. The problem can be fixed by installing FreeType through MacPorts or brew. However, before doing so I need someone else to confirm that the headers are indeed missing under Mountain Lion.

AssImp 3 support

Angus made al_Asset work with AssImp version 3, but wasn't able to make the preprocessor auto-detect whether AssImp 2 or 3 is installed. We should either

  1. Stop supporting AssImp 2 and assume AssImp 3 exclusively, or
  2. FIgure out a way for the build system to detect which AssImp is installed (e.g., checking the existence of a file that appears in only one of the two)

Window STEREO_BUF mode no longer works when called before window.create()

Previously, setting up an active stereo window required applying the Window::STEREO_BUF mode in the create() call.

This no longer works, which broke a few existing projects. (Tested on Ubuntu 12.04 in the AlloSphere).

Instead, the mode has now to be applied after create() has been called. This results in more onCreate() and onResize() calls than strictly necessary, slowing down application startup in some cases.

apr include error for macOS 10.12.4

Building a fresh clone of the devel branch* fails with the following error:

/Users/ky/Downloads/********/AlloSystem/allocore/src/io/../private/al_ImplAPR.h:44:11: fatal error:
      'apr-1.0/apr_general.h' file not found
        #include "apr-1.0/apr_general.h"

Here's a commit that exhibits the error:

commit 33560a41c39da286362c315da81cee0ff06a3ea3
Author: Lance Putnam <[email protected]>
Date:   Thu May 4 13:24:37 2017 +0100

    File: add default ctor and open function with path and mode

Here's a commit that does not exhibit the error:

commit ef6c11c74abfd93d31ecb7e4fc1ea634917a71f0
Author: Karl Yerkes <[email protected]>
Date:   Sun Jan 15 09:49:16 2017 -0800

    removing types that break on windows

Support (and examples) for perceptually driven color spaces (L*a*b*, HCL, etc.) and basic color theory

master and devel branches drifitng apart

The devel branch is currently 117 commits ahead and 59 commits behind master. I think it's in our best interest to merge devel into master while we still have the chance. In theory, master should not be ahead of devel.

SocketSend/Recv

Currently, the use of sockets is limited to two derived classes called SocketSend and SocketRecv. However, in most use cases a socket needs to both send and receive data. It would make more sense to rename SocketSend and SocketRecv to SocketClient and SocketServer, respectively, and allow both to send and receive data.

Some allocore examples are not finding the shared assets

The following examples have issues:

allocore/examples/graphics/font.cpp
allocore/examples/graphics/modelShader.cpp
allocore/examples/graphics/textureImage.cpp

They are looking in path "../../shared" from build/bin, and thefiles are in allocore/shared.

What's the recommended procesdure for asset location?

IOWindow test in allocore failing

The IOWindow test from the Allocore test suite is failing for me with:

allocoreTests: /home/andres/Documents/src/Allostuff/AlloSystem-github/allocore/unitTests/utIOWindowGL.cpp:38: virtual bool MyWindow::onResize(int, int): Assertion `onCreateCalls' failed.

The test code looks like:


    bool onResize(int dw, int dh){
        assert(onCreateCalls);  // at least one onCreate called
        if(onCreateCalls == 1){
            assert(dw == dimensions().w);
            assert(dh == dimensions().h);
        }
        ++onResizeCalls;
        return true;
    }

cmake fail on fresh clone

https://gist.github.com/kybr/7ec10e1a877bf6596411a2827647d443

also...

ix $ ./run.sh allocore/examples/sound/audioScene.cpp
RUN SCRIPT: Building file allocore/examples/sound/audioScene.cpp.
CMake Error at /usr/local/Cellar/cmake/3.7.1/share/cmake/Modules/TestBigEndian.cmake:41 (message):
no suitable type found
Call Stack (most recent call first):
allocore/modules/osc_module.cmake:22 (test_big_endian)
allocore/CMakeLists.txt:159 (include)

make: *** No rule to make target `allocore_examples_sound_audioScene_run'. Stop.

Library files living in osx/ and linux/

In the directories osx/ and linux/ are several static library dependencies and headers. Are these being used now that we've moved to installing all dependencies using package managers? If not being used, they should be removed to save ~140 MB of space and prevent potential linking confusion.

macOS Sierra - brew install - errors

If I run the following homebrew installation commands (in that order),

brew tap AlloSphere-Research-Group/AlloSystem
brew install AlloSystem

I get the following error:

Error: allosphere-research-group/allosystem/allosystem is a head-only formula
Install with 'brew install --HEAD allosphere-research-group/allosystem/allosystem'

If I then proceed to run:

brew install --HEAD allosphere-research-group/allosystem/allosystem

I get the following error:

Updating Homebrew...
==> Installing allosystem from allosphere-research-group/allosystem
==> Downloading https://github.com/AlloSphere-Research-Group/AlloSystem
Already downloaded: /Users/rianblignaut/Library/Caches/Homebrew/allosystem-HEAD
Warning: Cannot verify integrity of allosystem-HEAD
A checksum was not provided for this resource
For your reference the SHA256 is: c26822503b18fdcbbcc7fd63ebbcca4ddbef1d40c4c75fc34ecbc32a57cfd0bd
==> cmake . -DNO_EXAMPLES=1 -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_R
Last 15 lines from /Users/rianblignaut/Library/Logs/Homebrew/allosystem/01.cmake:
2017-04-12 13:02:42 +0200

cmake
.
-DNO_EXAMPLES=1
-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/allosystem/HEAD
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_FIND_FRAMEWORK=LAST
-DCMAKE_VERBOSE_MAKEFILE=ON
-Wno-dev

CMake Error: The source directory "/tmp/allosystem-20170412-19238-j19mah" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/allosphere-research-group/homebrew-allosystem/issues

Please advise.

unnecessary (?) allocore rebuild with run.sh

Building allocore without examples and then calling run.sh on an example causes allocore to be rebuilt. I would think the second build should not happen. Here is the sequence of commands:

$ ./distclean
$ cmake . -DBUILD_EXAMPLES=0
$ make

[allocore builds...]

$ ./run.sh allocore/examples/graphics/shaderSprites.cpp

[allocore builds again...]
[example builds and runs...]

GLFW for window/input management

As of version 3.0.1, GLFW (http://www.glfw.org/) supports multiple windows. Support for multiple windows was the main reason we stuck with GLUT for so long, putting up with its many annoyances and limitations. However, now I no longer see any strong arguments for using GLUT as GLFW does everything it can plus more and is actively maintained.

It also seems that GLFW plans to add touch support in the future. From its 'touch' branch on github:

/*! @brief The function signature for touch callbacks.

  • @param[in] window The window that received the event.
  • @param[in] touch The touch that triggered the event.
  • @param[in] action One of @ref GLFW_PRESS, @c GLFW_MOVE or @ref GLFW_RELEASE.
  • @param[in] xpos The new x-coordinate of the touch.
  • @param[in] ypos The new y-coordinate of the touch.
  • @InGroup input
    *
  • @sa glfwSetTouchCallback
    /
    typedef void (
    GLFWtouchfun)(GLFWwindow*,int,int,double,double);

Makefile "doc" rule

I believe someone (Matt?) had at some point mentioned creating a Makefile rule to run doxygen and create documentation for all the AlloSystem modules. However, I can't find it in any of the branches. If this exists somewhere out there, is there any chance it can find its way into the devel branch?

AudioIO: cannot create virtual channels

In the latest devel, one can no longer create virtual channels with AudioIO. The code has changed to only create the min of the requested channels and max device channels. I updated the AudioIO unit test to illustrate the problem:

dc5ec79

HID support

I was recently pointed to the following elegantly simple HID library:

http://www.signal11.us/oss/hidapi/

"HIDAPI is a multi-platform library which allows an application to interface with USB and Bluetooth HID-Class devices on Windows, Linux, and Mac OS X. ... HIDAPI is easy to integrate with the client application, just requiring a single source file to be dropped into the application."

I was able to get data from a Space Navigator under both Windows and OSX, so I have a good feeling about it.

Should this be made into allocore/io/al_HID.hpp?

Error messages sent to stdout instead of stderr

There are many places where error messages are sent to stdout like this:

printf("Error: Something went wrong...\n");

Errors should be piped to stderr, not stdout. The above should be replaced with this:

fprintf(stderr, "Error: Something went wrong...\n");

Note, that by default stderr prints to the console like stdout. The advantage of using stderr is that you can separate errors from normal output. See: http://jstorimer.com/2011/12/29/the-difference-between-stdout-and-stderr.html

assimp3 binding req'd for MacPorts

Doing the normal 'port install assimp' now installs assimp v.3. al_Asset.cpp does not compile since it is not compatible with assimp v.3. There does not appear to be any way to tell MacPorts to install the older version 2 with which Asset is currently binding to. This is a show stopper for fresh installs of AlloCore using MacPorts.

opencv linker errors on OS X. uninstall opencv to fix.

./run.sh allocore/examples/graphics/pickRay.cpp
...
/usr/local/Cellar/cmake/3.3.2/bin/cmake -E cmake_link_script CMakeFiles/allocore_examples_graphics_pickRay.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -pagezero_size 10000 -image_base 100000000 CMakeFiles/allocore_examples_graphics_pickRay.dir/allocore/examples/graphics/pickRay.cpp.o  -o build/bin/allocore_examples_graphics_pickRay  build/lib/liballoutil.a /usr/local/lib/libluajit-5.1.dylib /usr/local/lib/libjsoncpp.dylib build/lib/liballocore.a build/lib/liballocv.a -lopencv_videostab -lopencv_video -lopencv_ts -lopencv_superres -lopencv_stitching -lopencv_photo -lopencv_ocl -lopencv_objdetect -lopencv_nonfree -lopencv_ml -lopencv_legacy -lopencv_imgproc -lopencv_highgui -lopencv_gpu -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d build/lib/liballocore.a -framework IOKit -framework CoreFoundation /usr/local/lib/libGLEW.dylib -framework AGL -framework OpenGL -framework GLUT -framework Cocoa /usr/local/lib/libfreetype.dylib /usr/local/lib/libfreeimage.dylib /usr/local/lib/libassimp.dylib /usr/lib/libapr-1.dylib -framework AudioUnit -framework CoreAudio -framework CoreMidi -framework CoreServices -framework AudioToolbox /usr/local/lib/libportaudio.dylib /usr/local/lib/libportaudio.dylib /usr/local/lib/libsndfile.dylib build/lib/liballocv.a -lopencv_videostab -lopencv_video -lopencv_ts -lopencv_superres -lopencv_stitching -lopencv_photo -lopencv_ocl -lopencv_objdetect -lopencv_nonfree -lopencv_ml -lopencv_legacy -lopencv_imgproc -lopencv_highgui -lopencv_gpu -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d -framework IOKit -framework CoreFoundation /usr/local/lib/libGLEW.dylib -framework AGL -framework OpenGL -framework GLUT -framework Cocoa /usr/local/lib/libfreetype.dylib /usr/local/lib/libfreeimage.dylib /usr/local/lib/libassimp.dylib /usr/lib/libapr-1.dylib -framework AudioUnit -framework CoreAudio -framework CoreMidi -framework CoreServices -framework AudioToolbox /usr/local/lib/libportaudio.dylib /usr/local/lib/libsndfile.dylib
ld: library not found for -lopencv_videostab
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Design issue with ShaderProgram and different sampler types

Just hit a problem with the design of ShaderProgram (maybe also something a bit stupid about OpenGL?)

If a shader has two different kinds of sampler in it (e.g. sampler2D, sampler3D, samplerCube etc.), then until a uniform is set these are all bound to unit 0. Running GLSL validation on this will fail, since different texture types cannot be bound to the same unit.

The solution is to perform actions in this order (e.g. typically this would be during onCreate):

create shaders & program object
attach shaders to program
link program
bind program

  • send uniforms to give each sampler a unique unit *
    unbind program
    validate program

However in the current design of ShaderProgram, the link() method also performs validation. I've hacked a boolean argument to this to prevent validation if needed, and added a separate validate_linked() method, for the particular case I'm using now. But I expect that this hack is not a long-term solution.

Any user copying example code and adding a different sampler to the shader is going to see this confusing error, and isn't likely to find the solution (adding uniform setters between link() and validate_linked()) without quite a lot of work.

Validation Failed: Sampler error:
Samplers of different types use the same texture image unit.

  • or -
    A sampler's texture unit is out of range (greater than max allowed or negative).

I don't have an immediate idea for a solution through. It's hard to automate, since the number of samplers are not easily known. One possibility is to defer validation until the shader is actually used, but this still requires setting the uniforms beforehand.

Open to suggestions!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.