Beatmup
basic_types.h
Go to the documentation of this file.
1 /*
2  Beatmup image and signal processing library
3  Copyright (C) 2019, lnstadrum
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #pragma once
20 #include <cstdint>
21 
22 namespace Beatmup {
23 
24 #ifdef BEATMUP_PLATFORM_64BIT_
25  const double pi = 3.141592653589793238462643383279502884;
26  typedef uint64_t msize; //!< memory size
27  typedef uint64_t pixint_platform;
28 #else
29  const float pi = 3.141592653589793238462643383279502884f;
30  typedef uint32_t msize; //!< memory size
31  typedef uint32_t pixint_platform;
32 #endif
33 
34  typedef uint8_t pixbyte;
35  typedef float pixfloat;
36 
37  typedef int dtime; //!< discrete time
38 
39  typedef struct {
40  uint8_t r, g, b;
41  } color3i;
42 
43  typedef struct {
44  uint8_t r, g, b, a;
45  } color4i;
46 
47  typedef struct {
48  float r, g, b;
49  } color3f;
50 
51  typedef struct {
52  float r, g, b, a;
53  } color4f;
54 
55  enum ProcessingTarget {CPU = 0, GPU}; //!< Where to process the stuff
56 
57  /**
58  Low-level API providing access to GPU. Used internally.
59  */
60  namespace GL {
61  typedef unsigned int handle_t; //!< A reference to a GPU resource
62  }
63 
64  /**
65  %Beatmup object base class
66  */
67  class Object {
68  public:
69  virtual ~Object() {}
70  };
71 }
72 
73 
74 /**
75  Beatmup internal declarations.
76  None of its contents is to be included in the application code.
77 */
78 namespace Internal {}
79 
80 
81 /**
82  Operations kernels.
83  Used internally by Beatmup.
84 */
85 namespace Kernels {}
Beatmup object base class
Definition: basic_types.h:67
virtual ~Object()
Definition: basic_types.h:69
unsigned int handle_t
A reference to a GPU resource.
Definition: basic_types.h:61
uint32_t msize
memory size
Definition: basic_types.h:30
uint8_t pixbyte
Definition: basic_types.h:34
const float pi
Definition: basic_types.h:29
uint32_t pixint_platform
Definition: basic_types.h:31
float pixfloat
Definition: basic_types.h:35
int dtime
discrete time
Definition: basic_types.h:37
ProcessingTarget
Definition: basic_types.h:55
Beatmup internal declarations.
Definition: basic_types.h:78
Operations kernels.
Definition: basic_types.h:85
jobject jlong jint jint jint jint g
jobject jlong jint jint jint jint jint b
jobject jlong jint jint jint r