replace OpenGL immediate mode in Blender 2.8
Open, NormalPublic

Description

OpenGL 3.3 core profile does not support glBegin/glEnd/glVertex and related functions.

Replace all calls with VBOs & glDrawArrays/glDrawElements, or (preferably) with Gawain's immediate mode work-alike.

We must complete this task before switching to core profile.

The call for volunteers has more information about what needs to be done and how people can get involved.

We're tracking progress on this page, where you can browse files that need work and claim a piece of the action!

Details

Parent Tasks
T49165: OpenGL Refactor: Main Task
Differential Revisions
D2391: OpenGL: updated clip_utils.c to new immediate mode
D2359: Blender 2.8: OpenGL immediate mode: transform
D2369: OpenGL: updated clip_utils.c to new immediate mode
D2373: OpenGL: updated keyframes_draw.c to new immediate mode
D2434: Updating outliner_draw_struct_marks to retained mode
D2371: Converted mask_draw.c to new immediate mode
D2377: OpenGL: convert anim_channel_defines.c to new imm mode
D2364: Replacing UI_view2d_scrollsers_draw() to immedaite mode
D2363: Moved UI_view2_multi_grid_draw() to Gawain
D2376: Blender 2.8: OpenGL: immediate mode for wm_gesture.c (+ needed vert and frag shaders for dashed lines)
D2316: OpenGL: updated transform.c to new immediate mode
D2305: OpenGL: textview port to immediate mode -> T49043
D2361: blender 2.8: OpenGL immediate mode: area
D2355: blender 2.8: OpenGL immediate mode: anim_markers
D2353: blender 2.8: OpenGL immediate mode: anim_draw
D2352: T49043: Replace OpenGL immediate mode in Blender 2.8 (action_draw.c)
D2337: blender 2.8: Opengl: UI_draw_roundbox
D2336: blender 2.8: OpenGL immediate mode: node_draw_preview_background
D2312: Blender 2.8: OpenGL: new immediate mode for paint_image.c
D2311: Blender 2.8: OpenGL: new immediate mode for wm_operators.c
D2306: Blender 2.8: OpenGL: new immediate mode API for screendump.c
D2294: blender 2.8: OpenGL: New bezier curve shader and use in node editor.
D2288: Blender 2.8: OpenGL: trying to replace immediate mode in wm_playanim.c
D2286: blender 2.8: OpenGL: node_circle_draw use now immediate mode
D2281: blender 2.8; OpenGL. ui_panel_category_draw_tab with immediate API
D2274: Blender 2.8: OpenGL: replace old GL with the new immediate API in UI_draw_roundbox_gl_mode
Commits
rB8aa8165e85d4: OpenGL: convert legacy calls in transform.c
rB05117d71a35d: OpenGL: draw cameras with new immediate mode
Type
To Do
There are a very large number of changes, so older changes are hidden. Show Older Changes

Does anyone mind if I claim source/blender/editors/space_action/action_draw.c?

Scratch that, I was told someone else was talking that.

Will take on transform.c next.

does editors/space_text/text_draw.c have any takers? I'd like to work on it next after I'm done with view2d.c.

While I wait for review on transform.c, I will tackle clip_utils.c

Could someone mark that on the wiki for me? I don't have an account there yet.

I'd like to help! Could I grab glutil.c?

I'd like to help! Could I grab glutil.c?

Welcome @Ryan Reyes (ryry)! Sooo many other files depend on glutil so it's not a very good place to start. Please redirect your enthusiasm to another file that *uses* deprecated functions from glutil.

Functions in there starting with "imm" use the new API so can help when porting code in other files.

Okay! I'll do mask_draw.c and try to have it done by tomorrow evening EST.

I'm going to start on interface_regions.c if there are no takers. I'm skipping text_draw.c for now, so if anyone else wants it. It's up for grabs,.

@Benjamin Summerton (define-private-public), I've marked interface_regions.c on the wiki for you (moved from text_draw.c).

Taking on keyframes_draw.c if there are no objections.

Can someone please mark clip_utils.c for me?

I'm going to take anim_channels_defines.c in the meantime actually. I need to talk to merwin before moving on with the other two things I said I was going to do.

Hello, I'll try to help. Looking at starting at text_draw.c if that's ok?

Welcome @Benjamin Mizera (mizerb)! Go ahead with text_draw.c

I'm going to be working on paint_stroke.c for now.

I want to help as well. Would anyone mind if I claimed clip_draw.c to start with?

@Mike Erwin (merwin) I'd like to thank you for helping me with the few diffs that I made, but I'm going to have to sign off from helping with the blender project right now. I have some other priorities that I need to focus on right now. I'd like to come back and help sometime down the road, but I have too much on my plate right now.

I still have D2377 alive, and I'd like to get that in (if it's acceptable).

If you have any new people who are looking for some low hanging fruit to start out with, I scouted these files out:

  • view3d_ruler.c
  • transfrom_generics.c
  • transform_constraints.c
  • text_draw.c (I think it might be taken by someone else)
  • space_graph.c
  • sculpt_uv.c
  • screen_edit.c
  • paint_stroke.c

Thanks again.

Thank you @Benjamin Summerton (define-private-public) for your code & for helping other people get started. Welcome back anytime.

I'll look at D2377 again tomorrow, try to get it in.

Add Comment