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; }
64 void setDisplaySizes(uint inputWidth, uint inputHeight,
const Common::Rect &outputRect);
70 bool isAnimated()
const {
return _isAnimated; }
72 static bool isSupportedByContext() {
73 return OpenGLContext.shadersSupported
74 && OpenGLContext.multitextureSupported
75 && OpenGLContext.framebufferObjectSupported;
78 void activateInternal()
override;
79 void deactivateInternal()
override;
80 void drawTextureInternal(
const GLTexture &texture,
const GLfloat *coordinates,
const GLfloat *texcoords)
override;
85 void setPipelineState();
87 void setupPassUniforms(
const uint
id);
103 bool _linearFiltering;
113 Texture() : textureData(
nullptr), glTexture(
nullptr) {}
123 TextureArray _textures;
127 : shaderPass(
nullptr), shader(
nullptr), target(
nullptr), texCoords(), texSamplers(),
128 inputTexture(
nullptr), vertexCoord(), hasFrameCount(
false), prevCount(0) {}
130 : shaderPass(sP), shader(s), target(t), texCoords(), texSamplers(),
131 inputTexture(
nullptr), vertexCoord(), hasFrameCount(
false), prevCount(0) {}
178 TexCoordAttributeArray texCoords;
230 TextureSamplerArray texSamplers;
238 void buildTexSamplers(
const uint
id,
const TextureArray &textures,
const Common::StringArray &aliases);
250 GLfloat vertexCoord[2*4];
267 void renderPass(
const Pass &pass);
268 void renderPassSetupCoordinates(
const Pass &pass);
269 void renderPassSetupTextures(
const Pass &pass);
273 #endif // !USE_FORCED_GLES Type
Definition: libretro.h:198
Definition: libretro.h:192
Definition: libretro.h:50
Definition: libretro.h:140
Type
Definition: libretro.h:146
Common::String name
Definition: libretro.h:144
Definition: libretro.h:207
Type type
Definition: libretro.h:166
Definition: libretro.h:202
Definition: archive.h:141
Definition: framebuffer.h:201
Definition: libretro.h:150
Definition: archive.h:312
uint index
Definition: libretro.h:223
Definition: libretro.h:155
Type type
Definition: libretro.h:218
Definition: formatinfo.h:28
Definition: renderbuffer.h:27
uint index
Definition: libretro.h:171
uint unit
Definition: libretro.h:196
Definition: pipeline.h:42