JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::OpenGLImageType Class Reference

A type of ImagePixelData that stores its image data in an OpenGL framebuffer, allowing a JUCE Image object to wrap a framebuffer. More...

#include <juce_OpenGLImage.h>

Inheritance diagram for juce::OpenGLImageType:
Collaboration diagram for juce::OpenGLImageType:

Public Member Functions

 OpenGLImageType ()
 
 ~OpenGLImageType () override
 
virtual Image convert (const Image &source) const
 Returns an image which is a copy of the source image, but using this type of storage mechanism. More...
 
ImagePixelData::Ptr create (Image::PixelFormat, int width, int height, bool shouldClearImage) const override
 Creates a new image of this type, and the specified parameters. More...
 
int getTypeID () const override
 Must return a unique number to identify this type. More...
 

Static Public Member Functions

static OpenGLFrameBuffergetFrameBufferFrom (const Image &)
 

Detailed Description

A type of ImagePixelData that stores its image data in an OpenGL framebuffer, allowing a JUCE Image object to wrap a framebuffer.

By creating an Image from an instance of an OpenGLFrameBufferImage, you can then use a Graphics object to draw into the framebuffer using normal JUCE 2D operations.

See also
Image, ImageType, ImagePixelData, OpenGLFrameBuffer

@tags{OpenGL}

Constructor & Destructor Documentation

◆ OpenGLImageType()

juce::OpenGLImageType::OpenGLImageType ( )

◆ ~OpenGLImageType()

juce::OpenGLImageType::~OpenGLImageType ( )
override

Member Function Documentation

◆ convert()

virtual Image juce::ImageType::convert ( const Image source) const
virtualinherited

Returns an image which is a copy of the source image, but using this type of storage mechanism.

For example, to make sure that an image is stored in-memory, you could use:

myImage = SoftwareImageType().convert (myImage);

◆ create()

ImagePixelData::Ptr juce::OpenGLImageType::create ( Image::PixelFormat  ,
int  width,
int  height,
bool  shouldClearImage 
) const
overridevirtual

Creates a new image of this type, and the specified parameters.

Implements juce::ImageType.

◆ getFrameBufferFrom()

static OpenGLFrameBuffer* juce::OpenGLImageType::getFrameBufferFrom ( const Image )
static

◆ getTypeID()

int juce::OpenGLImageType::getTypeID ( ) const
overridevirtual

Must return a unique number to identify this type.

Implements juce::ImageType.


The documentation for this class was generated from the following file: