Blender  V2.93
gpu_immediate_private.hh
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2016 by Mike Erwin.
17  * All rights reserved.
18  */
19 
26 #pragma once
27 
28 #include "GPU_batch.h"
29 #include "GPU_primitive.h"
30 #include "GPU_shader.h"
31 #include "GPU_vertex_format.h"
32 
33 namespace blender::gpu {
34 
35 class Immediate {
36  public:
47 
53  bool strict_vertex_len = true;
54 
57 
65  float uniform_color[4];
66 
67  public:
68  Immediate(){};
69  virtual ~Immediate(){};
70 
71  virtual uchar *begin(void) = 0;
72  virtual void end(void) = 0;
73 };
74 
75 } // namespace blender::gpu
76 
77 void immActivate(void);
78 void immDeactivate(void);
unsigned char uchar
Definition: BLI_sys_types.h:86
unsigned int uint
Definition: BLI_sys_types.h:83
GPUBatch
Definition: GPU_batch.h:93
GPUPrimType
Definition: GPU_primitive.h:34
@ GPU_PRIM_NONE
Definition: GPU_primitive.h:47
struct GPUShader GPUShader
Definition: GPU_shader.h:33
eGPUBuiltinShader
Definition: GPU_shader.h:159
@ GPU_SHADER_TEXT
Definition: GPU_shader.h:161
eGPUBuiltinShader builtin_shader_bound
virtual void end(void)=0
virtual uchar * begin(void)=0
eGPUBuiltinShader prev_builtin_shader
void immActivate(void)
void immDeactivate(void)
unsigned short uint16_t
Definition: stdint.h:82