Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
One code line kils all fps help #238490
11/27/08 18:28
11/27/08 18:28
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Hi! I render panel to bmap. Then I read pixel value from this panel. Panel stores 1024X768 24bit BMP file.

Quote:

color_map.target_map = colormap;
bmap_to_format(colormap,888);
bmap_lock(colormap,888);
pixel = pixel_for_bmap(colormap,mouse_cursor.x,mouse_cursor.y);
bmap_unlock(colormap);
pixel_to_vec(color,NULL,888,pixel);



Now, I tried comment different lines. This only one:

bmap_to_format(colormap,888);

kills fps, drops it to 0. Why is it so? Is it so resourcy, or I am doing something wrong?


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: One code line kils all fps help [Re: RyuMaster] #238498
11/27/08 20:04
11/27/08 20:04
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Very BMAP dependant, rather than resourcey.
If the BMAP its converting is large resolution, it will be SSSSLLLLOOOOWWWWWW.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: One code line kils all fps help [Re: EvilSOB] #238499
11/27/08 20:15
11/27/08 20:15
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Ah, damn it. What should I do now... Maybe find a way to process only little part of bmap where mouse pointer actually is... OH! I KNOW I KNOW ^____^

Last edited by RyuMaster; 11/27/08 20:20.

What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: One code line kils all fps help [Re: RyuMaster] #238507
11/27/08 20:45
11/27/08 20:45
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
i tried somthing similar and got the same problem but i realy need the whole screen

i am trying to scan what frame was differnt next to a older frame but rendering every frame is way to haevyeven white small size bmaps

hope you can find it out but maby check this only when you click on the mouse


"empty"
Re: One code line kils all fps help [Re: flits] #238574
11/28/08 12:01
11/28/08 12:01
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Thanks to EvilSOB's confirmation, I dropped idea of converting screen every frame.
What I did is scanned image with colors on load only once, and stored cell color information into the array for further uses, and that suits my needs.

Rendering every full frame indeed impossible... maybe pixel shader can help somehow.


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: One code line kils all fps help [Re: RyuMaster] #238802
11/30/08 10:30
11/30/08 10:30
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
why do you convert it? just get the format by bmap_lock and use it in your pixel_to_vec-instruction.

Re: One code line kils all fps help [Re: Joey] #238849
11/30/08 18:59
11/30/08 18:59
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
target maps can not be used for pixel instruction. I get crash.


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: One code line kils all fps help [Re: RyuMaster] #238999
12/01/08 18:05
12/01/08 18:05
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Maybe there are DirectX-functions to work with pixels of a target map.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1