mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
[PICA] Attempt depth offset/scale and depthmap enable
This commit is contained in:
parent
e9673c9255
commit
f25bc2dd89
3 changed files with 67 additions and 15 deletions
|
@ -143,14 +143,14 @@ struct DepthBuffer {
|
|||
};
|
||||
|
||||
static constexpr std::array<GLenum, 4> types = {
|
||||
GL_FLOAT, GL_FLOAT, GL_FLOAT, GL_UNSIGNED_INT_24_8
|
||||
GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, GL_UNSIGNED_INT, GL_UNSIGNED_INT_24_8
|
||||
};
|
||||
|
||||
auto internalFormat = internalFormats[(int)format];
|
||||
auto fmt = formats[(int)format];
|
||||
auto type = types[(int)format];
|
||||
|
||||
texture.createDSTexture(size.x(), size.y(), internalFormat, fmt, nullptr, type);
|
||||
texture.createDSTexture(size.x(), size.y(), internalFormat, fmt, nullptr, type, GL_TEXTURE_2D);
|
||||
texture.bind();
|
||||
texture.setMinFilter(OpenGL::Linear);
|
||||
texture.setMagFilter(OpenGL::Linear);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue