Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Can AGK2 copy memory / get pixels pointer?

Author
Message
Slayer_1.0
8
Years of Service
User Offline
Joined: 8th Jan 2016
Location:
Posted: 14th Jan 2016 10:59
Hello..

I want to draw to the backbuffer every frame similar to dark basic pro.

Is the backbuffer a Memblock? Does the Backbuffer have an ID, 0 or -1 or something.

Can a Memblock be configured to be recognized by the buffer to be an Image, so that when Render() the ID
of it can be used?

I haven't programmed in years

Basically I want to Copy memory to the backbuffer's location in memory



Thanks

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Jan 2016 13:04
It doesn't have that feature yet.
The next best option is to create a Render Image and copy that to a memblock. But it is much slower than the DBPro way.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 14th Jan 2016 14:16
https://forum.thegamecreators.com/thread/214589

If you check this thread of mine for Doodle Draw there is a bit of code in there which was updated by Paul Johnston showing how to use Render Images for double buffering.
As BatVink said though it is not the same as DB Pro and not as fast but depending what you want to do it might work.
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Jan 2016 14:56
I forgot to mention, I have one app that has a full screen render image, and runs at 250FPS+
But I am not copying to a memblock and back. That will be the slow part.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Slayer_1.0
8
Years of Service
User Offline
Joined: 8th Jan 2016
Location:
Posted: 14th Jan 2016 16:27 Edited at: 14th Jan 2016 17:32
Thanks BatVink

Thanks spectrepaul

I'm wanting to turn pixels into little light bulbs to light up a 2D background / surface image..
I want my txt and buttons to glow where I may place them.
sprits will just have to do for such an effect and for the speed I need.
Will have to be an on hold idea tell such commands are in place to do so.. still a cool programming lang though

Take care
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 14th Jan 2016 18:35
You got me thinking there BatVink as Doodle Draw doesn't use memblocks either so just checked it and getting 300fps so not bad
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Jan 2016 19:04
300FPS is nice for all of the effort you put into Doodle Draw

People have achieved glow effects with Shaders. That is where my help ends, I don't know anything valuable about shaders.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-04-19 01:01:48
Your offset time is: 2024-04-19 01:01:48