mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-21 14:23:02 +01:00
Cleanup.
This commit is contained in:
64
src/bgfx.cpp
64
src/bgfx.cpp
@@ -352,14 +352,14 @@ namespace bgfx
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numMips = uint8_t(bx::uint16_max(1, _numMips) );
|
||||
tc.m_format = _format;
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numLayers = 1;
|
||||
tc.m_numMips = uint8_t(bx::uint16_max(1, _numMips) );
|
||||
tc.m_format = _format;
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
bx::write(&writer, tc);
|
||||
|
||||
rci->destroyTexture(_handle);
|
||||
@@ -2974,14 +2974,14 @@ error:
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numMips = numMips;
|
||||
tc.m_format = _format;
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = _mem;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numLayers = 1;
|
||||
tc.m_numMips = numMips;
|
||||
tc.m_format = _format;
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = _mem;
|
||||
bx::write(&writer, tc);
|
||||
|
||||
return s_ctx->createTexture(mem, _flags, 0, NULL, _ratio);
|
||||
@@ -3030,14 +3030,14 @@ error:
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
tc.m_depth = _depth;
|
||||
tc.m_numMips = numMips;
|
||||
tc.m_format = _format;
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = _mem;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_depth = _depth;
|
||||
tc.m_numLayers = 1;
|
||||
tc.m_numMips = numMips;
|
||||
tc.m_format = _format;
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = _mem;
|
||||
bx::write(&writer, tc);
|
||||
|
||||
return s_ctx->createTexture(mem, _flags, 0, NULL, BackbufferRatio::Count);
|
||||
@@ -3073,14 +3073,14 @@ error:
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_width = _size;
|
||||
tc.m_height = _size;
|
||||
tc.m_sides = 6;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numMips = numMips;
|
||||
tc.m_format = _format;
|
||||
tc.m_cubeMap = true;
|
||||
tc.m_mem = _mem;
|
||||
tc.m_width = _size;
|
||||
tc.m_height = _size;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numLayers = 1;
|
||||
tc.m_numMips = numMips;
|
||||
tc.m_format = _format;
|
||||
tc.m_cubeMap = true;
|
||||
tc.m_mem = _mem;
|
||||
bx::write(&writer, tc);
|
||||
|
||||
return s_ctx->createTexture(mem, _flags, 0, NULL, BackbufferRatio::Count);
|
||||
|
||||
@@ -320,8 +320,8 @@ namespace bgfx
|
||||
TextureFormat::Enum m_format;
|
||||
uint16_t m_width;
|
||||
uint16_t m_height;
|
||||
uint16_t m_sides;
|
||||
uint16_t m_depth;
|
||||
uint16_t m_numLayers;
|
||||
uint8_t m_numMips;
|
||||
bool m_cubeMap;
|
||||
const Memory* m_mem;
|
||||
|
||||
@@ -1850,14 +1850,14 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numMips = _numMips;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numLayers = 1;
|
||||
tc.m_numMips = _numMips;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
bx::write(&writer, tc);
|
||||
|
||||
texture.destroy();
|
||||
|
||||
@@ -1476,14 +1476,14 @@ namespace bgfx { namespace d3d12
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numMips = _numMips;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numLayers = 1;
|
||||
tc.m_numMips = _numMips;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
bx::write(&writer, tc);
|
||||
|
||||
texture.destroy();
|
||||
|
||||
@@ -1031,14 +1031,14 @@ namespace bgfx { namespace d3d9
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numMips = _numMips;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numLayers = 1;
|
||||
tc.m_numMips = _numMips;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
bx::write(&writer, tc);
|
||||
|
||||
texture.destroy(true);
|
||||
|
||||
@@ -2322,14 +2322,14 @@ namespace bgfx { namespace gl
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numMips = _numMips;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numLayers = 1;
|
||||
tc.m_numMips = _numMips;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
bx::write(&writer, tc);
|
||||
|
||||
texture.destroy();
|
||||
|
||||
@@ -809,14 +809,14 @@ namespace bgfx { namespace mtl
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numMips = _numMips;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numLayers = 1;
|
||||
tc.m_numMips = _numMips;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
bx::write(&writer, tc);
|
||||
|
||||
texture.destroy();
|
||||
|
||||
Reference in New Issue
Block a user