Getting BillboardExample and BillboardTester to work

Hi everyone,

The Billboard example projects in the dev apps folder don’t work out of the box. The problem seems to lie in the setup function of ofShader.

I try changing this:

  
	billboardShader.setup("Billboard");  
  

To either of these:

  
	billboardShader.setupShaderFromFile(GL_VERTEX_SHADER, "Billboard");  
	billboardShader.setupShaderFromFile(GL_FRAGMENT_SHADER, "Billboard");  
  

which allows the program to compile and run, but I don’t see the billboards. Am I missing something obvious?

Thanks,

erik

ok, got it working. must add this line:

  
  
    billboardShader.linkProgram();    
  

*edit:*
so replace the billboardShader.setup() with these and it should work:

  
	shader.setupShaderFromFile(GL_VERTEX_SHADER, "Billboard.vert");    
    shader.setupShaderFromFile(GL_FRAGMENT_SHADER, "Billboard.frag");                      
    shader.linkProgram();    
  

Maybe someone wants to change this in the example project code at some point…

ah sorry, i missed this post or i would have responded.

setupShaderFromFile/linkProgram is the correct way to do it, yes. it mirrors what is happening with GL internally.

also, keep in mind that devApps are not maintained. while we spend time checking all the examples and addonsExamples across platforms (actually, that’s a lot of what took so long with this last release) – the devApps are just for sharing code with each other when we have a really heavy push. i expect most of them don’t work ‘out of the box’, and we’ve even discussed removing it in favor of having separate branches.

Thanks for the reply. I was wondering if that was the deal with the devApps projects. At first I thought devApps meant that they were ‘development-oriented’ projects not ‘in-development’ projects. Its a great resource though, so I hope you don´t get rid of them altogether even if they are not fully functional.

Did you get this working in 007? I’m having trouble achieving this. I tried your suggestion with no joy. I’d really appreciate it if you could have a glance at my issue here:

http://forum.openframeworks.cc/t/offbo-layering-problem/9776/1