🤠
cedoscript
  • Introduction
  • Documentation
    • Packets
    • Setting Command
    • Java Imports
    • Examples
      • Creating a Pack
      • Custom Block Animation
      • Bhop
      • Setting Creation
      • Post Notification
      • Gradient Round Rectangle
      • Applying a gradient
      • Simulate a command
  • api
    • Events
    • Settings
    • Objects
      • EntityLivingBase
      • ItemStack
      • Player Abilities
      • Color
      • TimerUtil
      • Continual Animation
      • ShaderUtil
      • FrameBuffer
      • Rainbow
      • Drag
      • Pair
      • Module
  • Bindings
    • Client
    • Player
    • Packet
    • Action
    • Facing
    • Potion
    • Notification
    • Render
    • Stats
    • Font
    • User
    • World
Powered by GitBook
On this page
  • How to create
  • Functions
  • resize
  • clear
  • bind
  • unbind
  • getTextureID
  • getWidth
  • getHeight

Was this helpful?

  1. api
  2. Objects

FrameBuffer

How to create

var buffer = render.createFramebuffer()

To maintain the size of the framebuffer with the screen size you have to do the following code in Render2D

var buffer = render.createFramebuffer()

script.onRender2D(function(event) {
    buffer.resize()
})

Functions

resize

buffer.resize()

This updates the framebuffer size with the current screen size

clear

buffer.clear()

This clears the framebuffer

bind

buffer.bind()

Binds the framebuffer to what is rendering next

unbind

buffer.unbind()

Unbinds the framebuffer

getTextureID

var textureID = buffer.getTextureID()

Returns the texture ID as a Number

getWidth

var framebufferWidth = buffer.getWidth()

Returns the framebuffer width as a Number

getHeight

var framebufferHeight = buffer.getHeight()

Returns the framebuffer height as a Number

PreviousShaderUtilNextRainbow

Last updated 2 years ago

Was this helpful?