|
|
One code line kils all fps help
#238490
11/27/08 18:28
11/27/08 18:28
|
Joined: Aug 2006
Posts: 155
RyuMaster
OP
Member
|
OP
Member
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. 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
Expert
|
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
RyuMaster
OP
Member
|
OP
Member
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
flits
User
|
User
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
RyuMaster
OP
Member
|
OP
Member
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: Joey]
#238849
11/30/08 18:59
11/30/08 18:59
|
Joined: Aug 2006
Posts: 155
RyuMaster
OP
Member
|
OP
Member
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***
|
|
|
|