处理 FrameBuffer 错误
Posted
技术标签:
【中文标题】处理 FrameBuffer 错误【英文标题】:processing FrameBuffer Error 【发布时间】:2013-01-24 15:43:48 【问题描述】:我正在尝试制作一个处理程序,但如果我使用 P2D、P3D 或 OPENGL 模式,则会出现错误:
com.sun.jdi.VMDisconnectedException
at com.sun.tools.jdi.TargetVM.waitForReply(TargetVM.java:285)
at com.sun.tools.jdi.VirtualMachineImpl.waitForTargetReply(VirtualMachineImpl.java:1015)
at com.sun.tools.jdi.PacketStream.waitForReply(PacketStream.java:51)
at com.sun.tools.jdi.JDWP$ObjectReference$InvokeMethod.waitForReply(JDWP.java:4589)
at com.sun.tools.jdi.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:374)
at processing.mode.java.runner.Runner.findException(Runner.java:701)
at processing.mode.java.runner.Runner.reportException(Runner.java:652)
at processing.mode.java.runner.Runner.exception(Runner.java:595)
at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
at processing.mode.java.runner.EventThread.run(EventThread.java:89)
错误消息本身在 P2D 和 P3D 之间有所不同,但它们都会收到 no framebuffer objects available 错误。我正在使用处理 2.0b7,如果您需要更多信息,请帮助并告诉我。 注意:我不知道这是否是一个单独的问题,但我也收到了 GLSL 着色器错误。 现在,这是我的代码:
Cell[][] Cells = new Cell[50][50];
byte Direction = 1;
byte Times = 1;
int oldwidth = 500;
int oldheight = 500;
void setup()
size(oldwidth, oldheight, OPENGL);
background(255);
colorMode(HSB,250);
for (int x = 0; x < 50; x++)
for (int y = 0; y < 50; y++)
Cells[x][y] = new Cell(x * 5, y * 5, 255, x * (width / 50), y * (height / 50), width / 50, height / 50);
void draw()
for (int x = 0; x < 50; x++)
for (int y = 0; y < 50; y++)
if (width == oldwidth) Cells[x][y].Width = width / 50;
if (height == oldheight) Cells[x][y].Height = height / 50;
if (Direction == 1)
Cells[x][y].Hue += 5;
if (Cells[x][y].Hue > 250) Cells[x][y].Hue -= 250;
if (Direction == 2)
Cells[x][y].Saturation -= 5;
if (Cells[x][y].Saturation < 0) Cells[x][y].Saturation += 500;
if (Direction == 3)
Cells[x][y].Hue -= 5;
if (Cells[x][y].Hue < 0) Cells[x][y].Hue += 250;
if (Direction == 4)
Cells[x][y].Saturation += 5;
if (Cells[x][y].Saturation > 500) Cells[x][y].Saturation -= 500;
Cells[x][y].Draw();
if (Times == 50)
Times = 1;
if (Direction == 4) Direction = 1; else Direction += 1;
else Times += 1;
delay(10);
class Cell
int X;
int Y;
int Width;
int Height;
float Hue;
float Saturation;
float Brightness;
Cell(color parC, int parX, int parY, int parWidth, int parHeight)
Hue = hue(parC);
Saturation = saturation(parC);
Brightness = brightness(parC);
X = parX;
Y = parY;
Width = parWidth;
Height = parHeight;
Cell(float parHue, float parSaturation, float parBrightness, int parX, int parY, int parWidth, int parHeight)
Hue = parHue;
Saturation = parSaturation;
Brightness = parBrightness;
X = parX;
Y = parY;
Width = parWidth;
Height = parHeight;
void Draw()
if (Saturation > 250) if (Saturation > 500) stroke(color(Hue,0,Brightness)); else stroke(color(Hue,Saturation - (Saturation - 250) * 2,Brightness)); else stroke(color(Hue,Saturation,Brightness));
if (Saturation > 250) if (Saturation > 500) fill(color(Hue,0,Brightness)); else fill(color(Hue,Saturation - (Saturation - 250) * 2,Brightness)); else fill(color(Hue,Saturation,Brightness));
rect(X, Y, Width, Height);
【问题讨论】:
好的,我期待有人现在有答案。 这一定是一个比我想象的更难的问题!我通常会在询问时间后 3-10 分钟得到答复! 很奇怪,它在 2.0b7 64x 中的三种模式中的任何一种都非常适合我。顺便说一句,非常酷和迷幻! 谢谢,我是这么认为的,运行的不是很好,但是不用OPENGL模式也可以运行。 【参考方案1】:我才发现只是我的显卡不支持OPENGL 2.0
【讨论】:
以上是关于处理 FrameBuffer 错误的主要内容,如果未能解决你的问题,请参考以下文章
OpenGL ARB_framebuffer_object 扩展不可用
UE4 iOS Metal FrameBufferFetchMRT
UE4 iOS Metal FrameBufferFetchMRT
WebGL渲染错误:GL_INVALID_FRAMEBUFFER_OPERATION: Draw framebuffer is incomplete