dsyleixa123
Posts: 84
Joined: Mon Jun 11, 2018 11:22 am

Re: Stretch: how to install latest openVG version with Dot() function?

Thu Jul 12, 2018 6:40 am

thanks, I think I'll stay with windowsave then.
About my question how to install it:
After that, just a new git checkout <branch>, or should I instead clean remove everything and fresh install?


dsyleixa123
Posts: 84
Joined: Mon Jun 11, 2018 11:22 am

Re: Stretch: how to install latest openVG version with Dot() function?

Fri Jul 13, 2018 4:15 pm

no one here to explain how the correct and clean way for a downgrade is from screenshot to windowsave?

User avatar
Paeryn
Posts: 2020
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Stretch: how to install latest openVG version with Dot() function?

Fri Jul 13, 2018 6:35 pm

dsyleixa123 wrote:
Fri Jul 13, 2018 4:15 pm
no one here to explain how the correct and clean way for a downgrade is from screenshot to windowsave?
Yes, but I have a life outside of helping on here. Whilst I do (generally) check these fora several times a day I may end up spending what time I have trying to help other people.

You could have looked at the Makefile to see what is involved in installing, backed up the files that would get overwritten (just incase you need to restore them if anything goes wrong) and gone ahead with the install. That's the great thing about Linux and the RPi, just about everything is there for anybody to look at. There have been numerous times when I've had a problem with a program, the manuals haven't helped and nor has searching online, so I've either tried winging it and see what happens or I've download the source code and figured out what is going on and what needs to be done to get it to do what I want. It may take longer than asking online or it may not, either way it sticks in my mind a lot better for having worked through it myself and I'm more likely to be able to work things out quicker in the future.

Anyway, rant over. Sorry, it's been a long afternoon in the shop and a long bus ride home on a hot, stuffy day (it started so well with a nice cooling shower but spoilt itself by the sun coming out).

Installing whichever branch should copy over the correct files for that branch.

The headers of the newly installed branch will overwrite any previous headers, the library will copy over usually as a separate library (I think I remembered to increment the revision numbers each time) so that any previously compiled program will still have the correct version to load. The linked name of the library will be overwritten so that it points to the newly installed one so that when you compile against it your program will be linked to whatever you installed last.
She who travels light — forgot something.

dsyleixa123
Posts: 84
Joined: Mon Jun 11, 2018 11:22 am

Re: Stretch: how to install latest openVG version with Dot() function?

Sat Jul 14, 2018 7:02 am

thank you very much for your help. Unfortunately I never use Makefiles, so I have no idea what make, sudo make install, make all, and make test really do in detail. I am used to simple IDEs like Arduino or Geany which handle that magic stuff for me. I only wanted to be sure not to get orphans or duplicates or wrong file version.

so I rolled back by checkout windowsave,
changed the 2 expressions -lGLESv2 -lEGL to -lbrcmGLESv2 -lbrcmEGL
in the 2 Makefiles,
but got some warnings with make, just to let you know for bug fixing, and also there are again some errors about Dot():
cd openvg
make

Code: Select all

libshapes.c: In function ‘WindowSaveAsPng’:
libshapes.c:1317:8: warning: variable ‘width’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
  VGint width = *w;
        ^~~~~
libshapes.c:1318:8: warning: variable ‘height’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
  VGint height = *h;
        ^~~~~~
libshapes.c:1337:68: warning: argument ‘w’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
 bool WindowSaveAsPng(const char *filename, VGint x, VGint y, VGint w, VGint h, int zlib_level) {
                                                                    ^
libshapes.c:1337:77: warning: argument ‘h’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
 dowSaveAsPng(const char *filename, VGint x, VGint y, VGint w, VGint h, int zlib_level) {
                                                                     ^
make install

Code: Select all

install -m 755 -p font2openvg /usr/bin/
install: das Entfernen von '/usr/bin/font2openvg' ist nicht möglich: Keine Berechtigung
Makefile:55: die Regel für Ziel „install“ scheiterte
make: *** [install] Fehler 1
so I took
sudo make install.
no further errors.


and after
cd client
make all:

Code: Select all

dot.c: In function ‘drawScene’:
dot.c:27:28: warning: implicit declaration of function ‘rand’ [-Wimplicit-function-declaration]
         float xp = (float)(rand() & 0x3ff);
                            ^~~~
dot.c: In function ‘main’:
dot.c:49:17: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration]
         count = atoi(argv[1]);
                 ^~~~
make test worked, the test demo worked in general, but I can't see a Dot sub-test though.




And also for my own program and Dot():
Although my programs compiles, my Dot test does not show any Dots at all:

Code: Select all

int   _fontsize_ = 10;
  
inline void lcdprintxy(VGfloat x, VGfloat y, char * buf) {
   Text( (x+_fontsize_), (y+_fontsize_*1.2), buf, MonoTypeface , _fontsize_);   
}

void display() {
  Fill(255, 255, 255, 1);
  lcdprintxy(0,0,"Test");
  // StrokeWidth(1.0); // doesn't make a difference with or without
  Dot(50,10,false); Dot(52,10,false); Dot(54,10,false); Dot(56,10,false); Dot(58,10,false);
  Dot(50,20,false); Dot(52,20,false); Dot(54,20,false); Dot(56,20,false); Dot(58,20,false);  
  End();
}  
 
"Test" is shown, but no Dots at all, so Dot() does not seem to work ! :(
Is the Dot function broken?

dsyleixa123
Posts: 84
Joined: Mon Jun 11, 2018 11:22 am

Re: Stretch: how to install latest openVG version with Dot() function?

Wed Jul 18, 2018 7:45 am

I am quite sure that Dot() once worked on Jessie (don't remember which version though), but which branch or version now has been proven to work for Dot() reliably on Stretch?
(It's above all for 1 dot = 1 pixel, not for larger spots/marks)

dsyleixa123
Posts: 84
Joined: Mon Jun 11, 2018 11:22 am

Re: Stretch: how to install latest openVG version with Dot() function?

Fri Jul 20, 2018 11:57 am

looks as if there is no working solution for Dot(), regrettably. I guess I have to give up.

User avatar
Paeryn
Posts: 2020
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Stretch: how to install latest openVG version with Dot() function?

Fri Jul 20, 2018 12:27 pm

Sorry for the delay, I thought I had replied the other day (I meant to).

If you are on the windowsave branch then

Code: Select all

Dot(x, y, false);
doesn't draw. That is the branch where the rough and smooth were the wrong way around when defining them so when you pass false for the smooth parameter it tries drawing the rough path but the rough path is empty (it drew the rectangle to the smooth path).

I really aught to correct that bug in that branch. It's a very simple fix if you want to do it now, not sure of the line number (I'm not at home and github doesn't show line numbers).

In libshapes.c near the end of the Init() function you'll see the following line

Code: Select all

vguEllipse(dot_rough_path, 0.5f, 0.5f, 1.0f, 1.0f);
The dot_rough_path should be dot_smooth_path, then a few lines down you'll see

Code: Select all

vguRect(dot_smooth_path, 0.0f, 0.0f, 1.0f, 1.0f);
Here dot_smooth_path should be dot_rough_path
She who travels light — forgot something.

dsyleixa123
Posts: 84
Joined: Mon Jun 11, 2018 11:22 am

Re: Stretch: how to install latest openVG version with Dot() function?

Fri Jul 20, 2018 2:46 pm

thank you, that gives me reason to hope again. If you don't mind and if you think you could fix that in a rather near future, I'll gladly wait for the fix to come!

User avatar
Paeryn
Posts: 2020
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Stretch: how to install latest openVG version with Dot() function?

Fri Jul 20, 2018 10:44 pm

Done, branch windowsave has the paths fixed for dots. Also, smooth seems to be working again, albeit it's rendering as octagons rather than spheres (the updated client/dot.c shows it by scaling the dots up by 16x).
She who travels light — forgot something.

Return to “OpenVG”

Who is online

Users browsing this forum: No registered users and 1 guest