tvsori
Member
|
Render to texture
Hello,
Sorry for my stupid question.
I started to test EE and here is first question:
In Render to Texture example I found how to draw 3d objects, but how to draw text to texture ?
Here is part of sample code:
Code:
void Render()
{
switch(Renderer())
{
case RM_PREPARE:
{
box .draw(MatrixIdentity);
ball.draw(MatrixIdentity);
//D.text(0, 0, "Text"); <-- what should I put here to draw text onto texture ???
LightPoint(25, Vec(0, 3, 0)).add();
}break;
}
}
D.text doesn't draw anything
|
|
04-21-2013 01:37 AM |
|
Rofar
Member
|
|
04-21-2013 01:51 AM |
|
tvsori
Member
|
RE: Render to texture
Thank you for pointing.
Looks like question is unanswered. May be EE doesn't support render text to texture (actually draw).
Esenthel told something about D.fxBegin(), but I can't find any sample how to use and also looks like this function pair (fxBegin/fxEnd) make full screen Image (probably full size back buffer).
I believe it's very inefficient to draw 1 "hello" word - probably Esenthel has (or have to implement) something else.
PS: Sure, I found sample - 2D Effects and debugged with Xcode
Code:
D.fxBegin(true); // start drawing to helper screen
logo->drawFs(); // image draw
C Image &fx=D.fxEnd(); // restore default screen drawing, and access the helper screen
Image fx has 800x600 resolution :(
(This post was last modified: 04-21-2013 02:51 AM by tvsori.)
|
|
04-21-2013 02:42 AM |
|
Esenthel
Administrator
|
RE: Render to texture
Hello,
The back buffer RT for fxBegin is sized as your window resolution. It's intended for full screen 2D effects.
If you want to achieve different effect please describe it.
Perhaps it can be done without the need for RT?
|
|
04-22-2013 10:35 AM |
|
tvsori
Member
|
RE: Render to texture
Actually I'm just thinking about ingame dynamic 3D user interface on different 3D surfaces. For example chat messages with ability to copy,paste and edit text. May be make bump for text or reflection/lighting...
Will accept any hints or ideas.
|
|
04-22-2013 12:00 PM |
|
Esenthel
Administrator
|
RE: Render to texture
Hello,
Sorry, 3D interfaces are currently not yet available.
|
|
04-25-2013 02:09 PM |
|
Dalmat
Member
|
RE: Render to texture
We would like to make the same thing, is it possible with a new shader? one that renders text to texture?
|
|
02-10-2014 11:45 AM |
|
Esenthel
Administrator
|
RE: Render to texture
Hello,
The only recommended solution as of right now for 2D drawing, is to use D.fxBegin fxEnd, other solutions at the moment are not supported.
|
|
02-10-2014 09:37 PM |
|