YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
TextureLogo.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef YARP_OVRHEADSET_TEXTURELOGO_H
20#define YARP_OVRHEADSET_TEXTURELOGO_H
21
22#include <GL/glew.h>
23#include <OVR_Math.h>
24
25
27{
28public:
29 struct Image {
30 unsigned int width;
31 unsigned int height;
32 unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */
33 const char *pixel_data;
34 };
35
36 TextureLogo(ovrSession session);
38
39 void update();
40
41 ovrSession session;
42 ovrTextureSwapChain textureSwapChain;
43
44 unsigned int width;
45 unsigned int height;
46 unsigned int bytes_per_pixel;
47 unsigned int padding;
48 unsigned int rowSize;
49 unsigned int bufferSize;
50
51 GLuint chainTexId;
52 GLuint texId;
53
54 GLubyte* ptr;
55
56private:
57 void createTexture();
58 void deleteTexture();
59};
60
62{
63public:
64 TextureCrosshairs(ovrSession session);
66
67 void update();
68
69 ovrSession session;
70 ovrTextureSwapChain textureSwapChain;
71
72 unsigned int width;
73 unsigned int height;
74 unsigned int bytes_per_pixel;
75 unsigned int padding;
76 unsigned int rowSize;
77 unsigned int bufferSize;
78
79 GLuint chainTexId;
80 GLuint texId;
81
82 GLubyte* ptr;
83
84private:
85 void createTexture();
86 void deleteTexture();
87};
88
89
90
91#endif // YARP_OVRHEADSET_TEXTURELOGO_H
unsigned int height
Definition TextureLogo.h:73
unsigned int bufferSize
Definition TextureLogo.h:77
unsigned int padding
Definition TextureLogo.h:75
unsigned int width
Definition TextureLogo.h:72
unsigned int bytes_per_pixel
Definition TextureLogo.h:74
ovrSession session
Definition TextureLogo.h:69
unsigned int rowSize
Definition TextureLogo.h:76
ovrTextureSwapChain textureSwapChain
Definition TextureLogo.h:70
unsigned int bufferSize
Definition TextureLogo.h:49
unsigned int height
Definition TextureLogo.h:45
GLuint chainTexId
Definition TextureLogo.h:51
GLubyte * ptr
Definition TextureLogo.h:54
unsigned int width
Definition TextureLogo.h:44
ovrTextureSwapChain textureSwapChain
Definition TextureLogo.h:42
ovrSession session
Definition TextureLogo.h:41
unsigned int rowSize
Definition TextureLogo.h:48
unsigned int bytes_per_pixel
Definition TextureLogo.h:46
void update()
unsigned int padding
Definition TextureLogo.h:47
GLuint texId
Definition TextureLogo.h:52
const char * pixel_data
Definition TextureLogo.h:33
unsigned int bytes_per_pixel
Definition TextureLogo.h:32
unsigned int height
Definition TextureLogo.h:31
unsigned int width
Definition TextureLogo.h:30