HOME FORUMS MEMBERS RECENT POSTS LOG IN  
× Авторизация
Имя пользователя:
Пароль:
Нет аккаунта? Регистрация
Баннер 1   Баннер 2
НОВЫЕ ТОРГОВАЯ НОВОСТИ ЧАТ
loading...
Скрыть
Вернуться   ANTICHAT > ПРОГРАММИРОВАНИЕ > С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby
   
Ответ
 
Опции темы Поиск в этой теме Опции просмотра

  #1  
Старый 22.04.2014, 05:19
TrollingYT
Новичок
Регистрация: 22.04.2014
Сообщений: 2
С нами: 6346883

Репутация: 0
По умолчанию

Hi guys i started today my first question .im new on the forum so...Today i wanna know if anyone know how to create a simple directx circle for add to the player head in sobeit.
 
Ответить с цитированием

  #2  
Старый 16.07.2014, 12:47
pabloko
Новичок
Регистрация: 03.03.2014
Сообщений: 6
С нами: 6418306

Репутация: 0
По умолчанию

Hi, you should handle a frame by frame drawing, just take a look into proxyIDirect3D9.cpp, you may user render-> to draw your stuff, since only DrawBox and DrawBoxi is defined in d3drender.cpp you should add DrawCircle method, that should look like this:

PHP:





Код:
void
DrawCircle
(
float mx
,
float my
,
float r
,
D3DCOLOR
colour
)
{
static
const
int
CIRCLE_RESOLUTION
=
10
;
D3DVertex verts
[
CIRCLE_RESOLUTION
]
;
for
(
int i
=
0
;
i

SetFVF
(
VERTEX_FVF
)
;
d3ddevice
-
>
DrawPrimitiveUP
(
D3DPT_TRIANGLEFAN
,
CIRCLE_RESOLUTION
-
2
,
verts
,
sizeof
(
D3DVertex
)
)
;
}




Then you should get the main actor camera CVector and the game Camera CVector, match them and draw what you want. As example for this you may want to look into clickwarp() method

PHP:





Код:
vecOrigin
=
*
pGame
-
>
GetCamera
(
)
-
>
GetCam
(
pGame
-
>
GetCamera
(
)
-
>
GetActiveCam
(
)
)
-
>
GetSource
(
)
;
.
.
.
.




You can do this drawing stuff at the end of renderHandler() method... skype: djmorpheox
 
Ответить с цитированием
Ответ





Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT ™ © 2001- Antichat Kft.