About Store Forum Documentation Contact



Post Reply 
Render to texture
Author Message
tvsori Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
Rofar Offline
Member

Post: #2
RE: Render to texture
Not that this will help much but I believe there was an earlier post asking pretty much that same thing...

http://www.esenthel.com/community/showth...p?tid=6095
04-21-2013 01:51 AM
Find all posts by this user Quote this message in a reply
tvsori Offline
Member

Post: #3
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
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
Find all posts by this user Quote this message in a reply
tvsori Offline
Member

Post: #5
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Render to texture
Hello,

Sorry, 3D interfaces are currently not yet available.
04-25-2013 02:09 PM
Find all posts by this user Quote this message in a reply
Dalmat Offline
Member

Post: #7
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #8
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
Find all posts by this user Quote this message in a reply
Dalmat Offline
Member

Post: #9
RE: Render to texture
Got it, thanx! smile
02-11-2014 12:11 PM
Find all posts by this user Quote this message in a reply
Post Reply