Thanks guys!

My depth texture now works! Yeah! See screenshot.

So yes, passing '0' as data for glTexImage3D works, but the check 
framebuffer status indeed fails.
I use firefox 26.0 from Ubuntu.
But ignoring this failed framebuffer status seems to be fine, because my 
shadows show up just fine.

About webgl vs experimental-webgl:

*Error: WebGL: Retrieving a WebGL context from a canvas via a request id 
('webgl') different from the id used to create the context 
('experimental-webgl') is not allowed.*

So far I am really impressed by emscripten.
The only major issue left is with sockets, but apart from that, graphics, 
sound, keyb, mouse are all fine.

  Bram

<https://lh3.googleusercontent.com/-PnlTGmSjBEw/UthPQsxUIhI/AAAAAAAACQs/4L9p3v6qHCQ/s1600/withshadow.png>



On Thursday, January 16, 2014 12:00:15 PM UTC-8, Floh wrote:
>
> 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.

Reply via email to