SharpFont | Cross-platform FreeType bindings for .NET - Need maintainer | DevOps library
kandi X-RAY | SharpFont Summary
kandi X-RAY | SharpFont Summary
SharpFont
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of SharpFont
SharpFont Key Features
SharpFont Examples and Code Snippets
Community Discussions
Trending Discussions on SharpFont
QUESTION
What are the exact usage differences between the two functions glframebuffertexture and glbindtexture in OpenGL.
To put into context, I am using OpenTK to write a custom lightweight UI using OpenGL for an embeded machine, which uses lots of framebuffers and respective textures for different components in the UI. Internally the framebuffers are tracked using a stack as buffer contents can be drawn into the "parent" buffer (or if no parent the screen space).
Im having a hard time trying to get the calls in the right order and im wondering if i have got confused with when I need to bind a texture to a frame buffer and when I need to assign a texture to a frame buffer.
I have read the docs on these functions but they dont really explain the relationships between these functions in their context with the frame buffer.
Im basically ending up with nothing being rendered back to screen.
For example if im rendering text with SharpFont (FreeType binding lib) I have one framebuffer for the whole rendered string and one framebuffer to render each character to.
This is the general sequence of how I believe the calls are to be made in this example
Starting at FB0 (Screen space),
Create FB 1,
Setup FB 1 (bind to FB 1) with TX 1 (Create then Bind to then attach),
Bind back to FB0,
Bind to FB1 (to start rendering to),
Create FB2,
Setup FB 2 (bind to FB 2) with TX 2 (Create then Bind to then attach), (including rendered character pixel data),
Bind Back to FB1,
Bind to TX2
Render TX2 (supposedly) with quad
Repeat at 7 for next character until end
Bind Back to FB0
Render TX1 (supposedly) with quad.
FrameBuffer (UI Object)
...ANSWER
Answered 2017-Aug-03 at 12:38glFrameBufferTexture associate the texture to the framebuffer as a render target.
It means that when you will issue a drawcall, this texture will be write by the output of your fragment shader (with blending if enabled).
GlBindTexture tells OpenGL you want to read this texture (via a sampler2D for example)
To be simple : glFrameBufferTexture allows you to render (or write) into this texture instead of your own screen, glBindTexture allows you to read data inside the texture (it could be a texture you wrote thanks a framebuffer, or a texture you wrote when loading an image).
EDIT : More generally, bind an object in OpenGL tells OpenGL that it will use this object for all subsequent operation.
When you want to do a glTexParameter, you must need to bind the texture you are working on prior. Or use DSA with; glTextureParameter/
For buffers and other objects it is the same
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install SharpFont
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page