Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Week 1 blogpost #797

Merged
merged 3 commits into from Jun 12, 2023
Merged

Week 1 blogpost #797

merged 3 commits into from Jun 12, 2023

Conversation

JoaoDell
Copy link
Contributor

@JoaoDell JoaoDell commented Jun 8, 2023

Hello everyone, here is my week 1 blogpost.
image

The problems I am having with these FBO implementations is first something related to how a FBO works, and second related to how VTK works.
In OpenGL, a custom user's FBO needs some things to be complete (usable):

1. At least one buffer should be attatched. This buffer can be the color, depth or stencil buffer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attatched => attached

In OpenGL, a custom user's FBO needs some things to be complete (usable):

1. At least one buffer should be attatched. This buffer can be the color, depth or stencil buffer.
2. If no color buffer will be attatched then OpenGL needs to be warned no draw or read operations will be done to that buffer. Otherwise, there should be at least one color attachment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attatched => attached

In contrast, for some reason, the methods for 3D textures, `Allocate3D <https://vtk.org/doc/nightly/html/classvtkTextureObject.html#aaeefa46bd3a24bf62126512a276819d0>`_ works just fine.
I could use it as a workaround, but I do not wish to, as this just does not make sense.

My second problem relies VTK. As VTK is a library that encapsulates some OpenGL functions in more palatable forms, it comes with some costs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relies on VTK

My Current Problems
-------------------

The problems I am having with these FBO implementations is first something related to how a FBO works, and second related to how VTK works.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is => are

My first problem relies on the third requirement. VTK's implementation of FBO requires a `vtkTextureObject <https://vtk.org/doc/nightly/html/classvtkTextureObject.html>`_
as a texture attachment. I figured how to work with this class, however, I cannot allocate memory for it, as its methods for it, `Allocate2D <https://vtk.org/doc/nightly/html/classvtkTextureObject.html#abc91bbf9a3414bded7a132d366ca4951>`_, `Create2D <https://vtk.org/doc/nightly/html/classvtkTextureObject.html#a7e9dd67f377b7f91abd9df71e75a5f67>`_ and `Create2DFromRaw <https://vtk.org/doc/nightly/html/classvtkTextureObject.html#a0e56fe426cb0e6749cc6f2f8dbf53ed7>`_
does not seem to work. Every time I try to use them, my program stops with no error message nor nothing.
For anyone interested in what is happening exacty, below is how I my tests are implemented:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exacty => exactly

Copy link
Contributor

@tvcastillod tvcastillod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoaoDell Overall it's good, I like that you gave a detailed explanation of your problem. I made some comments for you to review.

--------------

As mentioned in the last week's blogpost, the goal for that week was to investigate VTK's Framebuffer Object framework.
An update on that is that indeed, VTK has one more low-level working `FBO class <vtk.org/doc/nightly/html/classvtkOpenGLFramebufferObject.html>`_ that can be used inside FURY, however,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link does not work for me. Try using this one instead https://vtk.org/doc/nightly/html/classvtkOpenGLFramebufferObject.html

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it doesn't work for me as well!

4. Each buffer should have the same number of samples.

My first problem relies on the third requirement. VTK's implementation of FBO requires a `vtkTextureObject <https://vtk.org/doc/nightly/html/classvtkTextureObject.html>`_
as a texture attachment. I figured how to work with this class, however, I cannot allocate memory for it, as its methods for it, `Allocate2D <https://vtk.org/doc/nightly/html/classvtkTextureObject.html#abc91bbf9a3414bded7a132d366ca4951>`_, `Create2D <https://vtk.org/doc/nightly/html/classvtkTextureObject.html#a7e9dd67f377b7f91abd9df71e75a5f67>`_ and `Create2DFromRaw <https://vtk.org/doc/nightly/html/classvtkTextureObject.html#a0e56fe426cb0e6749cc6f2f8dbf53ed7>`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figure out how to

Copy link
Contributor

@ganimtron-10 ganimtron-10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @JoaoDell ,
Nice Detailed Blog.
Just look into @tvcastillod's comment as she has covered all of them!

--------------

As mentioned in the last week's blogpost, the goal for that week was to investigate VTK's Framebuffer Object framework.
An update on that is that indeed, VTK has one more low-level working `FBO class <vtk.org/doc/nightly/html/classvtkOpenGLFramebufferObject.html>`_ that can be used inside FURY, however,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it doesn't work for me as well!

@JoaoDell
Copy link
Contributor Author

JoaoDell commented Jun 9, 2023

Thanks @ganimtron-10 and @tvcastillod for the reviews, I just adressed the issues you pointed out 👍

@JoaoDell JoaoDell requested a review from skoudoro June 9, 2023 19:20
Copy link
Contributor

@skoudoro skoudoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @tvcastillod and @ganimtron-10 for the nice review.

Thanks for this blog post.

merging

@skoudoro skoudoro merged commit 3bfe3c6 into fury-gl:master Jun 12, 2023
2 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants