Search found 80 matches

by Roland007
Mar 22, 2020 8:13
Forum: Linux
Topic: Linux Framebuffer
Replies: 9
Views: 925

Re: Linux Framebuffer

Thanks for your replies. The screen boots if FB mode. I discovered that I have a rights issue. The FB device needs root rights. So dim as integer X,Y,D ScreenRes X,Y,D Print X,Y,D Sleep gives as result 1024 768 32 after running with sudo. However graphical operatiions have no visible result.. So thi...
by Roland007
Mar 19, 2020 8:22
Forum: Linux
Topic: Linux Framebuffer
Replies: 9
Views: 925

Re: Linux Framebuffer

Via screencontrol you could try to set the driver FBDev , see: https://freebasic.net/wiki/wikka.php?wakka=GfxLib But that does not seem to work here. It defaults to X11. There is discussion of fbdev in https://freebasic.net/forum/viewtopic.php?f=5&t=24793&hilit=fbdev&start=90 Hi and tha...
by Roland007
Mar 18, 2020 22:17
Forum: Linux
Topic: Linux Framebuffer
Replies: 9
Views: 925

Re: Linux Framebuffer

After reading this Direct Rendering Infrastructure and this Direct Rendering Manager wikipedia article, I think that the term "the framebuffer" is a bit vague. No application (except the DRM) can (is allowed to) write to the video memory directly. If I understand correct, your application...
by Roland007
Mar 18, 2020 14:01
Forum: Linux
Topic: Linux Framebuffer
Replies: 9
Views: 925

Linux Framebuffer

Hi All, There is something I try to understand. I am trying to write a program that uses the framebuffer. Freebasic seems to support the framebuffer but how? Each time I try to do something graphical, the compiler starts to complain that it needs libXPM (an X windows component). Including fbgfx.bi d...
by Roland007
Apr 13, 2018 10:06
Forum: General
Topic: Access inside objects
Replies: 18
Views: 802

Re: Access inside objects

''App->CanvasHandle=@CVAS App->CanvasHandle=CVAS '' CVAS is already a pointer Thanx, this one is really obvious when you realize it... Setting the address to the pointer of the pointer too the object. That might explain some strange behavior.Because all operations after that happen in memory addres...
by Roland007
Apr 13, 2018 8:46
Forum: General
Topic: Curious from a performance perspective
Replies: 26
Views: 1468

Re: Curious from a performance perspective

Python it's a modern well written language and used C++ code under the hood today. My point was that even a language considered "slow" can produce fast applications, simply because the routines that do a lot of legwork, like sorting, can be written in C or assembler. So if FB is "slo...
by Roland007
Apr 13, 2018 7:06
Forum: General
Topic: Access inside objects
Replies: 18
Views: 802

Re: Access inside objects

This part is suspicious: GridStr [ ((Yr-1)*Cwijd)+Xr ] Cwijd is -2791790 when printing "H" of "Hello" Do some min/max checks here. Probably anything that uses [ ] is suspicious. I don't think freebasic range checking (with -exx) does not work for this. Probably safer to use redi...
by Roland007
Apr 13, 2018 6:42
Forum: General
Topic: Access inside objects
Replies: 18
Views: 802

Re: Access inside objects

Yes, boundary checking is crucial when working with memory addresses. What I am missing at this point is a decent IDE that supports me. The only way I can debug if by placing print statements followed by sleep, before and after the line of code I want to check. That really sucks because I spend more...
by Roland007
Apr 12, 2018 18:37
Forum: General
Topic: Access inside objects
Replies: 18
Views: 802

Re: Access inside objects

Could you compile your program with the option -exx, then execute the file.exe from a command window in order to can intercept an eventual run-time error message. Remark: For the future fbc update, replace "Inkey$" by "Inkey" (three times). Yeah, in the 80ties I did something wi...
by Roland007
Apr 12, 2018 17:58
Forum: General
Topic: Access inside objects
Replies: 18
Views: 802

Re: Access inside objects

Thanks all. Below is my code, its slightly more complex then the previous example. It compiles and crashes. Responsible code "RootHandle->GPrint "Hello World". Somehow when calling the GPrint method of the object referred to by RootHandle (type View Ptr) doesn't work from inside anoth...
by Roland007
Apr 08, 2018 18:05
Forum: General
Topic: Access inside objects
Replies: 18
Views: 802

Re: Access inside objects

fxm wrote:The code you posted does not compile!

of course not! its to demonstrate what I am doing. The idea was to tell what I try to achieve.

I want Object X to be able to use properties/functions and subs from other instances of object X without unstable software as a result.
by Roland007
Apr 08, 2018 7:55
Forum: General
Topic: Access inside objects
Replies: 18
Views: 802

Access inside objects

Good morning all, I have a question based on erratic behaviour of the compiler relating to objects. It must be my code, but how to solve it. I have an object with many Public function, a few private function and many private variables. Inside that object, there is a property Register that is suppose...
by Roland007
Apr 06, 2018 16:25
Forum: General
Topic: Curious from a performance perspective
Replies: 26
Views: 1468

Re: Curious from a performance perspective

During compilation, the proces might take longer because your doing an import of code from an external library but if that external library is optimized you might get better/faster code in return. So in general, does using CRT make the code faster? It depends. If you use the GCC backend, the differ...
by Roland007
Apr 06, 2018 10:23
Forum: General
Topic: Curious from a performance perspective
Replies: 26
Views: 1468

Re: Curious from a performance perspective

I don't know about the compiling speed difference, nor the general speed difference, but in this case the 'C' version seems faster (on my PC): #include "crt/stdlib.bi" dim as integer i, Value dim as string NumString1 = "1" dim as string NumString2 = "1234567890" dim as...
by Roland007
Apr 06, 2018 7:38
Forum: General
Topic: Curious from a performance perspective
Replies: 26
Views: 1468

Curious from a performance perspective

Hi All, Its a bit philosophical, but still: I've been working in C for a few months now and with these glasses I started looking at Freebasic. The question I have is, what is better from a performance perspective: use equivalent CRT libraries or built-in functions. For example //FB Value = val(Strin...

Go to advanced search