Dev:2.8/Source/OpenGL/Immediate Mode Replacement Tasks

提供: wiki
< Dev:2.8/Source‎ | OpenGL
2017年3月16日 (木) 00:31時点におけるwiki>Dfelintoによる版 (Note: updated query)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

Immediate Mode Replacement Tasks

What and how to do it

See Immediate Mode Replacement call for help.

What exactly needs to be recoded? Any calls to glBegin, glEnd, glVertex, glColor, glNormal, glTexCoord, glRect.

What does not need to be recoded?

State-setting functions such as glEnable, glDisable, glPointSize, glBlendFunc, glDepthFunc, glDepthMask, glColorMask …

glLineWidth is also legacy, but let’s not worry about that just yet!

Utility functions such as UI_ThemeColor and fdrawline call the old GL functions, so find ways to draw without these. Use the new immUniformThemeColor instead, and draw lines with immVertex immVertex.

Help Wanted - Blender

//source/blender

  • drawobject.c
    • in progress Inprogress25.jpg 25%
        draw_em_fancy (merwin)
    • done
        draw_mesh_object_outline (merwin)
    • done
        draw object centers (merwin)
    • done
        drawaxes & empties (merwin)
    • done
        draw image empties (merwin)
    • done
        draw cameras (merwin)
    • done
        draw lamps (merwin)
    • in progress Inprogress100.jpg 90%
        (fclem) (miss some mesh drawing code, waiting for DM to be ported)
  • drawvolume.c
    • in progress Inprogress50.jpg 50%
        (lukas_t)
  • image_draw.c
    • in progress Inprogress25.jpg 10%
        (merwin)
  • in progress Inprogress25.jpg 10%
      paint_cursor.c (merwin)
  • resources.c
  • view3d_draw_legacy.c
    • in progress Inprogress100.jpg 90%
        (dfelinto) (miss circ, view3d_main_region_clear, bl_debug_draw)

Help Wanted - Game Engine

The UPBGE team plans to merge their work into Blender2.8 so we should leave these files alone.

//source/gameengine

  • ImageRender.cpp
  • KX_Dome.cpp
  • RAS_2DFilterManager.cpp
  • RAS_OpenGLRasterizer.cpp
  • RAS_StorageVA.cpp
  • RAS_StorageVBO.cpp

Help Wanted - Intern

//intern

  • device.cpp
  • device_cuda.cpp
  • opensubdiv_capi.cc
  • solver_control.cpp
  • solver_util.cpp
  • util_view.cpp

To be tackled separately

  • glutil.c
  • drawmesh.c
  • DerivedMesh.c
  • cdderivedmesh.c
  • editderivedmesh.c
  • subsurf_ccg.c
  • gpu_buffers.c
  • done
      gpu_compositing.c (fclem)
  • gpu_draw.c
  • done
      gpu_framebuffer.c (fclem)
  • gpu_basic_shader.c
  • GPU_basic_shader.h
  • gl-deprecated.h

Low priority / Obsolete

  • GHOST_C-Test.c
  • GHOST_Test.cpp
  • MultiTest.c

Notes

(write down any false positive that may come up from the grep query)

  • area.c - it needs to be revisited once the MatrixAPI supports 2D (see 31a21135)
  • wm_playanim.c (requires decision about bg mode access to gpu) (ianwill)
  • uvedit_draw.c (still has one UI_ThemeColor call because of unconverted DM callback) (LucaRood)

Done

  • done
      action_draw.c (darwin, merwin)
  • done
      anim_channels_defines.c (define-private-public)
  • done
      anim_draw.c (punya)
  • done
      anim_markers.c (dfelinto)
  • done
      area.c (punya, dfelinto)
  • done
      blf_glyph.c (merwin)
  • done
      console_draw.c (juicyfruit)
  • done
      clip_dopesheet_draw.c (TCMBoby)
  • done
      clip_draw.c (LucaRood)
  • done
      clip_graph_draw.c (LucaRood)
  • done
      clip_utils.c (darwin)
  • done
      drawanimviz.c (LucaRood)
  • done
      drawarmature.c (fclem)
  • done
      drawgpencil.c (merwin)
  • done
      drawnode.c (lukas_t, LucaRood)
  • done
      drawsimdebug.c (lukas_t)
  • done
      ed_util.c (dfelinto)
  • done
      editarmature_sketch.c (khanh_ha)
  • done
      editcurve_paint.c (dfelinto)
  • done
      editmesh_knife.c (LucaRood)
  • done
      editmesh_loopcut.c (LucaRood)
  • done
      file_draw.c (plasmasolutions, LucaRood)
  • done
      gpencil_brush.c (merwin)
  • done
      gpencil_paint.c (merwin)
  • done
      graph_draw.c (merwin, LucaRood)
  • done
      interface_draw.c (kgeogeo, fclem)
  • done
      interface_icons.c (Juicyfruit, merwin)
  • done
      interface_panel.c (fclem)
  • done
      interface_widgets.c (fclem)
  • done
      keyframes_draw.c (darwin, merwin)
  • done
      mask_draw.c (ryry, merwin)
  • done
      nla_draw.c (plasmasolutions, merwin)
  • done
      node_draw.c (kgeogeo, merwin, LucaRood)
  • done
      outliner_draw.c (cyrax, LucaRood)
  • done
      paint_image.c (ianwill)
  • done
      paint_stroke.c (fclem)
  • done
      pbvh.c (ianwill)
  • done
      reeb.c (ianwill)
  • done
      render_internal.c (dfelinto, fclem)
  • done
      screendump.c (ianwill)
  • done
      sculpt_uv.c (dfelinto)
  • done
      space_graph.c (LucaRood)
  • done
      text_draw.c (dfelinto)
  • done
      textview.c (witt)
  • done
      transform.c (witt, darwin, merwin)
  • done
      transform_constraints.c (LucaRood)
  • done
      transform_generics.c (LucaRood)
  • done
      transform_manipulator.c (fclem)
  • done
      transform_snap.c (LucaRood)
  • done
      screen_draw.c (fclem)
  • done
      sequencer_draw.c (LucaRood)
  • done
      space_time.c (dfelinto)
  • done
      uvedit_draw.c (LucaRood)
  • done
      uvedit_smart_stitch.c (fclem)
  • done
      view2d.c (define-private-public)
  • done
      view3d_ruler.c (LucaRood)
  • done
      wm_dragdrop.c (ianwill)
  • done
      wm_gesture.c (ianwill)
  • done
      wm_operators.c (ianwill)
  • done
      wm_playanim.c (ianwill)

Examples

  • done
      view3d_walk.c (Dfelinto)
  • done
      view3d_fly.c (Dfelinto)
  • in progress Inprogress75.jpg 75%
      example.c
    • Operators only
  • in progress Inprogress50.jpg 50%
      yet_another_example.h (Dfelinto)
    • glBegin

Is a file done?

To check if a file is done use the following script:

https://github.com/dfelinto/immediate-mode-query/blob/master/query

It basically uses the query below. Both will be kept updated if we decide to expand the query.

Note

Complete list compiled with the following command:

find . -name "*.[c|cpp|h|m|mm]*" -print | grep -v "bgl\.c" | grep -v "\.pyc" | grep -v "\.git" | grep -v "\.svn" | grep -v ".swp" | grep -v "~" | sort | xargs grep -l -n --color=never -H \
    -e fdrawbox \
    -e fdrawbox_filled \
    -e fdrawcheckerboard \
    -e fdrawline \
    -e sdrawline \
    -e sdrawbox \
    -e UI_ThemeColor \
    -e glAlphaFunc \
    -e glBegin\( \
    -e glCallList \
    -e glCallLists \
    -e glColor[^M] \
    -e glClipPlane \
    -e glDeleteLists \
    -e glDisableClientState \
    -e glDrawPixels \
    -e glEnableClientState \
    -e glEnd\( \
    -e glEndList \
    -e glFeedbackBuffer \
    -e glGenLists \
    -e glInitNames \
    -e glIsList \
    -e glLight[if] \
    -e glLineStipple \
    -e glListBase \
    -e glLoadName \
    -e glMaterial[if] \
    -e glNewList \
    -e glNormal \
    -e glPassThrough \
    -e glPixelZoom \
    -e glPolygonStipple \
    -e glPopAttrib \
    -e glPopClientAttrib \
    -e glPopName \
    -e glPushAttrib \
    -e glPushClientAttrib \
    -e glPushName \
    -e glRasterPos \
    -e glRect[if] \
    -e glRenderMode \
    -e glSelectBuffer \
    -e glShadeModel \
    -e glTexCoord \
    -e glTexGen \
    -e glVertex[^A] \
    -e glVertexPointer \
    -e glWindowPos \
    -e GL_ACCUM_.*_BITS \
    -e GL_ALPHA_TEST \
    -e GL_COLOR_MATERIAL \
    -e GL_DEPTH_TEXTURE_MODE \
    -e GL_LIGHTING \
    -e GL_LINE_STIPPLE \
    -e GL_LUMINANCE \
    -e GL_POINT_SPRITE \
    -e GL_TEXTURE_ENV_ \
    -e GL_TEXTURE_GEN_ \
. 2>/dev/null | sed s'/.*\//* /g' | sort

Then organized by hand.