Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8668541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:14:21+00:00 2026-06-12T18:14:21+00:00

I need to render to a framebufferobject with GL_FLOAT as internal format for floating-point

  • 0

I need to render to a framebufferobject with GL_FLOAT as internal format for floating-point computations. I know how to achieve this using native OpenGL calls, such as:

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, width, height,
             0, GL_RGBA, GL_FLOAT, NULL);

In order to use QPainter to render to a FBO, QGLFramebufferObject is required.
However, QGLFramebufferObject doesn’t allow to set the type, only the internal format and format of the texture (that is used in an color-attachment in my case).

Is there any way of using floating-point precision with QGLFramebufferObject in Qt 4.8?

I know I could somehow patch and recompile Qt, but that’s cumbersome and not very elegant.
I also considered writing my own FramebufferObject class, but then one has to derive from QPaintDevice and with that provide a custom QPaintEngine. Not a good solution, as Qt obviously has a paintengine for that, but it’s not accessible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:14:23+00:00Added an answer on June 12, 2026 at 6:14 pm

    The internal format is the only thing that makes a texture floating-point. For example:

    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height,
             0, GL_RGBA, GL_FLOAT, NULL);
    

    This is not a floating-point texture. It is a 8-bit-per-component unsigned normalized texture. Because that’s what GL_RGBA8 means.

    So just set the internal format of the QGLFramebufferObject to be one of the available floating-point formats.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to render quite alot (tens of thousands) images off-screen using OpenGL. I
I'm using Backbone.Marionette and need to render a view of employees and their respective
Im need render this remplate with Rails.root <%= escape_javascript(render(:template => '#{Rails.root}/app/controllers/posts/repost_new'))%> but I get
I need to render a line break using outputText so that I can utilize
I need to render rich text using Core Text in my view (simple formatting,
I have a workflow where I need to render an exception page. But this
Sometimes, I need to render a JavaScript variable using EL in a JSF page.
EDIT: All I need is render /devise/registrations/edit in /settings/password To do that put this
Here is what I need to do: Render PDFs using Apache's FOP on a
I need to render a sphere to a texture (done using a Framebuffer Object

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.