22 #ifndef BACKENDS_GRAPHICS_OPENGL_PIPELINES_LIBRETRO_H 23 #define BACKENDS_GRAPHICS_OPENGL_PIPELINES_LIBRETRO_H 25 #include "graphics/opengl/system_headers.h" 28 #include "backends/graphics/opengl/pipelines/shader.h" 30 #include "common/array.h" 31 #include "common/fs.h" 45 class LibRetroTextureTarget;
55 void setColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
override;
56 void setProjectionMatrix(
const Math::Matrix4 &projectionMatrix)
override;
62 void enableLinearFiltering(
bool enabled) { _linearFiltering = enabled; }
63 void setRotation(
Common::RotationMode rotation) {
if (_rotation != rotation) { _rotation = rotation; setPipelineState(); } }
65 void setDisplaySizes(uint inputWidth, uint inputHeight,
const Common::Rect &outputRect);
71 bool isAnimated()
const {
return _isAnimated; }
73 static bool isSupportedByContext() {
74 return OpenGLContext.shadersSupported
75 && OpenGLContext.multitextureSupported
76 && OpenGLContext.framebufferObjectSupported;
79 void activateInternal()
override;
80 void deactivateInternal()
override;
81 void drawTextureInternal(
const Texture &texture,
const GLfloat *coordinates,
const GLfloat *texcoords)
override;
86 void setPipelineState();
88 void setupPassUniforms(
const uint
id);
104 bool _linearFiltering;
114 struct LibRetroTexture {
115 LibRetroTexture() : textureData(
nullptr), glTexture(
nullptr) {}
125 TextureArray _textures;
129 : shaderPass(
nullptr), shader(
nullptr), target(
nullptr), texCoords(), texSamplers(),
130 inputTexture(
nullptr), vertexCoord(), hasFrameCount(
false), prevCount(0) {}
132 : shaderPass(sP), shader(s), target(t), texCoords(), texSamplers(),
133 inputTexture(
nullptr), vertexCoord(), hasFrameCount(
false), prevCount(0) {}
180 TexCoordAttributeArray texCoords;
232 TextureSamplerArray texSamplers;
240 void buildTexSamplers(
const uint
id,
const TextureArray &textures,
const Common::StringArray &aliases);
252 GLfloat vertexCoord[2*4];
269 void renderPass(
const Pass &pass);
270 void renderPassSetupCoordinates(
const Pass &pass);
271 void renderPassSetupTextures(
const Pass &pass);
275 #endif // !USE_FORCED_GLES Type
Definition: libretro.h:200
Definition: libretro.h:194
Definition: libretro.h:50
Definition: libretro.h:142
Type
Definition: libretro.h:148
Common::String name
Definition: libretro.h:146
Definition: libretro.h:209
Type type
Definition: libretro.h:168
Definition: libretro.h:204
Definition: archive.h:141
Definition: framebuffer.h:203
Definition: libretro.h:152
Definition: archive.h:330
uint index
Definition: libretro.h:225
Definition: libretro.h:157
Type type
Definition: libretro.h:220
Definition: formatinfo.h:28
Definition: renderbuffer.h:27
uint index
Definition: libretro.h:173
uint unit
Definition: libretro.h:198
RotationMode
Definition: rotationmode.h:44
Definition: pipeline.h:40