Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-03-17 02:00:46 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-03-18 03:56:34 +0300
commitb7355425cdff8f3f23e386f2817d5702b46f7bd6 (patch)
treeada38f9e06fcee6ed96eea88cc84e2fded7b50c2 /source/blender/draw/engines/eevee/eevee_private.h
parent8cad48df2801ff7e1321e477e39df8eff2f13d39 (diff)
Eevee: Initial commit
Basic support for lamps. Only diffuse.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_private.h')
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
new file mode 100644
index 00000000000..4e966757718
--- /dev/null
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2016, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Blender Institute
+ *
+ */
+
+/** \file eevee_private.h
+ * \ingroup DNA
+ */
+
+struct Object;
+
+/* keep it under MAX_PASSES */
+typedef struct EEVEE_PassList {
+ struct DRWPass *pass;
+ struct DRWPass *tonemap;
+} EEVEE_PassList;
+
+/* keep it under MAX_BUFFERS */
+typedef struct EEVEE_FramebufferList {
+ struct GPUFrameBuffer *main; /* HDR */
+} EEVEE_FramebufferList;
+
+/* keep it under MAX_TEXTURES */
+typedef struct EEVEE_TextureList {
+ struct GPUTexture *color; /* R11_G11_B10 */
+} EEVEE_TextureList;
+
+/* keep it under MAX_STORAGE */
+typedef struct EEVEE_StorageList {
+ /* Lights */
+ struct EEVEE_LightsInfo *lights_info; /* Number of lights, ... */
+ struct EEVEE_Light *lights_data; /* Array, Packed lights data info, duplication of what is in the Uniform Buffer in Vram */
+ struct Object **lights_ref; /* List of all lights in the buffer. */
+ struct GPUUniformBuffer *lights_ubo;
+} EEVEE_StorageList;
+
+typedef struct EEVEE_LightsInfo {
+ int light_count;
+} EEVEE_LightsInfo;
+
+typedef struct EEVEE_Data {
+ char engine_name[32];
+ EEVEE_FramebufferList *fbl;
+ EEVEE_TextureList *txl;
+ EEVEE_PassList *psl;
+ EEVEE_StorageList *stl;
+} EEVEE_Data;
+
+/* eevee_lights.c */
+void EEVEE_lights_init(EEVEE_StorageList *stl);
+void EEVEE_lights_cache_init(EEVEE_StorageList *stl);
+void EEVEE_lights_cache_add(EEVEE_StorageList *stl, struct Object *ob);
+void EEVEE_lights_cache_finish(EEVEE_StorageList *stl);
+void EEVEE_lights_update(EEVEE_StorageList *stl);