replace OpenGL immediate mode in Blender 2.8 #49043

Closed
opened 2016-08-08 08:41:56 +02:00 by Mike Erwin · 78 comments
Member

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!

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](https://wiki.blender.org/index.php/Dev:2.8/Source/OpenGL/ImmediateModeReplacement) has more information about what needs to be done and how people can get involved. We're tracking progress on [this page ](https://wiki.blender.org/index.php/Dev:2.8/Source/OpenGL/Immediate_Mode_Replacement_Tasks), where you can browse files that need work and claim a piece of the action!
Mike Erwin self-assigned this 2016-08-08 08:41:56 +02:00
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @MikeErwin

Added subscriber: @MikeErwin

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Added subscriber: @AnthonyEdlin

Added subscriber: @AnthonyEdlin

Added subscriber: @pdlla

Added subscriber: @pdlla

Just read through the doc. Will new tasks be created? I'm happy to to help out here.

Just read through the doc. Will new tasks be created? I'm happy to to help out here.
Author
Member

In #49043#395707, @pdlla wrote:
Will new tasks be created?

Just add a comment to this task saying "I'm working on funcX, funkY, funcZ. Plan to finish by DATE"

As you finish, edit the comment to cross out funcX, funkY, funcZ.

> In #49043#395707, @pdlla wrote: > Will new tasks be created? Just add a comment to this task saying "I'm working on funcX, funkY, funcZ. Plan to finish by DATE" As you finish, edit the comment to cross out ~~funcX~~, ~~funkY~~, funcZ.

Added subscriber: @fablefox

Added subscriber: @fablefox

Will there a spreadsheet that list all the source code that need working, person working on it, and maybe 0,25,50,75,100% completed status for people to mark?

I think having that can be helpful and lead to easier organizing. IMHO.

Will there a spreadsheet that list all the source code that need working, person working on it, and maybe 0,25,50,75,100% completed status for people to mark? I think having that can be helpful and lead to easier organizing. IMHO.
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

In #49043#395808, @fablefox wrote:
Will there a spreadsheet that list all the source code that need working, person working on it, and maybe 0,25,50,75,100% completed status for people to mark?

I think having that can be helpful and lead to easier organizing. IMHO.

+1, this would probably help a bit. We can also use the wiki like here .

> In #49043#395808, @fablefox wrote: > Will there a spreadsheet that list all the source code that need working, person working on it, and maybe 0,25,50,75,100% completed status for people to mark? > > I think having that can be helpful and lead to easier organizing. IMHO. +1, this would probably help a bit. We can also use the wiki like [here ](https://wiki.blender.org/index.php/Dev:2.5/Source/Architecture/RNA/Tasks#Help_Wanted).

have a list in wiki for the listing of remaining files

I can work on that. I will post on bf-viewport when it's done (there are 56 files total for glBegin at least).

> have a list in wiki for the listing of remaining files I can work on that. I will post on bf-viewport when it's done (there are 56 files total for glBegin at least).
Author
Member

@dfelinto created a task page where we can track progress per file. Fancy!

Use that page to claim files (or parts of files), and this task to track commits / diffs / code review.

@dfelinto created a [task page ](https://wiki.blender.org/index.php/Dev:2.8/Source/OpenGL/Immediate_Mode_Replacement_Tasks) where we can track progress per file. Fancy! Use that page to claim files (or parts of files), and this task to track commits / diffs / code review.

Added subscriber: @KhanhHa

Added subscriber: @KhanhHa

Added subscriber: @WillianPadovaniGermano

Added subscriber: @WillianPadovaniGermano

This issue was referenced by 05117d71a3

This issue was referenced by 05117d71a35d69a978a5e26da185b3617333d98c
Author
Member

This comment was removed by @MikeErwin

*This comment was removed by @MikeErwin*

Added subscriber: @RecepAslantas

Added subscriber: @RecepAslantas

Added subscriber: @SonicPixelation

Added subscriber: @SonicPixelation

Removed subscriber: @SonicPixelation

Removed subscriber: @SonicPixelation

Added subscriber: @SonicPixelation

Added subscriber: @SonicPixelation

Removed subscriber: @SonicPixelation

Removed subscriber: @SonicPixelation

Added subscriber: @brieder

Added subscriber: @brieder

Added subscriber: @define-private-public

Added subscriber: @define-private-public

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

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

~~Does anyone mind if I claim `source/blender/editors/space_action/action_draw.c`? ~~ Scratch that, I was told someone else was talking that.

Does view2d.c have any takers?

Does `view2d.c` have any takers?

Added subscriber: @darwin

Added subscriber: @darwin

Will take on transform.c next.

Will take on `transform.c` next.
Author
Member

Added subscriber: @punya

Added subscriber: @punya
Author
Member

Updated our todo list for contributors @define-private-public @punya @darwin

Updated our todo list for contributors @define-private-public @punya @darwin

Taking on anim_markers next: D2355

Taking on `anim_markers` next: [D2355](https://archive.blender.org/developer/D2355)

Taking on area next: D2361.

Taking on `area` next: [D2361](https://archive.blender.org/developer/D2361).

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.

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`.

@define-private-public according to the wiki no. So go for it!

@define-private-public according to the [wiki ](https://wiki.blender.org/index.php/Dev:2.8/Source/OpenGL/Immediate_Mode_Replacement_Tasks) no. So go for it!

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

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

Removed subscriber: @brieder

Removed subscriber: @brieder

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

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

Added subscriber: @ryry-1

Added subscriber: @ryry-1

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

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

In #49043#405376, @ryry-1 wrote:
I'd like to help! Could I grab glutil.c?

Welcome @ryry-1! 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.

> In #49043#405376, @ryry-1 wrote: > I'd like to help! Could I grab glutil.c? Welcome @ryry-1! 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.

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,.

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,.

Added subscriber: @benjamin-19

Added subscriber: @benjamin-19

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

@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.

Taking on `keyframes_draw.c` if there are no objections.

Can someone please mark clip_utils.c for me?

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.

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.

Added subscriber: @mizerb

Added subscriber: @mizerb

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

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

Welcome @mizerb! Go ahead with text_draw.c

Welcome @mizerb! Go ahead with text_draw.c

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

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

Added subscriber: @TCMBoby

Added subscriber: @TCMBoby

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

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

Removed subscriber: @define-private-public

Removed subscriber: @define-private-public

@MikeErwin 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.

@MikeErwin 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](https://archive.blender.org/developer/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.

Added subscriber: @define-private-public

Added subscriber: @define-private-public
Author
Member

Thank you @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.

Thank you @define-private-public for your code & for helping other people get started. Welcome back anytime. I'll look at [D2377](https://archive.blender.org/developer/D2377) again tomorrow, try to get it in.

Added subscriber: @antoniov

Added subscriber: @antoniov

This issue was referenced by 8aa8165e85

This issue was referenced by 8aa8165e85d4abcf9025c687863d0c41bc41a348

Added subscriber: @oweissbarth

Added subscriber: @oweissbarth

Hi i would like to help. Can i take uvedit_draw.c or should i start somewhere else?

Hi i would like to help. Can i take uvedit_draw.c or should i start somewhere else?

I'm taking screen_draw.c. Thanks.

I'm taking `screen_draw.c`. Thanks.

This issue was referenced by a39a459a1ecbe3ab0cb772b9eae58ffc0a4d3e08

This issue was referenced by a39a459a1ecbe3ab0cb772b9eae58ffc0a4d3e08

This issue was referenced by dbe23c5456

This issue was referenced by dbe23c5456496a179b956b545c24c311b69c1c62

Added subscriber: @Squareys

Added subscriber: @Squareys

Added subscriber: @SebastianWitt

Added subscriber: @SebastianWitt

@ryry-1 @punya @SebastianWitt @darwin I couldn't find your contact. But we've just sent a round of emails to get in touch with past contributors of this taskforce. The message goes as follow:

Hi there,

This is a friendly email to invite you to get back at our beloved
OpenGL TaskForce :) I understand life makes it hard some times. But in
case your distance from the development process is due to the process
itself, please do tell us. We would love to hear and address it.

Very well, we are close to one of our initial marks. That said we will
start a new stage soon. Once the immediate mode replacement is over
and the new matrix API is finished and documented. So yes, plenty of
work ahead indeed.

Anyways, thanks for your involvement in the task force. We hope you
can back on this or any future projects.

Best regards,
Dalai and Mike

If you have any question don't hesitate in contacting us directly via email, irc, or through here.

@ryry-1 @punya @SebastianWitt @darwin I couldn't find your contact. But we've just sent a round of emails to get in touch with past contributors of this taskforce. The message goes as follow: ``` Hi there, This is a friendly email to invite you to get back at our beloved OpenGL TaskForce :) I understand life makes it hard some times. But in case your distance from the development process is due to the process itself, please do tell us. We would love to hear and address it. Very well, we are close to one of our initial marks. That said we will start a new stage soon. Once the immediate mode replacement is over and the new matrix API is finished and documented. So yes, plenty of work ahead indeed. Anyways, thanks for your involvement in the task force. We hope you can back on this or any future projects. Best regards, Dalai and Mike ``` If you have any question don't hesitate in contacting us directly via email, irc, or through here.
Author
Member

Hey everyone, I updated the call for help wiki page with recommended coding style. It's worth another read even if you've been doing this a while, to clarify how the new API works.

We're getting closer to done!

Hey everyone, I updated the [call for help ](https://wiki.blender.org/index.php/Dev:2.8/Source/OpenGL/ImmediateModeReplacement) wiki page with recommended coding style. It's worth another read even if you've been doing this a while, to clarify how the new API works. We're getting closer to done!

Mike Erwin have told me a about the task editarmature_sketch.c, please someone mark this file in wike page for me

Mike Erwin have told me a about the task editarmature_sketch.c, please someone mark this file in wike page for me

Added subscriber: @ErickNyanduKabongo

Added subscriber: @ErickNyanduKabongo

I am working on paint_cursor.c

I am working on paint_cursor.c

can't work on paint_cursor.c because the line circle drawing was refactored, and circle/line drawing feature crashes while evaluating curve.
I am looking for a new file

can't work on paint_cursor.c because the line circle drawing was refactored, and circle/line drawing feature crashes while evaluating curve. I am looking for a new file

This comment was removed by @KhanhHa

*This comment was removed by @KhanhHa*

@KhanhHa why not tackling this crash then? we will need to fix it anyways :)

@KhanhHa why not tackling this crash then? we will need to fix it anyways :)

Added subscriber: @s12a

Added subscriber: @s12a

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Pretty much everything appears to have been converted, any more issue we discover can be handled in their own tasks.

Pretty much everything appears to have been converted, any more issue we discover can be handled in their own tasks.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
24 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#49043
No description provided.