Author Topic: First alpha version released  (Read 26520 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: First alpha version released
« Reply #45 on: March 24, 2010, 10:53:03 am »
Maybe a call to glEnable(GL_COLOR_MATERIAL); right after creating the FrameBuffer will help?

Offline dl.zerocool

  • long
  • ***
  • Posts: 104
    • View Profile
Re: First alpha version released
« Reply #46 on: March 24, 2010, 11:58:57 am »
sadly it doesn't help either :
Code: [Select]
public void onSurfaceChanged(GL10 gl, int width, int height) {
Logger.log("On SurfaceChanged engine", Logger.MESSAGE);
if (fb != null) {
fb.dispose();
}
fb = new FrameBuffer(gl, width, height);
gl.glEnable(GL10.GL_COLOR_MATERIAL);

}

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: First alpha version released
« Reply #47 on: March 24, 2010, 12:35:20 pm »
Another shot in the dark is to remove the call to world.setRGBScale(World.RGB_SCALE_2X); and to remove the creation of the Light-instance to see if any of that helps...i doubt it, but just to be sure...

Offline dl.zerocool

  • long
  • ***
  • Posts: 104
    • View Profile
Re: First alpha version released
« Reply #48 on: March 24, 2010, 02:11:17 pm »
It was a nice shot !

Removing RGB scale don't affect anything, but when removing the light it worked out !
*Screen added

*ps: It does not work without the gl material color enabled.
*Sorry first edit was wrong :P

[attachment deleted by admin]
« Last Edit: March 24, 2010, 02:23:40 pm by dl.zerocool »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: First alpha version released
« Reply #49 on: March 24, 2010, 02:19:44 pm »
So it has to do something with the lighting...strange, but at least something to build upon...thanks for testing, i'll see what i can do to fix this by doing more shots in the dark... ;)

Offline dl.zerocool

  • long
  • ***
  • Posts: 104
    • View Profile
Re: First alpha version released
« Reply #50 on: March 24, 2010, 02:25:38 pm »
Thanks to you, at least I can work with this version now.
Until you changed some things :)

I've other lessons now, so I might not be available next few hours, but continue asking for tests, I'll try to do it asap.

Best regards :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: First alpha version released
« Reply #51 on: March 24, 2010, 02:34:37 pm »
Texture colors on the trees look a bit strange too. Like some little-/big-endian problem with swapped color channels. If you experience some other problems with texture colors, please let me know.

Offline dl.zerocool

  • long
  • ***
  • Posts: 104
    • View Profile
Re: First alpha version released
« Reply #52 on: March 24, 2010, 08:16:01 pm »
I don't know, but you are probably right, I was thinking this was due to the missing light.
But apparently not.
I'm blind color so between green and brown I do have some difficulties to see the differences.

But my classmate told me that you're true about colors.

*Edit:
I tested on the samsung spica and the it's really slow ! ~6fps.
Quite impressive to see the difference.
« Last Edit: March 24, 2010, 08:20:21 pm by dl.zerocool »

Offline dl.zerocool

  • long
  • ***
  • Posts: 104
    • View Profile
Re: First alpha version released
« Reply #53 on: March 24, 2010, 08:57:27 pm »
I'm sorry but I said something wrong.

gl.glEnable(GL10.GL_COLOR_MATERIAL); is not needed.
But if you remove world.setRGBScale(World.RGB_SCALE_2X); only it does work with lights activated :)
!!!  Apparently setRGBScale has no effect on the emulator, but it does do something in my mobile.
I'm sorry that I send you in the wrong way, my tests were incomplete.

*Screen available and code too.
I don't know if you added what I added right after the framebuffer instation. But probably yes :)
Anyway if so, don't take care to it.

I tried the code without that too.




[attachment deleted by admin]
« Last Edit: March 24, 2010, 09:18:27 pm by dl.zerocool »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: First alpha version released
« Reply #54 on: March 24, 2010, 09:39:34 pm »
Cool! I'll remove the support for RGB-Scaling then. It doesn't work on my phone anyway...but it doesn't harm. However, it does seem to harm on your device, so i'll turn it off and hide the setting for now.

To summarize: It's all fine like it is, you just have to remove the call to setRGBScale, correct?

I'm currently working on support for 4bpp textures (are always 8bpp right now) and cleanup some things. I'll upload a new version when done.

I'm impressed with the performance of your phone. What was it again? The Spica doesn't have a GPU as far i know, so it should be using Android's software renderer (just like the emulator). The gl renderer in the log should be something like "pixelflinger" in that case.

BTW: Don't worry about being color blind when doing graphics coding. Years ago, i had a mail discussion with someone about how to implement gouraud shading correctly in a software renderer and that guy was blind. Which didn't prevent him from implementing it...i never understood how he did that...

« Last Edit: March 24, 2010, 10:07:51 pm by EgonOlsen »

Offline dl.zerocool

  • long
  • ***
  • Posts: 104
    • View Profile
Re: First alpha version released
« Reply #55 on: March 24, 2010, 10:13:37 pm »
Nice :) I'm waiting for it !

Yes apparently it's correct removing RGB scaling is enough to make it work.

Code: [Select]
03-24 22:08:50.768: INFO/jPCT-AE(8550): OpenGL vendor:     Samsung Electronics
03-24 22:08:50.768: INFO/jPCT-AE(8550): OpenGL renderer:   FIMG
03-24 22:08:50.768: INFO/jPCT-AE(8550): OpenGL version:    1.1 (lib version 11.02.72)
03-24 22:08:50.768: INFO/jPCT-AE(8550): OpenGL renderer initialized (using 2 texture stages)
With this phone I only get 5-8 fps.

Nice story hehe :P I don't have much troubles with colors etc, except when someone ask me what color something is :P
Most of the time I'm wrong ^^

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: First alpha version released
« Reply #56 on: March 24, 2010, 10:23:04 pm »
OpenGL vendor is Samsung and renderer is...FIMG?...oh boy, why does every phone has to be different? Anyway, looks very much like a software renderer too me judging from the performance. My "big" Samsung Galaxy with a slower cpu than the Spica runs the demo @ around 27fps. Maybe they have written their own software renderer or just renamed pixelflinger. Any message like "generated scanline_..." in the log? That's what pixelflinger prints out when creating assembler code on the fly for optimized scanline renderers.

I've updated the jar, the docs and the demo (but not the demo's sources). Could you give the new demo a try to see if it works (it's using 4bpp textures now, which increases performance on my phone slightly)?

Thank you for your efforts, i really appreciate them. Without you doing these tests, i would never had the chance to figure this out.

Offline dl.zerocool

  • long
  • ***
  • Posts: 104
    • View Profile
Re: First alpha version released
« Reply #57 on: March 24, 2010, 10:39:58 pm »
No no message like "generated scanline..." so it's probably something else.
Code: [Select]
03-24 22:28:45.403: INFO/(8731): EGL_VENDOR     : HUONE
03-24 22:28:45.403: INFO/(8731): EGL_VERSION    : 1.3
03-24 22:28:45.403: INFO/(8731): EGL_EXTENSIONS :no extension
03-24 22:28:45.403: INFO/(8731): EGL_CLIENT_APIS: OpenVG OpenGL_ES
03-24 22:28:45.683: INFO/ActivityManager(1846): Displayed activity com.test.test/.test: 1090 ms
03-24 22:28:45.908: INFO/dalvikvm-heap(8731): Grow heap (frag case) to 3.632MB for 263188-byte allocation
03-24 22:28:46.033: INFO/jPCT-AE(8731): Loading Texture...
03-24 22:28:46.093: INFO/jPCT-AE(8731): Loading Texture...
03-24 22:28:46.128: INFO/jPCT-AE(8731): Loading Texture...
03-24 22:28:46.268: INFO/jPCT-AE(8731): Loading Texture...
03-24 22:28:46.378: INFO/jPCT-AE(8731): Loading Texture...
03-24 22:28:46.508: INFO/jPCT-AE(8731): Loading Texture...
03-24 22:28:46.913: INFO/jPCT-AE(8731): Adding Lightsource: 0
03-24 22:28:46.933: INFO/jPCT-AE(8731): OpenGL vendor:     Samsung Electronics
03-24 22:28:46.938: INFO/jPCT-AE(8731): OpenGL renderer:   FIMG
03-24 22:28:46.938: INFO/jPCT-AE(8731): OpenGL version:    1.1 (lib version 11.02.72)
03-24 22:28:46.938: INFO/jPCT-AE(8731): OpenGL renderer initialized (using 2 texture stages)
03-24 22:28:47.428: INFO/jPCT-AE(8731): Subobject of object 0/plane compiled using 2400 vertices in 345ms!
03-24 22:28:47.428: INFO/jPCT-AE(8731): Object 0/plane compiled to 1 subobjects in 485ms!
03-24 22:28:47.563: INFO/jPCT-AE(8731): Subobject of object 2/tree1 compiled using 690 vertices in 99ms!
03-24 22:28:47.563: INFO/jPCT-AE(8731): Object 2/tree1 compiled to 1 subobjects in 132ms!
03-24 22:28:47.598: INFO/ActivityManager(1846): Process com.dlcideas.ARescue (pid 8550) has died.
03-24 22:28:47.733: INFO/jPCT-AE(8731): Subobject of object 3/tree2 compiled using 690 vertices in 91ms!
03-24 22:28:47.733: INFO/jPCT-AE(8731): Object 3/tree2 compiled to 1 subobjects in 123ms!
03-24 22:28:47.783: INFO/jPCT-AE(8731): Subobject of object 4/grass compiled using 264 vertices in 37ms!
03-24 22:28:47.788: INFO/jPCT-AE(8731): Object 4/grass compiled to 1 subobjects in 52ms!
03-24 22:28:47.803: INFO/jPCT-AE(8731): Subobject of object 1/rock compiled using 84 vertices in 12ms!
03-24 22:28:47.808: INFO/jPCT-AE(8731): Object 1/rock compiled to 1 subobjects in 18ms!
03-24 22:28:47.943: INFO/dalvikvm-heap(8731): Grow heap (frag case) to 4.548MB for 262160-byte allocation
03-24 22:28:48.293: ERROR/(8731): Post fs attach shader: GL_INVALID_VALUE

I just tested the new demo with the Spica  there's an improvement from 5-8fps to 8 -10fps
With the nexus one, there's no move or perhaps just not noticeable.
ahah ^^ don't worry, I do like to help, and as I said I'm really really interested in using jpct in our school project.

We don't have time to build our own 3D engine with model loaders etc. So we do have to work with a base that it's already done.
And I thank you a lot for making this option possible to us.

Offline dl.zerocool

  • long
  • ***
  • Posts: 104
    • View Profile
Re: First alpha version released
« Reply #58 on: March 25, 2010, 06:14:25 pm »
Hello,

I would like to set the background to transparent (clear with transparency) my scene is it that possible ?
So I would be able to see a normal surfaceview (with another infos) trough my glsurfaceview.

I'm sorry to ask such a basic information ^^

Thank you in advance.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: First alpha version released
« Reply #59 on: March 25, 2010, 09:56:28 pm »
I've updated the jar with a version that uses the alpha value of a RGBColor (if assigned) when clearing the frame buffer. No idea, if this helps somehow... ???