Comments (3)
It would be nice if you posted some code that showed this problem (i.e. a minimal test case). I have a suspicion it might be cache-related.
from citro3d.
I apologize, but I wasn't on my desktop when I posted this and had its GPU have an issue to solve this morning. Let me get the code for you real quick:
//canvas.cpp
const char * Canvas::Init(int width, int height)
{
this->width = width;
this->height = height;
this->texture = new love::Image();
this->texture->BasicInit(width, height);
this->target = new love::CRenderTarget(this->texture, this->texture->NextPow2(width), this->texture->NextPow2(height));
return nullptr;
}
//CRendertarget.cpp
CRenderTarget::CRenderTarget(love::Image * texture, int width, int height)
{
this->target = C3D_RenderTargetCreateFromTex(texture->GetTexture(), GPU_TEXFACE_2D, 0, GPU_RB_DEPTH24_STENCIL8);
Mtx_Ortho(&this->projection, 0.0, width, 0.0, height, 0.0, 1.0, true);
}
//Image.cpp
void Image::BasicInit(int width, int height)
{
this->texture = new C3D_Tex();
this->width = width;
this->height = height;
C3D_TexInit(this->texture, this->NextPow2(width), this->NextPow2(height), GPU_RGBA8);
C3D_TexSetFilter(this->texture, magFilter, minFilter);
C3D_TexSetWrap(this->texture, GPU_CLAMP_TO_BORDER, GPU_CLAMP_TO_BORDER);
}
//Graphics.cpp
int Graphics::SetCanvas(lua_State * L)
{
if (!lua_isnoneornil(L, 1))
{
Canvas * self = (Canvas *)luaobj_checkudata(L, 1, LUAOBJ_TYPE_CANVAS);
if (self->GetTarget()->GetTarget() == nullptr)
return 0;
//resetPool();
C3D_FrameBegin(C3D_FRAME_SYNCDRAW);
C3D_FrameDrawOn(self->GetTarget()->GetTarget());
C3D_FVUnifMtx4x4(GPU_VERTEX_SHADER, projection_desc, self->GetProjection());
lastCanvas = self;
}
else
{
if (lastCanvas != nullptr)
C3D_FrameEnd(0);
}
return 0;
}
Edit: added the rendertarget creation code and fixed the indentations
from citro3d.
Sorry to bug you, but has there been any progress on finding the cause?
from citro3d.
Related Issues (20)
- Multiple textures point to the same buffer HOT 2
- Binding programs without drawing anything can result in inconsistent uniform state HOT 2
- Offscreen Rendertargets HOT 14
- strange soft lock HOT 3
- C3D_TexEnvOp() regarding alpha channel - writing into wrong spots HOT 5
- Using GX / GXQueue functions while using Citro3D HOT 2
- example not working and help needed HOT 3
- text3ds.c fails when attempting to 'make install' HOT 2
- Question about BufInfo_Add() from C3D HOT 2
- parallel calls to C3D_SyncDisplayTransfer and gspWaitForVBlank cause lockup HOT 2
- Question: Is it possible to change a render target's frame buffer format mid-program? HOT 3
- Latest update slowed down drawing by ~50% HOT 2
- Crash when switching from non-800px mode to 800px mode? HOT 1
- Hangs When Using Geometry Shader In Combination With 3D Drawing
- Questions regarding Mtx_Translate() HOT 11
- [Hardware Quirk] GPU hangs if one shader program has a geo component and the other doesn't HOT 3
- [Hardware Quirk] BufInfo_Add stride behaves strangely on hardware HOT 1
- How to enable C3D_FRAME_SYNCDRAW while still keeping 60fps HOT 1
- is C3D_FrameBufTransfer a blit operation ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citro3d.