20 #include "../geometry.h"
21 #include "../gpu/texture_handler.h"
22 #include "../bitmap/abstract_bitmap.h"
23 #include "../bitmap/pixel_arithmetic.h"
25 #include "../gpu/rendering_programs.h"
A very basic class for any image.
Handles a collection of common rendering programs of predefined types and shared operations among the...
const VertexShader & getDefaultVertexShader(const GraphicPipeline *gpu) const
Internal low-level GPU control API.
static Rectangle getTextureCoordinates(const Rectangle &area, const IntPoint &size, const IntPoint &sampling)
Computes floating-point texture coordinates for pixel-accurate sampling: a texture gets sampled exact...
void switchMode(Mode mode)
Switches GPU mode.
const GL::VertexShader & getDefaultVertexShader() const
const char * getGpuRendererString() const
const ImageResolution & getDisplayResolution() const
int getLimit(Limit limit) const
void pullPixels(AbstractBitmap &bitmap)
Transfers bitmap pixels from GPU to CPU.
GraphicPipeline(const GraphicPipeline &)=delete
int getGlslVersion() const
Returns GLSL language version supported by the GPU context being used.
const char * getGpuVendorString() const
void pushPixels(AbstractBitmap &bitmap)
Transfers bitmap pixels from CPU to GPU.
void bindOutput(AbstractBitmap &bitmap)
Binds a bitmap to the pipeline output.
Mode
Graphic pipeline working mode setting some common OpenGL switches.
@ RENDERING
Textures are images to be blended together to produce another image.
@ INFERENCE
Textures are feature maps computed in fragment shaders.
void setTextureCoordinates(const Rectangle &coords)
Specifies texture coordinates for the next rendering pass.
void switchDisplay(void *data)
Limit
GPU characteristics.
@ TEXTURE_IMAGE_UNITS
maximum number of texture units per fragment shader
@ FRAGMENT_UNIFORM_VECTORS
maximum number of 4-dimensional uniform vectors per fragment shader
static const int ATTRIB_TEXTURE_COORD
texture coordinate attribute index in the VBO
GL::RenderingPrograms * renderingPrograms
void flush()
Waits until all operations submitted to GPU are finished.
void bind(GL::TextureHandler &texture, size_t texUnit, const TextureParam param)
void unbindOutput()
Unbinds a bitmap from output and switches to screen.
GL::RenderingPrograms & getRenderingPrograms()
static const int ATTRIB_VERTEX_COORD
vertex coordinate attribute index in the VBO
void setTextureCoordinates(const Rectangle &area, const IntPoint &size, const IntPoint &sampling)
Specifies texture coordinates for the next rendering pass.
bool isGlEsCompliant() const
Returns true if the GPU context is OpenGL ES-compliant.
Represents image size in pixels.
void write(Bitmap &bitmap, Args &&... args)
Calls a Func< WriterClass >::process(access, params) that writes to a bitmap of any kind,...
void read(Bitmap &bitmap, Args &&... args)
Calls a Func< ReaderClass >::process(access, params), where.
unsigned int handle_t
A reference to a GPU resource.
TextureParam
Parameters of binding a texture to a texture unit on GPU.
Beatmup::InternalBitmap * bitmap