Search found 726 matches

by grindstone
Aug 09, 2020 20:34
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

If the image is composed of multiple parts it's maybe better to do it invisible in the background. So with ScreenSet and GET? Seems we are a bit asynchronous. *grin* With ScreenSet, but without GET. Have a look at the snippet I posted. Set up the image you want to show the way you did before, but w...
by grindstone
Aug 09, 2020 20:23
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

With "ScreenSet 1.0", I thought I was writing first on a image instead of the screen. Can you explain how? In principle, you are right. But the image you write to has the size of the screen, not of the image you want to show, and that's your problem here. You better write to an image that...
by grindstone
Aug 09, 2020 20:14
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

If the image is composed of multiple parts it's maybe better to do it invisible in the background.
by grindstone
Aug 09, 2020 19:59
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

No reason to apologise, I edited it several times. *smile*

Anyway, you can prepare the pictue you want to show by first writing it to an image instead of the screen, then Put this image to the center of the screen and make it visible with ScreenCopy.
by grindstone
Aug 09, 2020 18:42
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

As far as I understood, you have developed a device that produces images with a size of 1024 x 768 pixels at a color depth of 16 bits. These images are submitted via USB, and you want to display them on your PC monitor in a centered window. You already managed to read the image data from the device ...
by grindstone
Aug 09, 2020 18:10
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

@Daniel Ouellette: What OS are you using?
by grindstone
Aug 08, 2020 21:13
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

I'm wondering how they keep the images in video games in proportion regardless of the screen resolution, unless I'm wrong. Modern grapics cards are equipped with a great number of GPUs, spezialized processors for graphic computation. I doubt that there is a way to access those GPUs by FB (correct m...
by grindstone
Aug 08, 2020 20:45
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

By switching to fullscreen mode, is it possible to ensure that the image is not stretched? This is a beginner's question, but I wonder what the usual methods are. The simplest way to prevent an optical distortion is to add some vertical respectively horizontal stripes so the size of the picture mat...
by grindstone
Aug 08, 2020 20:35
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

The graphics routines of FB are optimized for the usual color depth of 32 bits. I assume that under the hood they always work with 32 bits, regardless of the chosen depth.
by grindstone
Aug 08, 2020 20:06
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

As a first approach I would recommend to set the colour depth of your graphics card to 16 bit, so the colour doesn't have to be recalculated for each pixel.
by grindstone
Aug 08, 2020 19:06
Forum: Beginners
Topic: [solved] GET and PUT ( graphics ) commands slow down my program[solved]
Replies: 63
Views: 668

Re: GET and PUT ( graphics ) commands slow down my program

A code says more than thousand words ;-)

Maybe you can post the relevant part of the code so we can see if there's some room for improvement.
by grindstone
Aug 04, 2020 11:14
Forum: Beginners
Topic: Stuck writing a simple bit toggle routine
Replies: 19
Views: 488

Re: Stuck writing a simple bit toggle routine

You don't need a Sub/Function to do that job:

Code: Select all

Dim As Any Ptr flag
Dim As Integer position

flag = -1
? Bin(flag)

position = 3
flag = Cast(Integer, flag) Xor (2^position)
? Bin(flag)

position = 5
flag = Cast(Integer, flag) Xor (2^position)
? Bin(flag)

Sleep


EDIT: Oops, jj2007 was faster.
by grindstone
Jul 30, 2020 7:30
Forum: Beginners
Topic: Can I check I understand file put & get correctly?
Replies: 11
Views: 297

Re: Can I check I understand file put & get correctly?

Alternatively, you can write a load/save SUB as member of the TYPE. Here an excerpt of BER approach , a flight operator simulation: ... Type tPlane callsign As String origin As String destination As String position As tPosition target As tPosition xdisp As Integer ydisp As Integer tagDispx As Intege...
by grindstone
Jul 20, 2020 10:44
Forum: Beginners
Topic: Odd issue with some string manipulation, any ideas?
Replies: 10
Views: 491

Re: Odd issue with some string manipulation, any ideas?

Using pointers considerably helps to keep track of string positions: Dim As String result, newstring, first, last Dim As Integer b, e 'pointers to "begin" and "end" result = "(2)(3)(4)(14)(15)(16)(30)(62)<57>(64)(65)<71><72><66>(67)(68)(70)<69>(57I1O2)<58><60><63>(71)(72)(66...
by grindstone
Jul 17, 2020 6:17
Forum: Game Dev
Topic: Simplicity
Replies: 3
Views: 172

Re: Simplicity

In principle it works here with WinXP 32, but mostly it takes 2 or 3 attempts of dragging before the piece really moves.

Go to advanced search