Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
FrameBuffer.blit(RGBColor...)
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: FrameBuffer.blit(RGBColor...) (Read 2851 times)
Thomas.
double
Posts: 833
FrameBuffer.blit(RGBColor...)
«
on:
January 23, 2013, 11:29:19 pm »
Please, could you add method FrameBuffer.blit(RGBColor col, int destX, int destY, int width, int height, boolean transparent)? This should be much faster than blit 8*8 white texture with additional color.
Logged
My game for Android
,
Physics example
,
Texture assistant
EgonOlsen
Administrator
quad
Posts: 12297
Re: FrameBuffer.blit(RGBColor...)
«
Reply #1 on:
January 24, 2013, 10:26:45 am »
Why should that be any faster? It's the same basic operation of rendering a quad...
Logged
Thomas.
double
Posts: 833
Re: FrameBuffer.blit(RGBColor...)
«
Reply #2 on:
January 24, 2013, 11:19:24 am »
I suppose, when is blitted texture with additional color, to every pixel of texture is added additional color, so on 1280*720 it is a lot of extra calculations... But I do not know what is hiding in the background.
Logged
My game for Android
,
Physics example
,
Texture assistant
EgonOlsen
Administrator
quad
Posts: 12297
Re: FrameBuffer.blit(RGBColor...)
«
Reply #3 on:
January 24, 2013, 12:34:17 pm »
On PowerVR this has no effect at all. On Mali and Tegra it's faster if you omit the texture and render the color only, but that's only noticable in a very artifical test case when you blit 100 times the same texture filling the whole screen. And why would you want to do that? A clear with some color would be much faster anyway...
Logged
Thomas.
double
Posts: 833
Re: FrameBuffer.blit(RGBColor...)
«
Reply #4 on:
January 24, 2013, 12:55:53 pm »
It is for menu. Everything are blitted with using colors, there are not needed any textures. How big differences are in speed?
Logged
My game for Android
,
Physics example
,
Texture assistant
EgonOlsen
Administrator
quad
Posts: 12297
Re: FrameBuffer.blit(RGBColor...)
«
Reply #5 on:
January 24, 2013, 12:59:23 pm »
When filling the screen (1280*800) on the Nexus 7 100times, it's half as fast when using the texture access then without it. But as said, that's a stupid test case. Nobody would do that and no menu would come even close to these numbers...
Logged
Thomas.
double
Posts: 833
Re: FrameBuffer.blit(RGBColor...)
«
Reply #6 on:
January 24, 2013, 01:12:57 pm »
Well, so I try optimize my code sometime in the future (fps drops down from 60 to 55 when is editor menu visible)... Thank you for testing
Logged
My game for Android
,
Physics example
,
Texture assistant
EgonOlsen
Administrator
quad
Posts: 12297
Re: FrameBuffer.blit(RGBColor...)
«
Reply #7 on:
January 24, 2013, 01:19:29 pm »
If it ever becomes a problem, i can still try to detect your special case and optimize the shader for it, but i don't think that this will ever be needed. The drop you see comes from the additional rendering and state switches and such, not from the lack if fill rate.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
FrameBuffer.blit(RGBColor...)