Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zbych

Pages: 1 ... 3 4 [5]
61
Support / Re: A lot of errors EGL_BAD_ALLOC ?
« on: June 05, 2012, 12:49:34 pm »
I have looked at this article before, but when I was checking code today I found in onPaue() I call first _glView.onPause() and then super.onPause(), maybe this is the reason. I'll change order of this and will see.

62
Support / Re: A lot of errors EGL_BAD_ALLOC ?
« on: June 04, 2012, 11:27:47 pm »
Unfortunately thats all I can get from play market developer's console  :(
Users usualy sends error reports without any information, or with information: "not working !!"   :D

63
Support / A lot of errors EGL_BAD_ALLOC ?
« on: June 04, 2012, 10:33:09 pm »
Hi.

I'm getting a lot of error reports of this type from users running my game. Is here someone with idea what causes it, or is it possible to avoid it?

java.lang.RuntimeException: eglSwapBuffers failed: EGL_BAD_ALLOC
at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1082)
at android.opengl.GLSurfaceView$EglHelper.swap(GLSurfaceView.java:1040)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1338)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1121)

64
Projects / Re: 3D Landscape - wallpaper
« on: May 28, 2012, 10:46:46 pm »
There are 3 ranges of array: 65x65, 129x129, 257x257. So it gives in highest mode 256x256x2= 131072 triangles. But this mode is for devices with power similar to Samsung galaxy s2. The movie in market shows 129x129 mode on LG gt540 (Cyanogen mod 7)

65
Projects / 3D Landscape - wallpaper
« on: May 25, 2012, 12:18:12 am »
This time I want to present live wallpaper. It generates simple landscape model (diamond square algorithm), and animate camera over it. No shaders, just one light, two textures (both generated with diamond square), and fog.
I am starting to think how to use it in game... ;)

You can download it here: https://play.google.com/store/apps/details?id=com.zr.landscape3d

It uses Airpush (as all of my wallpapers).


66
Projects / Re: Spray The Wall - simple free game
« on: April 30, 2012, 06:02:30 pm »
Odd behaviour is on my side. I know this game would cause troubles on some devices.

The problem exists because I'm not using default jPCT texture load procedure. I will explain how this game works.

Texutre image is in "system" memory where I use Context to paint with spray, when this
is done I have to load texture into graphic memory, in onDraw, before objects are drawn i call:

GLES20.glActiveTexture(GLES10.GL_TEXTURE0);
GLES20.glBindTexture(GLES10.GL_TEXTURE_2D, myTextureId);
GLUtils.texSubImage2D(GLES10.GL_TEXTURE_2D, 0, 0, 0, wallBitmap);

after this sequence I do "normal" drawing:
 frameBuffer.clear();
 world.renderScene(frameBuffer);
 world.draw(frameBuffer);

but wall objects have set render hook, and in beforeRendering() I execute sequence:

GLES10.glActiveTexture(GLES10.GL_TEXTURE0);
GLES10.glBindTexture(GLES10.GL_TEXTURE_2D,  myTextureId);
if(_useGL20) {
  shader.setUniform("textureUnit0", 0);
  GLES10.glActiveTexture(GLES20.GL_TEXTURE1);
  GLES10.glBindTexture(GLES20.GL_TEXTURE_2D, bumpTextureId);
  shader.setUniform("textureUnit1", 1);
  GLES10.glActiveTexture(GLES10.GL_TEXTURE0);
}

It works on emulator, and on other devices when I was testing it.
I know it is unusual way to use this engine, but this is the fastest way of load texture into opengl I know so far.

67
Projects / Re: Spray The Wall - simple free game
« on: April 29, 2012, 09:49:00 pm »
I have tested it on Samsung Galaxy Mini, Galaxy S2, LG GT540. I have run it once on HTC but not sure what type, HTC was slowest but all those device rendered scene correctly.

68
Projects / Spray The Wall - simple free game
« on: April 29, 2012, 08:17:41 pm »
After some fight with texture managment my first game with jPCT is ready. Unfortunately I was unable to do dynamic texturing using only GLSL and render to texture, I had to stay with idea of realoading texture every time it becomes "dirty", it is bottleneck of game loop :(
The game has option to disable shaders and use GLES 1.x
Your task in this game is to paint graffiti as close as possible to given template.

https://play.google.com/store/apps/details?id=com.zr.spray.wall



69
Projects / Re: 3D Live Wallpaper using GLSL
« on: February 22, 2012, 12:03:34 pm »
I know it's issue of wallpaper service... it is modified version of Robert Green's wallpaper service, forced to create ES 2.0 context. Previously I have added limit for devices supporting only ES 2.0 however it didn't help. That's why i removed it and modified code - when it fail to create 2.0 context then it will try to crete 1.x and disable shaders, but looks like it didn't help much for devices with ES 2.0, but should help devices with ES 1.x only.

70
Projects / 3D Live Wallpaper using GLSL
« on: February 22, 2012, 09:24:03 am »
It's my first project using jPCT. I have written it for Valentine's day and it's my first OpengGL app with GLSL. I know Valentine's is behind us :) but  I wanted to say that the possibility to use shaders in jPCT is great thing.
On some devices there might be "Create context error", but I am unable to find the reason of this.

https://market.android.com/details?id=com.zr.valentine.photo.heart

71
Support / Re: Dynamic texture - setRenderTarget
« on: February 18, 2012, 01:12:57 am »
It was from begining in GL ES 2.0. I have just tested this on GL ES 1.x and there was black texture, no rendering output .

72
Support / Re: Dynamic texture - setRenderTarget
« on: February 18, 2012, 12:23:57 am »
I have already tried this. Texture looks better but it is not enough.
Thanks for help but it looks like I have to find another way :(


73
Support / Re: Dynamic texture - setRenderTarget
« on: February 17, 2012, 11:58:16 pm »
I want to render to this texture again, without clearing its data. If I clear it every frame and render to it then everything looks ok, but if I don't clear it (don't call framebuffer.clear() with this texture as render target) then I get dirty texture on input - it is filled with trash and I don't know why.
Of course i clear it when it is first time created, but i don't want to do it every rendered frame.
For example I have rendered letter "A" to this texture and in next animation frame I want to add "B", if I clear this texture then I have to render both letters, but I want to add just new letter - imagine when there are 1000 letters and you want to add 1, if you clear this texture then you have to render 1000 previous letters to add 1 new on the end. I want to avoid it.

74
Support / Re: Dynamic texture - setRenderTarget
« on: February 17, 2012, 10:29:40 pm »
Sorry i was thinking about buffer holding texture data not framebuffer

75
Support / Dynamic texture - setRenderTarget
« on: February 17, 2012, 09:57:44 pm »
I wanted to write an application that uses a dynamically changing textures - just need to copy the contents of one texture to another in the desired location.
I tried to use the opportunity to render to texture, but I found a problem. I do not know whether it is normal for OpenGL ES, but the problem is that during the next call
onDrawFrame the framebuffer holding dynamic texture contains garbage and is useless without clearing and re-rendering it again, but I need to keep the contents of this texture and draw another items on it. I tested it on three devices and only on one of them texture has not been littered between subsequent calls onDrawFrame.

Is any solution to this, or other way to generate dynamic textures without having to load them into GPU memory?

Pages: 1 ... 3 4 [5]