mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Workaround for exit crash on Android. Need to rethink this...
This commit is contained in:
parent
6136123830
commit
f5cef88e14
1 changed files with 5 additions and 13 deletions
|
@ -658,7 +658,7 @@ inline bool isPowerOf2(int n) {
|
|||
return n == 1 || (n & (n - 1)) == 0;
|
||||
}
|
||||
|
||||
class OpenGLTexture : public Texture, GfxResourceHolder {
|
||||
class OpenGLTexture : public Texture {
|
||||
public:
|
||||
OpenGLTexture(const TextureDesc &desc) : tex_(0), target_(TypeToTarget(desc.type)), format_(desc.format), mipLevels_(desc.mipLevels) {
|
||||
generatedMips_ = false;
|
||||
|
@ -669,7 +669,6 @@ public:
|
|||
canWrap_ = !isPowerOf2(width_) || !isPowerOf2(height_);
|
||||
|
||||
glGenTextures(1, &tex_);
|
||||
register_gl_resource_holder(this);
|
||||
|
||||
if (!desc.initData.size())
|
||||
return;
|
||||
|
@ -685,7 +684,6 @@ public:
|
|||
AutoGenMipmaps();
|
||||
}
|
||||
~OpenGLTexture() {
|
||||
unregister_gl_resource_holder(this);
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
@ -711,15 +709,6 @@ public:
|
|||
glBindTexture(target_, tex_);
|
||||
}
|
||||
|
||||
void GLLost() override {
|
||||
// We can assume that the texture is gone.
|
||||
tex_ = 0;
|
||||
generatedMips_ = false;
|
||||
}
|
||||
|
||||
void GLRestore() override {
|
||||
}
|
||||
|
||||
private:
|
||||
GLuint tex_;
|
||||
GLuint target_;
|
||||
|
@ -882,6 +871,9 @@ RasterState *OpenGLContext::CreateRasterState(const RasterStateDesc &desc) {
|
|||
case CullMode::FRONT_AND_BACK:
|
||||
rs->cullMode = GL_FRONT_AND_BACK;
|
||||
break;
|
||||
case CullMode::NONE:
|
||||
// Unsupported
|
||||
break;
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
@ -1192,4 +1184,4 @@ uint32_t OpenGLContext::GetDataFormatSupport(DataFormat fmt) const {
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace Draw
|
||||
} // namespace Draw
|
||||
|
|
Loading…
Add table
Reference in a new issue