| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #ifndef RENDERTARGET_H_
- #define RENDERTARGET_H_
- #include "Base.h"
- #include "Texture.h"
- namespace gameplay
- {
- class RenderTarget : public Ref
- {
- public:
-
- /**
- * Create a RenderTarget and add it to the list of available RenderTargets.
- *
- * The created RenderTarget contains a 32-bit texture with a single/base mipmap level only.
- *
- * @param id The ID of the new RenderTarget.
- * @param width The width of the new RenderTarget.
- * @param height The height of the new RenderTarget.
- *
- * @return A newly created RenderTarget.
- */
- static RenderTarget* create(const char* id, unsigned int width, unsigned int height);
- /**
- * Get a named RenderTarget from its ID.
- *
- * @param id The ID of the RenderTarget to search for.
- *
- * @return The RenderTarget with the specified ID, or NULL if one was not found.
- */
- static RenderTarget* getRenderTarget(const char* id);
- /**
- * Get the ID of this RenderTarget.
- *
- * @return The ID of this RenderTarget.
- */
- const char* getID() const;
- /**
- * Get the backing texture of this RenderTarget.
- *
- * @return The backing texture of this RenderTarget.
- */
- Texture* getTexture() const;
-
- private:
- /**
- * Constructor.
- */
- RenderTarget(const char* id);
- /**
- * Destructor.
- */
- ~RenderTarget();
- std::string _id;
- Texture* _texture;
- };
- }
- #endif
|