replace OpenGL immediate mode in Blender 2.8 #49043

Closed
opened 7 years ago by MikeErwin · 78 comments
Collaborator

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!
MikeErwin self-assigned this 7 years ago
Poster
Collaborator

Changed status to: 'Open'

Changed status to: 'Open'
Poster
Collaborator

Added subscriber: @MikeErwin

Added subscriber: @MikeErwin
Owner

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Added subscriber: @AnthonyEdlin

Added subscriber: @AnthonyEdlin
pdlla commented 6 years ago

Added subscriber: @pdlla

Added subscriber: @pdlla
pdlla commented 6 years ago

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.
Poster
Collaborator

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

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Collaborator

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).
Owner

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).
Poster
Collaborator

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

This issue was referenced by 05117d71a3

This issue was referenced by 05117d71a35d69a978a5e26da185b3617333d98c
Poster
Collaborator

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?
darwin commented 6 years ago

Added subscriber: @darwin

Added subscriber: @darwin
darwin commented 6 years ago

Will take on transform.c next.

Will take on `transform.c` next.
Poster
Collaborator

Added subscriber: @punya

Added subscriber: @punya
Poster
Collaborator

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

Updated our todo list for contributors @define-private-public @punya @darwin
punya commented 6 years ago

Taking on anim_markers next: D2355

Taking on `anim_markers` next: [D2355](https://archive.blender.org/developer/D2355)
punya commented 6 years ago

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

@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!
darwin commented 6 years ago

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.
ryry-1 commented 6 years ago

Added subscriber: @ryry-1

Added subscriber: @ryry-1
ryry-1 commented 6 years ago

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

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

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.
ryry-1 commented 6 years ago

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).
darwin commented 6 years ago

Taking on keyframes_draw.c if there are no objections.

Taking on `keyframes_draw.c` if there are no objections.
darwin commented 6 years ago

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.
mizerb commented 6 years ago

Added subscriber: @mizerb

Added subscriber: @mizerb
mizerb commented 6 years ago

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?
Poster
Collaborator

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
Poster
Collaborator

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

Added subscriber: @antoniov

Added subscriber: @antoniov
Owner

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?
darwin commented 6 years ago

I'm taking screen_draw.c. Thanks.

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

This issue was referenced by a39a459a1ecbe3ab0cb772b9eae58ffc0a4d3e08

This issue was referenced by a39a459a1ecbe3ab0cb772b9eae58ffc0a4d3e08
Owner

This issue was referenced by dbe23c5456

This issue was referenced by dbe23c5456496a179b956b545c24c311b69c1c62

Added subscriber: @Squareys

Added subscriber: @Squareys
Owner

Added subscriber: @SebastianWitt

Added subscriber: @SebastianWitt
Owner

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

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*
Owner

@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 :)
s12a commented 6 years ago

Added subscriber: @s12a

Added subscriber: @s12a
brecht commented 5 years ago
Owner

Added subscriber: @brecht

Added subscriber: @brecht
brecht commented 5 years ago
Owner

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
brecht closed this issue 5 years ago
brecht commented 5 years ago
Owner

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
good first issue
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/2.81
legacy project/2.82
legacy project/2.83
legacy project/2.90
legacy project/2.91
legacy project/2.92
legacy project/3.0
legacy project/3.1
legacy project/3.2
legacy project/3.3
legacy project/Alembic
legacy project/Animation & Rigging
legacy project/Asset Browser
legacy project/Asset Browser (Archived)
legacy project/Asset Browser Project Overview
legacy project/Audio
legacy project/Automated Testing
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Blender Asset Bundle
legacy project/Code Quest
legacy project/Collada
legacy project/Compositing
legacy project/Core
legacy project/Cycles
legacy project/Datablocks and Libraries
legacy project/Dependency Graph
legacy project/Development Management
legacy project/Eevee
legacy project/EEVEE & Viewport
legacy project/Freestyle
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/Geometry Nodes
legacy project/Good First Issue
legacy project/GPU / Viewport
legacy project/Grease Pencil
legacy project/GSoC
legacy project/Images & Movies
legacy project/Import/Export
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Line Art
legacy project/Masking
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Modeling
legacy project/Modifiers
legacy project/Motion Tracking
legacy project/Nodes
legacy project/Nodes & Physics
legacy project/OpenGL Error
legacy project/Overrides
legacy project/Papercut
legacy project/Performance
legacy project/Physics
legacy project/Pipeline, Assets & I/O
legacy project/Platform: FreeBSD
legacy project/Platform: Linux
legacy project/Platform: macOS
legacy project/Platforms, Builds, Tests & Devices
legacy project/Platform: Windows
legacy project/Pose Library Basics
legacy project/Python API
legacy project/Render & Cycles
legacy project/Render Pipeline
legacy project/Retrospective
legacy project/Sculpt, Paint & Texture
legacy project/Text Editor
legacy project/Tracker Curfew
legacy project/Translations
legacy project/Triaging
legacy project/Undo
legacy project/USD
legacy project/User Interface
legacy project/UV Editing
legacy project/VFX & Video
legacy project/Video Sequencer
legacy project/Virtual Reality
legacy project/Wintab High Frequency
migration/requires-manual-verification
Module › Animation & Rigging
Module › Core
Module › Development Management
Module › Eevee & Viewport
Module › EEVEE & Viewport
Module › Grease Pencil
Module › Modeling
Module › Nodes & Physics
Module › Pipeline, Assets & IO
Module › Platforms, Builds Tests & Devices
Module › Platforms, Builds, Tests & Devices
Module › Python API
Module › Render & Cycles
Module › Sculpt, Paint & Texture
Module › Triaging
Module › User Interface
Module › VFX & Video
papercut
performance
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#49043
Loading…
There is no content yet.