specify size of buffer and use openglstate in getteximageoes
This commit is contained in:
parent
a458155f99
commit
df99d98240
15 changed files with 49 additions and 86 deletions
|
@ -212,12 +212,6 @@ public:
|
|||
/// Gets a const reference to the cheat engine
|
||||
const Cheats::CheatEngine& CheatEngine() const;
|
||||
|
||||
/// Gets a reference to the video dumper backend
|
||||
VideoDumper::Backend& VideoDumper();
|
||||
|
||||
/// Gets a const reference to the video dumper backend
|
||||
const VideoDumper::Backend& VideoDumper() const;
|
||||
|
||||
/// Gets a reference to the custom texture cache system
|
||||
Core::CustomTexCache& CustomTexCache();
|
||||
|
||||
|
@ -233,6 +227,7 @@ public:
|
|||
/// Gets a const reference to the video dumper backend
|
||||
const VideoDumper::Backend& VideoDumper() const;
|
||||
|
||||
std::unique_ptr<PerfStats> perf_stats;
|
||||
FrameLimiter frame_limiter;
|
||||
|
||||
void SetStatus(ResultStatus new_status, const char* details = nullptr) {
|
||||
|
|
|
@ -82,8 +82,9 @@ void CustomTexCache::PreloadTextures() {
|
|||
if (image_interface->DecodePNG(tex_info.tex, tex_info.width, tex_info.height,
|
||||
path_info.path)) {
|
||||
// Make sure the texture size is a power of 2
|
||||
if ((ceil(log2(tex_info.width)) == floor(log2(tex_info.width))) &&
|
||||
(ceil(log2(tex_info.height)) == floor(log2(tex_info.height)))) {
|
||||
std::bitset<32> width_bits(tex_info.width);
|
||||
std::bitset<32> height_bits(tex_info.height);
|
||||
if (width_bits.count() == 1 && height_bits.count() == 1) {
|
||||
LOG_DEBUG(Render_OpenGL, "Loaded custom texture from {}", path_info.path);
|
||||
Common::FlipRGBA8Texture(tex_info.tex, tex_info.width, tex_info.height);
|
||||
CacheTexture(path_info.hash, tex_info.tex, tex_info.width, tex_info.height);
|
||||
|
|
|
@ -48,4 +48,4 @@ private:
|
|||
std::unordered_map<u64, CustomTexInfo> custom_textures;
|
||||
std::unordered_map<u64, CustomTexPathInfo> custom_texture_paths;
|
||||
};
|
||||
} // namespace Core
|
||||
} // namespace Core
|
||||
|
|
|
@ -21,4 +21,4 @@ public:
|
|||
u32 height) = 0;
|
||||
};
|
||||
|
||||
} // namespace Frontend
|
||||
} // namespace Frontend
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue