mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-15 00:11:55 +07:00
remove depth32 texture format, fix render target support detection
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
version: "{build}"
|
||||
environment:
|
||||
global:
|
||||
- E2D_WITHOUT_AUDIO=true
|
||||
- E2D_WITHOUT_GRAPHICS=true
|
||||
E2D_WITHOUT_AUDIO: true
|
||||
E2D_WITHOUT_GRAPHICS: true
|
||||
image:
|
||||
- Visual Studio 2017
|
||||
- Visual Studio 2019 Preview
|
||||
|
||||
@@ -46,7 +46,6 @@ namespace e2d
|
||||
enum class pixel_type : u8 {
|
||||
depth16,
|
||||
depth24,
|
||||
depth32,
|
||||
depth24_stencil8,
|
||||
|
||||
g8,
|
||||
@@ -900,7 +899,6 @@ namespace e2d
|
||||
|
||||
bool depth16_supported = false;
|
||||
bool depth24_supported = false;
|
||||
bool depth32_supported = false;
|
||||
bool depth24_stencil8_supported = false;
|
||||
|
||||
bool dxt_compression_supported = false;
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace
|
||||
const pixel_type_description pixel_type_descriptions[] = {
|
||||
{"depth16", 16, false, true, false, pixel_declaration::pixel_type::depth16, false, v2u(1)},
|
||||
{"depth24", 24, false, true, false, pixel_declaration::pixel_type::depth24, false, v2u(1)},
|
||||
{"depth32", 32, false, true, false, pixel_declaration::pixel_type::depth32, false, v2u(1)},
|
||||
{"depth24_stencil8", 32, false, true, true, pixel_declaration::pixel_type::depth24_stencil8, false, v2u(1)},
|
||||
|
||||
{"g8", 8, true, false, false, pixel_declaration::pixel_type::g8, false, v2u(1)},
|
||||
|
||||
@@ -1149,9 +1149,6 @@ namespace e2d
|
||||
case pixel_declaration::pixel_type::depth24:
|
||||
return caps.depth_texture_supported
|
||||
&& caps.depth24_supported;
|
||||
case pixel_declaration::pixel_type::depth32:
|
||||
return caps.depth_texture_supported
|
||||
&& caps.depth32_supported;
|
||||
case pixel_declaration::pixel_type::depth24_stencil8:
|
||||
return caps.depth_texture_supported
|
||||
&& caps.depth24_stencil8_supported;
|
||||
|
||||
@@ -788,7 +788,6 @@ namespace e2d::opengl
|
||||
switch ( f ) {
|
||||
DEFINE_CASE(depth16, GL_DEPTH_COMPONENT);
|
||||
DEFINE_CASE(depth24, GL_DEPTH_COMPONENT);
|
||||
DEFINE_CASE(depth32, GL_DEPTH_COMPONENT);
|
||||
DEFINE_CASE(depth24_stencil8, GL_DEPTH_STENCIL);
|
||||
DEFINE_CASE(g8, GL_ALPHA);
|
||||
DEFINE_CASE(ga8, GL_LUMINANCE_ALPHA);
|
||||
@@ -806,7 +805,6 @@ namespace e2d::opengl
|
||||
switch ( f ) {
|
||||
DEFINE_CASE(depth16, GL_UNSIGNED_SHORT);
|
||||
DEFINE_CASE(depth24, GL_UNSIGNED_INT);
|
||||
DEFINE_CASE(depth32, GL_UNSIGNED_INT);
|
||||
DEFINE_CASE(depth24_stencil8, GL_UNSIGNED_INT_24_8);
|
||||
DEFINE_CASE(g8, GL_UNSIGNED_BYTE);
|
||||
DEFINE_CASE(ga8, GL_UNSIGNED_BYTE);
|
||||
@@ -824,7 +822,6 @@ namespace e2d::opengl
|
||||
switch ( f ) {
|
||||
DEFINE_CASE(depth16, GL_DEPTH_COMPONENT16);
|
||||
DEFINE_CASE(depth24, GL_DEPTH_COMPONENT24);
|
||||
DEFINE_CASE(depth32, GL_DEPTH_COMPONENT32);
|
||||
DEFINE_CASE(depth24_stencil8, GL_DEPTH24_STENCIL8);
|
||||
|
||||
DEFINE_CASE(g8, GL_ALPHA);
|
||||
@@ -1388,7 +1385,7 @@ namespace e2d::opengl
|
||||
|
||||
caps.render_target_supported =
|
||||
version >= gl_version::gl_300 ||
|
||||
version >= gl_version::gles_300 ||
|
||||
version >= gl_version::gles_200 ||
|
||||
gl_has_any_extension(debug,
|
||||
"GL_OES_framebuffer_object",
|
||||
"GL_ARB_framebuffer_object",
|
||||
@@ -1414,13 +1411,6 @@ namespace e2d::opengl
|
||||
"GL_OES_depth24",
|
||||
"GL_ARB_depth_texture");
|
||||
|
||||
caps.depth32_supported =
|
||||
version >= gl_version::gl_210 ||
|
||||
version >= gl_version::gles_300 ||
|
||||
gl_has_any_extension(debug,
|
||||
"GL_OES_depth32",
|
||||
"GL_ARB_depth_texture");
|
||||
|
||||
caps.depth24_stencil8_supported =
|
||||
version >= gl_version::gl_300 ||
|
||||
version >= gl_version::gles_300 ||
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
// GL_OES_depth24
|
||||
# define GL_DEPTH_COMPONENT24 GL_DEPTH_COMPONENT24_OES
|
||||
|
||||
// GL_OES_depth32
|
||||
# define GL_DEPTH_COMPONENT32 GL_DEPTH_COMPONENT32_OES
|
||||
|
||||
// GL_OES_packed_depth_stencil
|
||||
# define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES
|
||||
# define GL_UNSIGNED_INT_24_8 GL_UNSIGNED_INT_24_8_OES
|
||||
|
||||
Reference in New Issue
Block a user