Search found 2960 matches

by vdecampo
May 16, 2017 17:54
Forum: Linux
Topic: Question about gcc internal library
Replies: 8
Views: 179

Re: Question about gcc internal library

St_W wrote:I'd rather suggest to enable compiler optimizations if you're already using the gcc backend of FreeBasic.


Another suggestion would be to optimize your algorithms.

-Vince
by vdecampo
May 16, 2017 13:11
Forum: Windows
Topic: How to mark application to require admin privilegies to run?
Replies: 2
Views: 91

Re: How to mark application to require admin privilegies to run?

You need to create a manifest file that goes with your EXE file. Example (MyApp.exe.manifest) <?xml version="1.0" encoding="utf-8" ?> <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm...
by vdecampo
May 11, 2017 15:45
Forum: General
Topic: turtle 2.0
Replies: 30
Views: 625

Re: turtle 2.0

[quote="bplus"Also screen 20 is a shade too tall for my laptop, I checked out screen in help and see I am restricted to preset sizes.[/quote]

Check out the ScreenRes command. You can specify height/width of most any size.

-Vince
by vdecampo
May 08, 2017 12:09
Forum: General
Topic: Threads and thread-safety
Replies: 5
Views: 183

Re: Threads and thread-safety

A routine is thread-safe when it is re-entrant without concern of race conditions or variable value collisions. What this generally means is that there are no global variables accessed by the routine and that every entry will have its own safe copy of variables or values. There are exceptions to wan...
by vdecampo
May 05, 2017 13:41
Forum: Beginners
Topic: Can functions return arrays?
Replies: 40
Views: 806

Re: Can functions return arrays?

You you can pass a pointer to the array. The biggest issue is there is no mechanism to dynamically declare an array based on the return from a function (That I know of). For instance in C# you can do... string[] parts = somestring.Split(','); This would declare a string array of parts based on the r...
by vdecampo
Apr 18, 2017 17:50
Forum: Beginners
Topic: Optimising speed of loops
Replies: 12
Views: 542

Re: Optimising speed of loops

The best speed optimization for loops is to unroll them. Do as many calculations per loop as you can. For example, instead of counting from 1 to 100 doing a calculation each iteration, step by 5 and do 5 calculations per loop.

-Vince
by vdecampo
Apr 07, 2017 16:23
Forum: Windows
Topic: Access Violation Exception
Replies: 5
Views: 455

Re: Access Violation Exception

You need to pin the byte array and marshal it to a fixed memory buffer. Example IntPtr unmanagedPointer = Marshal.AllocHGlobal(bytes.Length); Marshal.Copy(bytes, 0, unmanagedPointer, bytes.Length); // Call unmanaged code Marshal.FreeHGlobal(unmanagedPointer); Then you need to copy the result back to...
by vdecampo
Apr 06, 2017 12:53
Forum: Libraries
Topic: Library FBImage for Windows/Linux 32/64-bit.
Replies: 39
Views: 3922

Re: Library FBImage for Windows/Linux 32/64-bit.

How did I miss this library?!
Another great addition thanks to DJ!

You rock!

-Vince
by vdecampo
Apr 03, 2017 16:42
Forum: Projects
Topic: Normal Mapping
Replies: 44
Views: 1628

Re: Normal Mapping

Can any of these functions be generalized into a software rendering library of sorts? This is very nice work.

-Vince
by vdecampo
Mar 26, 2017 0:36
Forum: General
Topic: Timer & Threads
Replies: 28
Views: 1085

Re: Timer & Threads

You shouldn't have to mutex reading the timer, but IIRC the timer only has a resolution accuracy of 15ms. Also, at least under Windows, you cannot guarantee a thread will start executing immediately when it is called.

-Vince
by vdecampo
Mar 17, 2017 16:30
Forum: Beginners
Topic: Weird destructor problem
Replies: 10
Views: 413

Re: Weird destructor problem

Could you use GUIWIN ptr, new, and delete? Would this be a safer way to destroy a class mid-program? No the destructor will get called. Why would you destroy the whole class just to get rid of the window? And why couldn't you recreate the class if needed? Could you just put in a separate method to ...
by vdecampo
Mar 17, 2017 16:08
Forum: Beginners
Topic: Weird destructor problem
Replies: 10
Views: 413

Re: Weird destructor problem

Assuming GUIWIN is an FB class you created, you don't normally need to call the destructor explicitly as it will be called automatically when the variable falls out of scope. IIRC

-Vince
by vdecampo
Mar 17, 2017 13:29
Forum: Community Discussion
Topic: Relsoft needs help.
Replies: 14
Views: 1005

Re: Relsoft needs help.

Great. Works now.
by vdecampo
Mar 17, 2017 12:25
Forum: Community Discussion
Topic: Relsoft needs help.
Replies: 14
Views: 1005

Re: Relsoft needs help.

This link doesn't take me to the campaign. It just takes me to my GoFundMe log in. See if there is a link to share the campaign.

-Vince
by vdecampo
Mar 16, 2017 22:39
Forum: Tips and Tricks
Topic: Palette Finder (ANY Bitmap Image!)
Replies: 17
Views: 698

Re: Palette Finder (ANY Bitmap Image!)

Palette information is stored right after the BITMAPINFO header. You could just read that table directly.
-Vince

Go to advanced search