Browse Source

Adde some missing JUCE_API annotations

tags/2021-05-28
jules 8 years ago
parent
commit
c236e75cf5
5 changed files with 21 additions and 13 deletions
  1. +1
    -1
      modules/juce_gui_basics/components/juce_ModalComponentManager.h
  2. +1
    -2
      modules/juce_opengl/opengl/juce_OpenGLShaderProgram.cpp
  3. +7
    -4
      modules/juce_opengl/opengl/juce_OpenGLShaderProgram.h
  4. +1
    -1
      modules/juce_opengl/utils/juce_OpenGLAppComponent.cpp
  5. +11
    -5
      modules/juce_opengl/utils/juce_OpenGLAppComponent.h

+ 1
- 1
modules/juce_gui_basics/components/juce_ModalComponentManager.h 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:
/** */


+ 1
- 2
modules/juce_opengl/opengl/juce_OpenGLShaderProgram.cpp View File

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


+ 7
- 4
modules/juce_opengl/opengl/juce_OpenGLShaderProgram.h 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)


+ 1
- 1
modules/juce_opengl/utils/juce_OpenGLAppComponent.cpp View File

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


+ 11
- 5
modules/juce_opengl/utils/juce_OpenGLAppComponent.h 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;


Loading…
Cancel
Save