NAP
image.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 #include <texture.h>
8 #include <bitmap.h>
9 
10 namespace nap
11 {
18  class NAPAPI Image : public Texture2D
19  {
20  RTTI_ENABLE(Texture2D)
21 
22  public:
23  using Texture2D::update;
25 
29  Image(Core& core);
30 
34  Bitmap& getBitmap() { return mBitmap; }
35 
39  void update();
40 
45  void asyncGetData();
46 
47  private:
48  Bitmap mBitmap;
49  };
50 }
51 
nap::Texture2D::asyncGetData
void asyncGetData(Bitmap &bitmap)
nap::Image::getBitmap
Bitmap & getBitmap()
Definition: image.h:34
nap::Texture2D::update
void update(const void *data, int width, int height, int pitch, ESurfaceChannels channels)
nap::Texture2D
Definition: texture.h:128
nap::Image
Definition: image.h:18
nap::Core
Definition: core.h:82
nap::Bitmap
Definition: bitmap.h:31
nap
Definition: templateapp.h:17