Note Before Using Directx11

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

belkacem
Quite a regular
Quite a regular
Posts: 83
Joined: Fri Jan 07, 2011 13:55

Note Before Using Directx11

Postby belkacem » Sun Mar 20, 2011 10:33

Hello , Guys !

i have few notes to use cegui with directx11 and i think its very important .


1- When you create Dirct3D11 Device please pass D3D11_CREATE_DEVICE_BGRA_SUPPORT flag in D3D11CreateDeviceAndSwapChain() function because this flag using to connect Direct3D11 With any 2D Library
and if you don't pass this flag , you will fal to render CEGUI.

Code: Select all


D3D11CreateDeviceAndSwapChain ( NULL , D3D_DRIVER_TYPE_HARDWARE , NULL  ,  /*other flag her*/| D3D11_CREATE_DEVICE_BGRA_SUPPORT, Feature_Level_List
                         ,_Number_Feature_Level_List , D3D11_SDK_VERSION , &_Swp_Chain_desc,&_SwapChain,&_Device ,&_featureLevel , &_DeviceContext );




2- call CEGUISystem::getSingleton().renderGUI() in Render Loop Like This to Wok correctly . if you call it out the Render Loop you will Fail To Render It

Code: Select all

void Render()
{
   float Color [4] = { 0.0f , 0.0f , 0.0f , 0.5f };
   Device->Get_DeviceContext()->ClearRenderTargetView ( Device->Get_Target() , Color );
   System::getSingleton().renderGUI();
   Device->Get_SwapChain()->Present ( 0 , 0 );
}



3-We must rebuild CEGUI with effect11.lib that come with directx SDK , but you need to compile the lib before you recompile CEGUI


in the end , any error or wrong idea please share it with us ,

and i want to upload few tutorial how to use CEGUI Direct3D 10 , 11 , 9 , so please where i can do it in the forum

User avatar
Mikademus
CEGUI MVP
CEGUI MVP
Posts: 130
Joined: Wed Mar 18, 2009 19:14

Re: Note Before Using Directx11

Postby Mikademus » Sun Mar 20, 2011 11:07

This sounds like a perfect candidate for a Wiki article :)

shenhui
Just popping in
Just popping in
Posts: 10
Joined: Thu Feb 17, 2011 06:36

Re: Note Before Using Directx11

Postby shenhui » Tue Oct 30, 2012 13:15

Hi

Could you share your tutorial on how to use D3D11 in CEGUI ?

Thanks a lot.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 12 guests