dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

texta ziimeeshana..

 
dev.gamez.lv Forum Index -> Microsoft DirectX
View previous topic :: View next topic  
Author Message
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Sat Sep 15, 2007 9:26 am    Post subject: texta ziimeeshana..

nu es pieliku klaat savaa dll'aa iespeeju ziimeet tekstu, bet taa nestraadaa! nu tad es iedomaajos, ka esmu nedaudz aizmirsis, ar kaadaam transformaacijaam texts jaaziimee! kaads vareetu atgaadinaat?

aa un kods:
DEFINE
Code:

LPD3DXFONT D3DFT_DefaultFont;

CREATE
Code:

D3DXCreateFont(d3ddev,16,0,0,1,false,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH | FF_DONTCARE,"Arial",&D3DFT_DefaultFont);

DRAW
Code:

RECT rct;
rct.left = 0;
rct.top = 0;
rct.right = 300;
rct.bottom = 200;
D3DFT_DefaultFont->DrawTextA(0,"STR",4,&rct,DT_CALCRECT,D3DCOLOR_XRGB(255,0,255));

viss kompileejas, bet textu neredz...
eww!!! nu toc neviens nezina?
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Sat Sep 15, 2007 12:31 pm    Post subject:

kad es panjemu no funkcijas to hresult par "long" paarveerstu, dabuuju skaitli 1241848
nu jaa nu HRESULT arii ir tas pats long... bet ko lai es ar to skaitli iesaaku?
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
Vecais_Dumais_Laacis
Guru
Guru


Joined: 29 Jan 2004
Posts: 800

PostPosted: Sat Sep 15, 2007 12:52 pm    Post subject:

a tev neshkjiet ka DT_CALCRECT tikai atgriezh rectangli kuru teksts aiznjem nevis ziimee?

negribi pirms lietoshanas reizeem arii palasiit ko tas kods, kuru tu no nezkurienes izrauj, arii dara?
_________________
...un ja bites buutu laachi...
Back to top
View user's profile
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Sat Sep 15, 2007 12:56 pm    Post subject:

bet man jau tas D3DXCreateFont dod to hresult erroru, liidz ziimeeshanai pat netiek!

aa un veelkas - a mozh var ielikt DT_LEFT | DT_CALCRECT? lai shis izreekjina un uzziimee uzreiz?
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
Vecais_Dumais_Laacis
Guru
Guru


Joined: 29 Jan 2004
Posts: 800

PostPosted: Sat Sep 15, 2007 1:51 pm    Post subject:

1) kam tev vajaga DT_CALCRECT?
2) ja flagos ir DT_CALCRECT tad tas noziimee ka drawtext neziimees neko uz ekraana bet tikai reekjinaas rectu.
3) tik mazs hresults itkaa nevareetu buut
4) pameegjini lietot MipLevels = 0
_________________
...un ja bites buutu laachi...
Back to top
View user's profile
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Sat Sep 15, 2007 2:14 pm    Post subject:

aha nu ja... kautko pamainiiju, iisti nezinu ko, bet izdevaas! izskataas, ka viss ok! izdomaaju, ka rect vienmeer buus backbuffera lielumaa lai nekas cauri neizlien...
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Sat Sep 15, 2007 2:19 pm    Post subject:

nu bet man (hehe jau atkal) ir kaada cita probleema...
es te pieliku pie cubemap klaat alpha ar DxTex tool'i bet man caurspiidiiguma vietaa ir melns! renderstate shaadi:
d3ddev->SetRenderState(D3DRS_LIGHTING,FALSE);//neattiecas uz probleemu
d3ddev->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_XRGB(255,255,255));//arii
d3ddev->SetRenderState(D3DRS_ZENABLE,TRUE);//arii
d3ddev->SetRenderState(D3DRS_ALPHATESTENABLE,TRUE);
d3ddev->SetRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
kurus veel vajag?
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Sat Sep 15, 2007 2:27 pm    Post subject:

oj shito es atcereejos:
src-srcalpha
dest-invsrcalpha
nu tad kaadu laiku probleemu man vairs nebuus Wink
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Sun Sep 16, 2007 10:05 pm    Post subject:

Ak dies.. tu pat 20 min nevari mierīgi pasēdēt un padomāt, pirms līst forumā bezjēdzīgus postus taisīt. Neesi joprojām sapratis, ka FORUMS nav tas pats, kas personīgais BLOGS?
Back to top
View user's profile Send e-mail
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Mon Sep 17, 2007 11:25 am    Post subject:

oops...
nu es vnk nevaru izdomaat, nu taa ar mani ir... blogu taisiit es noteikti neveelos! un vsp es jau netaisu 100+ topikus, posti ta veel taa nekas..
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
EDDY



Joined: 07 Oct 2005
Posts: 1610
Location: Dzimtā zeme, Latvija

PostPosted: Mon Sep 17, 2007 11:26 am    Post subject:

Tiešām Snake5, taisi sev blogu un mēs tur reizēm ielīdīsim un atbildēsim, ja ko zināsim (ja vien nebūsi paspējis pats izdomāt).
_________________
Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday
Back to top
View user's profile
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Mon Sep 17, 2007 11:31 am    Post subject:

man nepatiik daudz rakstiit! taapeec blogu netaisu... un man arii nav paaraak daudz, ko jautaat!
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
Kamazs
Guru
Guru


Joined: 17 Jan 2003
Posts: 829
Location: The glorious ancient city of Loja

PostPosted: Mon Sep 17, 2007 12:22 pm    Post subject:

Lai arī snake5 posti brīžiem izskatās kuriozi, tomēr, manuprāt, to esamība ir ļoti pozitīva -- nezinu kā jūs, bet es arvien kaut ko jaunu uzzinu no atbildēm uz šiem dažkārt šķietami primitīvajiem jautājumiem.

Tie ir jautājumi, kurus daudzi vienkārši neuzdrošinās uzdot, lai citi viņus neuzskatītu par muļķiem. Bet kauns jau nav nezināt, kauns ir negribēt zināt.

Tā gan bija tikai tāda liriska atkāpe, pārdomas. Protams, ka pirmajā postā uzdot jautājumu un pašam uz to atbildēt pēc 20 minūtēm nav pats labākais stils un snake5 tiešām varētu pats biežāk uzbrukt googlei, wikipedijai un gamedevnetam.
_________________
...un es uzskatu, ka Fallout ir etalons
Back to top
View user's profile Send e-mail Visit poster's website
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Mon Sep 17, 2007 3:20 pm    Post subject:

Kamazs wrote:
Tā gan bija tikai tāda liriska atkāpe, pārdomas. Protams, ka pirmajā postā uzdot jautājumu un pašam uz to atbildēt pēc 20 minūtēm nav pats labākais stils un snake5 tiešām varētu pats biežāk uzbrukt googlei, wikipedijai un gamedevnetam.
labi, centiishos!
vieniigais iznjeemums vareetu buut tad, kad es nezinu, kaa mekleet!
btw, esmu saacis iekraat visaadas gudras vai vnk forshas lietas vienaa mapee savaa kompii! nu tas taa, ja noder!
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
Display posts from previous:   
dev.gamez.lv Forum Index -> Microsoft DirectX All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group