Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

18.6: createGraphics() as WebGL Texture - WebGL and p5.js Tutorial

33.4K views
•
December 30, 2017
by
The Coding Train
YouTube video player
18.6: createGraphics() as WebGL Texture - WebGL and p5.js Tutorial

TL;DR

Learn how to use the createGraphics function in p5.js to create off-screen graphics that can be used as textures in a 3D environment.

Transcript

hello welcome to another WebGL p5.js tutorial in this one I am going to actually don't even have this on my list of stuff but I'm gonna look again at the texture function and previously I looked at how to use an image or a video as a texture in this video I want to look at how to make an off-screen graphics buffer essentially like a 2d canvas that ... Read More

Key Insights

  • 👻 The createGraphics function in p5.js allows the creation of off-screen graphics that can be used as textures in WebGL.
  • 💻 Off-screen graphics can be customized and textured onto 3D objects, enabling a dynamic visual experience.
  • ❓ Text and images can also be used as textures, providing possibilities for rendering text in 3D.
  • ❎ There is a limitation in p5.js WebGL where only square textures are supported, which may affect the mapping of non-square images onto 3D objects.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: How can you create off-screen graphics using p5.js?

The createGraphics function in p5.js allows you to create a graphics object, which is essentially an off-screen canvas that you can draw on. You can specify the dimensions of the graphics object, such as createGraphics(200, 200) to create a 200x200 canvas.

Q: Can you use off-screen graphics as textures on 3D objects in WebGL?

Yes, by using the texture() function in p5.js, you can apply the off-screen graphics as a texture on 3D objects. This allows you to create dynamic and customized textures for your 3D environment.

Q: What are some creative uses of off-screen graphics as textures?

Off-screen graphics as textures offer endless creative possibilities. Some ideas include creating generative designs, animating 2D graphics and transforming them into 3D textures, or even rendering texts in 3D by placing them on a 2D graphics context and texturing them onto 3D objects.

Q: Are there any limitations when using off-screen graphics as textures in WebGL?

Currently, there is a limitation in p5.js WebGL that only square textures are supported. This means that non-square images or off-screen graphics may not be properly stretched or mapped onto non-square 3D objects. However, this limitation may be fixed in future updates.

Summary & Key Takeaways

  • The tutorial explores how to create off-screen graphics using the createGraphics function in p5.js.

  • These off-screen graphics can be textured onto 3D objects in a WebGL environment.

  • The tutorial also explains how to use images and text as textures, and showcases the potential applications of this technique.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from The Coding Train 📚

6.4: TensorFlow.js: Memory Management - Intelligence and Learning thumbnail
6.4: TensorFlow.js: Memory Management - Intelligence and Learning
The Coding Train
Coding Train Studio Tour! thumbnail
Coding Train Studio Tour!
The Coding Train
9.3: Firebase: Retrieving Data - Programming with Text thumbnail
9.3: Firebase: Retrieving Data - Programming with Text
The Coding Train
Coding Challenge #18: 3D Fractal Trees thumbnail
Coding Challenge #18: 3D Fractal Trees
The Coding Train
2.4: random() Function - p5.js Tutorial thumbnail
2.4: random() Function - p5.js Tutorial
The Coding Train
8.11: Callbacks on Multiple DOM Elements - p5.js Tutorial thumbnail
8.11: Callbacks on Multiple DOM Elements - p5.js Tutorial
The Coding Train

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.