Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error running first example (chapter 3 triangle)
#13
(06-08-2018, 12:45 AM)Brian Beuken Wrote:
(06-07-2018, 05:29 PM)DieSkaarj Wrote: Hi I'm also experiencing this problem except that changing the GL driver to Legacy gives me a new error:

Error linking program:
ERROR:LEX/PARSE-2 (vertex shader, line 6) Undefined identifier.

I'm going to try flashing a new card with a fresh install of Raspian and if that doesn't work I'll try the mesa work around.

Also it might be worth noting that I'm using Geany and g++ to compile the code and although it's compiling it's also finding error with the declaration of "int32_t success = 0;" and is saying it's unused. I've also tried compiling on Visual Studio and VisualGDB but that just returns the original failed to add service message.

I suspect the in32_t error is due to warning levels, if Geany is providing some g++ defaults and you are treating warnings as errors, then the fact success is not used will indeed throw an error. Just comment it out, its a bit of a throwback line of code and not really needed.

I don't really like using "treat warnings as errors" even though in a professional settings, its generally good practice, however since we're using libs from 3rd parties we may not be able to fix all warnings, so try to find the option to set them to normal levels of 0-3

Let me know how you get on?

Thanks Brian. I've got it working! Big Grin

So I didn't realize that the vertex shader was declared in this file and I got baffled looking at line 6 which, in my file, is: include <assert.h>. This led me to think that the vertex shader was external. The only other experience I have with OpenGL shaders at this point is messing around with them in emulators. One typo-correction later and after much trial and error (found on line 2 of the descriptor) and it compiled fine to then display a wonderful pi-powered polygon.

You're most definitely right about the all warnings thing, however it just fueled my idea that the vertex shader was some hidden file cached away in the darkest recesses of the Raspbian file structure. Smile
Reply


Messages In This Thread
RE: error running first example (chapter 3 triangle) - by DieSkaarj - 06-08-2018, 02:29 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)