This bug might be related:
https://bugzilla.mozilla.org/show_bug.cgi?id=948002
I got 24.8 depth textures (but combined with a color buffer texture)
working like this:
glGenTextures(1, &glDepthRenderTexture);
glBindTexture(GL_TEXTURE_2D, glDepthRenderTexture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); // no
mipmap filtering!
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
n_printf("GLTextureFactory: creating 24.8 depth stencil texture\n");
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_STENCIL, width, height, 0,
GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0);
GL_CHECK_ERROR();
This fails on current Nightly with a framebuffer completeness check (see
bugzilla bug above).
Cheers,
-Floh.
Am Mittwoch, 15. Januar 2014 07:13:39 UTC+1 schrieb Bram Stolk:
>
> My emscripted OpenGL-ES2 game fails to create a depth texture.
> The extension is supported on my machine, yet:
>
> I try to create the depth texture with:
> glTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, SHADOWBUFFERSIZE,
> SHADOWBUFFERSIZE, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, depthbuffermem );
>
> This results in:
> GL_INVALID_OPERATION
>
> I guess it could be a limit of WebGL not supporting depth textures?
> Or could it be something emscripten does not tolerate?
>
> I use firefox to load the HTML created with ASM_JS=1.
> Also, my frag+vert GLSL shaders get compiled and linked just fine.
>
> My OpenGL context is created via SDL:
> SDL_Surface* screen = SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL );
>
> Thx,
>
> bram
>
>
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.