1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00

Adde some missing JUCE_API annotations

This commit is contained in:
jules 2017-03-21 16:07:31 +00:00
parent e4857ceaae
commit c236e75cf5
5 changed files with 21 additions and 13 deletions

View file

@ -49,7 +49,7 @@ public:
For some quick ways of creating callback objects, see the ModalCallbackFunction class.
@see ModalCallbackFunction
*/
class Callback
class JUCE_API Callback
{
public:
/** */

View file

@ -22,8 +22,7 @@
==============================================================================
*/
OpenGLShaderProgram::OpenGLShaderProgram (const OpenGLContext& c) noexcept
: context (c), programID (0)
OpenGLShaderProgram::OpenGLShaderProgram (const OpenGLContext& c) noexcept : context (c)
{
}

View file

@ -31,7 +31,10 @@
class JUCE_API OpenGLShaderProgram
{
public:
/** Creates a shader for use in a particular GL context. */
OpenGLShaderProgram (const OpenGLContext&) noexcept;
/** Destructor. */
~OpenGLShaderProgram() noexcept;
/** Returns the version of GLSL that the current context supports.
@ -124,7 +127,7 @@ public:
Be careful not to call the set() functions unless the appropriate program
is loaded into the current context.
*/
struct Uniform
struct JUCE_API Uniform
{
/** Initialises a uniform.
The program must have been successfully linked when this
@ -169,13 +172,13 @@ public:
After a program has been linked, you can create Attribute objects to let you
set the attributes that your vertex shaders use.
*/
struct Attribute
struct JUCE_API Attribute
{
/** Initialises an attribute.
The program must have been successfully linked when this
constructor is called.
*/
Attribute (const OpenGLShaderProgram& program, const char* attributeName);
Attribute (const OpenGLShaderProgram&, const char* attributeName);
/** The attribute's ID number.
If the uniform couldn't be found, this value will be < 0.
@ -188,7 +191,7 @@ public:
private:
const OpenGLContext& context;
mutable GLuint programID;
mutable GLuint programID = 0;
String errorLog;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenGLShaderProgram)

View file

@ -22,7 +22,7 @@
==============================================================================
*/
OpenGLAppComponent::OpenGLAppComponent() : frameCounter (0)
OpenGLAppComponent::OpenGLAppComponent()
{
setOpaque (true);
openGLContext.setRenderer (this);

View file

@ -33,11 +33,13 @@
paint() and mouse-handling. The base class provides some simple abstractions
to take care of continuously repainting itself.
*/
class OpenGLAppComponent : public Component,
private OpenGLRenderer
class JUCE_API OpenGLAppComponent : public Component,
private OpenGLRenderer
{
public:
OpenGLAppComponent();
/** Destructor. */
~OpenGLAppComponent();
/** Returns the number of times that the render method has been called since
@ -45,6 +47,9 @@ public:
*/
int getFrameCounter() const noexcept { return frameCounter; }
/** This must be called from your subclass's destructor, to shut down
the GL system and stop it calling render() before your class is destroyed.
*/
void shutdownOpenGL();
/** Implement this method to set up any GL objects that you need for rendering.
@ -57,16 +62,17 @@ public:
*/
virtual void shutdown() = 0;
/**
/** Called to render your openGL.
@see OpenGLRenderer::render()
*/
virtual void render() = 0;
/** The GL context */
OpenGLContext openGLContext;
private:
//==============================================================================
int frameCounter;
int frameCounter = 0;
void newOpenGLContextCreated() override;
void renderOpenGL() override;