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:
authorMike Erwin <significant.bit@gmail.com>2016-08-11 01:01:04 +0300
committerMike Erwin <significant.bit@gmail.com>2016-08-11 01:01:04 +0300
commit4aadf7331e108e7257af07d01384ce67de5e0391 (patch)
tree8d43e958cfa3c9af71e9fa03aa34b35738c217d1 /source/blender/gpu/GPU_immediate.h
parentf537d96286654ba370ffdbfd7701a409d9e0c493 (diff)
Gawain: tweak immediate mode API
Should be simpler to use now. Made vertex format structure private. New immVertexFormat() function clears and returns the format. Devs can start with add_attrib(format...) and not have to clear it first. immBindProgram automatically packs the vertex format if needed. Updated 3D cursor drawing to use new API.
Diffstat (limited to 'source/blender/gpu/GPU_immediate.h')
-rw-r--r--source/blender/gpu/GPU_immediate.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_immediate.h b/source/blender/gpu/GPU_immediate.h
index 1373faa236b..0ee97349970 100644
--- a/source/blender/gpu/GPU_immediate.h
+++ b/source/blender/gpu/GPU_immediate.h
@@ -53,11 +53,13 @@ void pack(VertexFormat*);
// unsigned attrib_idx(const VertexFormat*, const char* name);
void bind_attrib_locations(const VertexFormat*, GLuint program);
-extern PER_THREAD VertexFormat immVertexFormat; // so we don't have to copy or pass around
+// --- immediate mode work-alike --------------------------------
void immInit(void);
void immDestroy(void);
+VertexFormat* immVertexFormat(void); // returns a cleared vertex format, ready for add_attrib
+
void immBindProgram(GLuint program);
void immUnbindProgram(void);