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>2020-09-12 20:48:52 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-12 20:48:52 +0300
commit2e4569abbc6aa19d166ed083c04e046fdc19fce5 (patch)
treea924894164afd7337e3d272e0e8ef4cedbf49250 /source/blender/gpu/intern
parentfe5efccd8fb6ce2a7e5e858e3f8becf5f98bb087 (diff)
Fix remaining GL calls/type preventing from building due to recent cleanup
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_immediate.cc2
-rw-r--r--source/blender/gpu/intern/gpu_texture.cc6
-rw-r--r--source/blender/gpu/intern/gpu_vertex_buffer.cc7
-rw-r--r--source/blender/gpu/intern/gpu_vertex_buffer_private.hh2
-rw-r--r--source/blender/gpu/intern/gpu_vertex_format.cc2
5 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate.cc b/source/blender/gpu/intern/gpu_immediate.cc
index 9c3a88e30f0..8d781978857 100644
--- a/source/blender/gpu/intern/gpu_immediate.cc
+++ b/source/blender/gpu/intern/gpu_immediate.cc
@@ -416,7 +416,7 @@ static void immEndVertex(void) /* and move on to the next vertex */
printf("copying %s from vertex %u to %u\n", a->name, imm->vertex_idx - 1, imm->vertex_idx);
#endif
- GLubyte *data = imm->vertex_data + a->offset;
+ uchar *data = imm->vertex_data + a->offset;
memcpy(data, data - imm->vertex_format.stride, a->sz);
/* TODO: consolidate copy of adjacent attributes */
}
diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc
index 09dbf04210a..eb6881164b2 100644
--- a/source/blender/gpu/intern/gpu_texture.cc
+++ b/source/blender/gpu/intern/gpu_texture.cc
@@ -513,12 +513,6 @@ void GPU_texture_ref(GPUTexture *tex)
reinterpret_cast<Texture *>(tex)->refcount++;
}
-/* TODO(fclem) Remove! This is broken as it is! */
-int GPU_texture_target(const GPUTexture *UNUSED(tex))
-{
- return GL_TEXTURE_2D;
-}
-
int GPU_texture_width(const GPUTexture *tex)
{
return reinterpret_cast<const Texture *>(tex)->width_get();
diff --git a/source/blender/gpu/intern/gpu_vertex_buffer.cc b/source/blender/gpu/intern/gpu_vertex_buffer.cc
index 4cc2af889e6..ea149aaa254 100644
--- a/source/blender/gpu/intern/gpu_vertex_buffer.cc
+++ b/source/blender/gpu/intern/gpu_vertex_buffer.cc
@@ -324,4 +324,11 @@ void GPU_vertbuf_use(GPUVertBuf *verts)
unwrap(verts)->upload();
}
+/* XXX this is just a wrapper for the use of the Hair refine workaround.
+ * To be used with GPU_vertbuf_use(). */
+void GPU_vertbuf_update_sub(GPUVertBuf *verts, uint start, uint len, void *data)
+{
+ unwrap(verts)->update_sub(start, len, data);
+}
+
/** \} */ \ No newline at end of file
diff --git a/source/blender/gpu/intern/gpu_vertex_buffer_private.hh b/source/blender/gpu/intern/gpu_vertex_buffer_private.hh
index f1de0a2ac96..3cce7e79857 100644
--- a/source/blender/gpu/intern/gpu_vertex_buffer_private.hh
+++ b/source/blender/gpu/intern/gpu_vertex_buffer_private.hh
@@ -95,6 +95,8 @@ class VertBuf {
}
}
+ virtual void update_sub(uint start, uint len, void *data) = 0;
+
protected:
virtual void acquire_data(void) = 0;
virtual void resize_data(void) = 0;
diff --git a/source/blender/gpu/intern/gpu_vertex_format.cc b/source/blender/gpu/intern/gpu_vertex_format.cc
index ac8439167e3..3b0aa055588 100644
--- a/source/blender/gpu/intern/gpu_vertex_format.cc
+++ b/source/blender/gpu/intern/gpu_vertex_format.cc
@@ -70,7 +70,7 @@ static uint comp_sz(GPUVertCompType type)
#if TRUST_NO_ONE
assert(type <= GPU_COMP_F32); /* other types have irregular sizes (not bytes) */
#endif
- const GLubyte sizes[] = {1, 1, 2, 2, 4, 4, 4};
+ const uint sizes[] = {1, 1, 2, 2, 4, 4, 4};
return sizes[type];
}