- Joined
- Feb 2, 2012
- Messages
- 1,667
- Reaction score
- 104
- Points
- 78
Hi all,
I'm trying to get some displays around my VC working but without much luck. Nothing special, I just want some text to appear on them (such as Ummu situation, cargo situation etc.). I read many threads around the forum, and got some small results, but still far far away from what it should be...
So basically I'm rendering a custom display on a dedicated mesh, made by two triangles, with the proper uv coordinates and the texture (256x256 24 bit) with the flag D in the mesh file...
then, collecting what I saw around I did this:
declared as public
then in clbkSetClassCaps I initialized the sketchpad item with the test text:
then il clbkloadVC
and in clbkVCRedrawEvent
the only way to see something is to do the double blt...
anyway I get ths with the inline:
and a black screen with the D3D9
...
Any help would be MUCH appreciated!
:tiphat:
---------- Post added at 04:25 PM ---------- Previous post was at 11:19 AM ----------
I just found out that I have the same result in D3D9, the surface is only much darker, but it looks exactly the same.
I'm trying to get some displays around my VC working but without much luck. Nothing special, I just want some text to appear on them (such as Ummu situation, cargo situation etc.). I read many threads around the forum, and got some small results, but still far far away from what it should be...
So basically I'm rendering a custom display on a dedicated mesh, made by two triangles, with the proper uv coordinates and the texture (256x256 24 bit) with the flag D in the mesh file...
then, collecting what I saw around I did this:
declared as public
Code:
SURFHANDLE screen,testsc;
then in clbkSetClassCaps I initialized the sketchpad item with the test text:
Code:
testsc=oapiCreateTextureSurface(256,256);
oapi::Sketchpad *skp = oapiGetSketchpad (testsc);
skp->SetOrigin(0,0);
skp->SetBackgroundColor(0x00FFFF);
skp->SetTextColor(0xFFFFFF);
skp->Text(10,10,"CIAO",4);
oapiReleaseSketchpad(skp);
then il clbkloadVC
Code:
screen=oapiGetTextureHandle(msh_h[5],1);
oapiVCRegisterArea(TESTDISP,_R(0, 256,256,0),PANEL_REDRAW_ALWAYS,PANEL_MOUSE_IGNORE,PANEL_MAP_NONE,screen);
and in clbkVCRedrawEvent
Code:
if(id==TESTDISP)
{
oapiBlt(screen, testsc, 0,0,0,0, 256, 256);
oapiBlt(testsc, surf, 0,0,0,0, 256, 256);
return true;
}
the only way to see something is to do the double blt...
anyway I get ths with the inline:
and a black screen with the D3D9
...
Any help would be MUCH appreciated!
:tiphat:
---------- Post added at 04:25 PM ---------- Previous post was at 11:19 AM ----------
I just found out that I have the same result in D3D9, the surface is only much darker, but it looks exactly the same.