graphics: correctly pass layer alpha level through
This commit is contained in:
parent
238a26aee3
commit
1037e8aab9
9 changed files with 28 additions and 25 deletions
|
|
@ -414,7 +414,7 @@ bool is_layer_blacklisted(const std::string &name) {
|
|||
return std::find(blacklist.begin(), blacklist.end(), name) != blacklist.end();
|
||||
}
|
||||
|
||||
void rcPostLayer(const char *name, uint32_t color_buffer,
|
||||
void rcPostLayer(const char *name, uint32_t color_buffer, float alpha,
|
||||
int32_t sourceCropLeft, int32_t sourceCropTop,
|
||||
int32_t sourceCropRight, int32_t sourceCropBottom,
|
||||
int32_t displayFrameLeft, int32_t displayFrameTop,
|
||||
|
|
@ -422,6 +422,7 @@ void rcPostLayer(const char *name, uint32_t color_buffer,
|
|||
Renderable r{
|
||||
name,
|
||||
color_buffer,
|
||||
alpha,
|
||||
{displayFrameLeft, displayFrameTop, displayFrameRight, displayFrameBottom},
|
||||
{sourceCropLeft, sourceCropTop, sourceCropRight, sourceCropBottom}};
|
||||
frame_layers.push_back(r);
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
#include "anbox/graphics/emugl/Renderable.h"
|
||||
|
||||
Renderable::Renderable(const std::string &name, const std::uint32_t &buffer,
|
||||
Renderable::Renderable(const std::string &name, const std::uint32_t &buffer, float alpha,
|
||||
const anbox::graphics::Rect &screen_position,
|
||||
const anbox::graphics::Rect &crop,
|
||||
const glm::mat4 &transformation, const float &alpha)
|
||||
const glm::mat4 &transformation)
|
||||
: name_(name),
|
||||
buffer_(buffer),
|
||||
screen_position_(screen_position),
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@
|
|||
|
||||
class Renderable {
|
||||
public:
|
||||
Renderable(const std::string &name, const std::uint32_t &buffer,
|
||||
Renderable(const std::string &name, const std::uint32_t &buffer, float alpha,
|
||||
const anbox::graphics::Rect &screen_position,
|
||||
const anbox::graphics::Rect &crop = {},
|
||||
const glm::mat4 &transformation = {}, const float &alpha = 1.0f);
|
||||
const glm::mat4 &transformation = {});
|
||||
~Renderable();
|
||||
|
||||
std::string name() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue