[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58472] branches/soc-2013-viewport_fx/ source/blender: compiles with no syntax errors with ES headers, but there are now linker errors
Jason Wilkins
Jason.A.Wilkins at gmail.com
Sun Jul 21 13:49:36 CEST 2013
Revision: 58472
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58472
Author: jwilkins
Date: 2013-07-21 11:49:35 +0000 (Sun, 21 Jul 2013)
Log Message:
-----------
compiles with no syntax errors with ES headers, but there are now linker errors
Modified Paths:
--------------
branches/soc-2013-viewport_fx/source/blender/editors/armature/armature_select.c
branches/soc-2013-viewport_fx/source/blender/editors/armature/editarmature_sketch.c
branches/soc-2013-viewport_fx/source/blender/editors/sculpt_paint/paint_cursor.c
branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawarmature.c
branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawobject.c
branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/view3d_draw.c
branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/view3d_view.c
branches/soc-2013-viewport_fx/source/blender/editors/transform/transform.c
branches/soc-2013-viewport_fx/source/blender/editors/transform/transform_manipulator.c
branches/soc-2013-viewport_fx/source/blender/gpu/CMakeLists.txt
branches/soc-2013-viewport_fx/source/blender/gpu/GPU_compatibility.h
branches/soc-2013-viewport_fx/source/blender/gpu/GPU_extensions.h
branches/soc-2013-viewport_fx/source/blender/gpu/GPU_material.h
branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_extensions.c
branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_lighting.c
branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_material.c
Added Paths:
-----------
branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_select.c
branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_select.h
Modified: branches/soc-2013-viewport_fx/source/blender/editors/armature/armature_select.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/editors/armature/armature_select.c 2013-07-21 10:30:22 UTC (rev 58471)
+++ branches/soc-2013-viewport_fx/source/blender/editors/armature/armature_select.c 2013-07-21 11:49:35 UTC (rev 58472)
@@ -153,7 +153,7 @@
rect.xmin = rect.xmax = x;
rect.ymin = rect.ymax = y;
- glInitNames();
+ gpuSelectClear();
hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect);
if (hits > 0)
@@ -270,7 +270,7 @@
int i, mindep = 4;
short hits;
- glInitNames();
+ gpuSelectClear();
/* find the bone after the current active bone, so as to bump up its chances in selection.
* this way overlapping bones will cycle selection state as with objects. */
Modified: branches/soc-2013-viewport_fx/source/blender/editors/armature/editarmature_sketch.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/editors/armature/editarmature_sketch.c 2013-07-21 10:30:22 UTC (rev 58471)
+++ branches/soc-2013-viewport_fx/source/blender/editors/armature/editarmature_sketch.c 2013-07-21 11:49:35 UTC (rev 58472)
@@ -497,7 +497,7 @@
struct GPUprim3 prim = GPU_PRIM_LOFI_SOLID;
if (id != -1) {
- glLoadName(id);
+ gpuSelectName(id);
for (i = 0; i < stk->nb_points; i++) {
gpuPushMatrix();
@@ -2032,7 +2032,7 @@
sk_drawStroke(stk, id, NULL, -1, -1);
}
- glLoadName(-1);
+ gpuSelectName(-1);
}
else {
float selected_rgb[3] = {1, 0, 0};
Modified: branches/soc-2013-viewport_fx/source/blender/editors/sculpt_paint/paint_cursor.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/editors/sculpt_paint/paint_cursor.c 2013-07-21 10:30:22 UTC (rev 58471)
+++ branches/soc-2013-viewport_fx/source/blender/editors/sculpt_paint/paint_cursor.c 2013-07-21 11:49:35 UTC (rev 58472)
@@ -727,8 +727,11 @@
/* color means that primary brush texture is colured and secondary is used for alpha/mask control */
bool col = ELEM3(mode, PAINT_TEXTURE_PROJECTIVE, PAINT_TEXTURE_2D, PAINT_VERTEX) ? true: false;
OverlayControlFlags flags = BKE_paint_get_overlay_flags();
+
+#if defined(WITH_GL_PROFILE_COMPAT)
/* save lots of GL state
* TODO: check on whether all of these are needed? */
+ // XXX jwilkins: this problem here is that there is not a policy that guarantees what state OpenGL will be in when we get here and what we can mess with and what needs to be restored after changes.
glPushAttrib(GL_COLOR_BUFFER_BIT |
GL_CURRENT_BIT |
GL_DEPTH_BUFFER_BIT |
@@ -739,8 +742,8 @@
GL_TRANSFORM_BIT |
GL_VIEWPORT_BIT |
GL_TEXTURE_BIT);
+#endif
-
/* coloured overlay should be drawn separately */
if (col) {
if (!(flags & PAINT_OVERLAY_OVERRIDE_PRIMARY))
@@ -757,7 +760,9 @@
paint_draw_cursor_overlay(ups, brush, vc, x, y, zoom);
}
+#if defined(WITH_GL_PROFILE_COMPAT)
glPopAttrib();
+#endif
}
/* Special actions taken when paint cursor goes over mesh */
Modified: branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawarmature.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawarmature.c 2013-07-21 10:30:22 UTC (rev 58471)
+++ branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawarmature.c 2013-07-21 11:49:35 UTC (rev 58472)
@@ -488,7 +488,7 @@
/* Draw root point if we are not connected */
if ((boneflag & BONE_CONNECTED) == 0) {
if (id != -1)
- glLoadName(id | BONESEL_ROOT);
+ gpuSelectName(id | BONESEL_ROOT);
if (dt <= OB_WIRE) {
if (armflag & ARM_EDITMODE) {
@@ -511,7 +511,7 @@
/* Draw tip point */
if (id != -1)
- glLoadName(id | BONESEL_TIP);
+ gpuSelectName(id | BONESEL_TIP);
if (dt <= OB_WIRE) {
if (armflag & ARM_EDITMODE) {
@@ -726,7 +726,7 @@
/* Draw root point if we are not connected */
if ((boneflag & BONE_CONNECTED) == 0) {
if (id != -1)
- glLoadName(id | BONESEL_ROOT);
+ gpuSelectName(id | BONESEL_ROOT);
gpuDrawFastBall(GL_LINE_LOOP, headvec, head, imat);
}
@@ -738,7 +738,7 @@
}
if (id != -1)
- glLoadName(id | BONESEL_TIP);
+ gpuSelectName(id | BONESEL_TIP);
gpuDrawFastBall(GL_LINE_LOOP, tailvec, tail, imat);
@@ -769,7 +769,7 @@
cross_v3_v3v3(norvect, vec, imat[2]);
if (id != -1)
- glLoadName(id | BONESEL_BONE);
+ gpuSelectName(id | BONESEL_BONE);
gpuBegin(GL_LINES);
@@ -856,7 +856,7 @@
/* Draw root point if we are not connected */
if ((boneflag & BONE_CONNECTED) == 0) {
if (id != -1) {
- glLoadName(id | BONESEL_ROOT);
+ gpuSelectName(id | BONESEL_ROOT);
}
gpuDrawSphere(&prim, head);
@@ -874,7 +874,7 @@
}
if (id != -1) {
- glLoadName(id | BONESEL_TIP);
+ gpuSelectName(id | BONESEL_TIP);
}
gpuTranslate(0.0f, 0.0f, length);
@@ -903,7 +903,7 @@
if (length > (head + tail)) {
if (id != -1) {
- glLoadName(id | BONESEL_BONE);
+ gpuSelectName(id | BONESEL_BONE);
}
glEnable(GL_POLYGON_OFFSET_FILL);
@@ -1000,7 +1000,7 @@
/* Draw root point if we are not connected */
if ((boneflag & BONE_CONNECTED) == 0) {
if (G.f & G_PICKSEL) { /* no bitmap in selection mode, crashes 3d cards... */
- glLoadName(id | BONESEL_ROOT);
+ gpuSelectName(id | BONESEL_ROOT);
gpuBegin(GL_POINTS);
gpuVertex3f(0.0f, 0.0f, 0.0f);
gpuEnd();
@@ -1013,7 +1013,7 @@
}
if (id != -1)
- glLoadName((GLuint) id | BONESEL_BONE);
+ gpuSelectName((GLuint) id | BONESEL_BONE);
gpuBegin(GL_LINES);
gpuVertex3f(0.0f, 0.0f, 0.0f);
@@ -1023,7 +1023,7 @@
/* tip */
if (G.f & G_PICKSEL) {
/* no bitmap in selection mode, crashes 3d cards... */
- glLoadName(id | BONESEL_TIP);
+ gpuSelectName(id | BONESEL_TIP);
gpuBegin(GL_POINTS);
gpuVertex3f(0.0f, 1.0f, 0.0f);
gpuEnd();
@@ -1036,7 +1036,7 @@
/* further we send no names */
if (id != -1)
- glLoadName(id & 0xFFFF); /* object tag, for bordersel optim */
+ gpuSelectName(id & 0xFFFF); /* object tag, for bordersel optim */
if (armflag & ARM_POSEMODE)
set_pchan_gpuCurrentColor(PCHAN_COLOR_LINEBONE, boneflag, constflag);
@@ -1178,7 +1178,7 @@
}
if (id != -1) {
- glLoadName((GLuint) id | BONESEL_BONE);
+ gpuSelectName((GLuint) id | BONESEL_BONE);
}
/* set up solid drawing */
@@ -1280,13 +1280,13 @@
/* this chunk not in object mode */
if (armflag & (ARM_EDITMODE | ARM_POSEMODE)) {
if (id != -1)
- glLoadName((GLuint) id | BONESEL_BONE);
+ gpuSelectName((GLuint) id | BONESEL_BONE);
draw_wire_bone_segments(pchan, bbones, length, segments);
/* further we send no names */
if (id != -1)
- glLoadName(id & 0xFFFF); /* object tag, for bordersel optim */
+ gpuSelectName(id & 0xFFFF); /* object tag, for bordersel optim */
}
/* colors for modes */
@@ -1329,7 +1329,7 @@
/* now draw the bone itself */
if (id != -1) {
- glLoadName((GLuint) id | BONESEL_BONE);
+ gpuSelectName((GLuint) id | BONESEL_BONE);
}
/* wire? */
@@ -1385,7 +1385,7 @@
}
if (id != -1) {
- glLoadName((GLuint) id | BONESEL_BONE);
+ gpuSelectName((GLuint) id | BONESEL_BONE);
}
draw_object_instance(scene, v3d, rv3d, ob, dt, armflag & ARM_POSEMODE);
@@ -1808,12 +1808,12 @@
index += 0x10000; /* pose bones count in higher 2 bytes only */
}
- /* very very confusing... but in object mode, solid draw, we cannot do glLoadName yet,
+ /* very very confusing... but in object mode, solid draw, we cannot do gpuSelectName yet,
* stick bones and/or wire custom-shapes are drawn in next loop
*/
if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) == 0 && (draw_wire == false)) {
/* object tag, for bordersel optim */
- glLoadName(index & 0xFFFF);
+ gpuSelectName(index & 0xFFFF);
index = -1;
}
}
@@ -1879,7 +1879,7 @@
/* stick or wire bones have not been drawn yet so don't clear object selection in this case */
if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) == 0 && draw_wire) {
/* object tag, for bordersel optim */
- glLoadName(index & 0xFFFF);
+ gpuSelectName(index & 0xFFFF);
index = -1;
}
}
@@ -1917,7 +1917,7 @@
*/
if ((do_dashed & 2) && ((bone->flag & BONE_CONNECTED) == 0)) {
if (arm->flag & ARM_POSEMODE) {
- glLoadName(index & 0xFFFF); /* object tag, for bordersel optim */
+ gpuSelectName(index & 0xFFFF); /* object tag, for bordersel optim */
UI_ThemeColor(TH_WIRE);
}
setlinestyle(3);
@@ -1939,7 +1939,7 @@
if (constflag & PCHAN_HAS_TARGET) gpuCurrentColor3ub(200, 120, 0);
else gpuCurrentColor3ub(200, 200, 50); /* add theme! */
- glLoadName(index & 0xFFFF);
+ gpuSelectName(index & 0xFFFF);
pchan_draw_IK_root_lines(pchan, !(do_dashed & 2));
}
}
@@ -1947,7 +1947,7 @@
if (bone->flag & BONE_SELECTED) {
gpuCurrentColor3ub(150, 200, 50); /* add theme! */
- glLoadName(index & 0xFFFF);
+ gpuSelectName(index & 0xFFFF);
pchan_draw_IK_root_lines(pchan, !(do_dashed & 2));
}
}
@@ -2176,7 +2176,7 @@
/* if wire over solid, set offset */
index = -1;
- glLoadName(-1);
+ gpuSelectName(-1);
if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) {
if (G.f & G_PICKSEL)
index = 0;
@@ -2225,7 +2225,7 @@
/* offset to parent */
if (eBone->parent) {
UI_ThemeColor(TH_WIRE_EDIT);
- glLoadName(-1); /* -1 here is OK! */
+ gpuSelectName(-1); /* -1 here is OK! */
setlinestyle(3);
gpuBegin(GL_LINES);
@@ -2242,7 +2242,7 @@
/* restore */
if (index != -1) {
- glLoadName(-1);
+ gpuSelectName(-1);
}
if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) {
Modified: branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawobject.c 2013-07-21 10:30:22 UTC (rev 58471)
+++ branches/soc-2013-viewport_fx/source/blender/editors/space_view3d/drawobject.c 2013-07-21 11:49:35 UTC (rev 58472)
@@ -1374,7 +1374,7 @@
continue;
if (dflag & DRAW_PICKING)
- glLoadName(base->selcol + (tracknr << 16));
+ gpuSelectName(base->selcol + (tracknr << 16));
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list