About Store Forum Documentation Contact



Post Reply 
D.full ??
Author Message
Jben Offline
Member

Post: #1
D.full ??
Hello What does D.full(true); ??

Fullscreen ?
What does = D
(This post was last modified: 06-28-2011 11:24 AM by Jben.)
06-28-2011 11:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: D.full ??
it switches to fullscreen mode
06-28-2011 12:54 PM
Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #3
RE: D.full ??
ok but the object "D" ??

and

Bool Update()
{
return true;
}
void Draw()
{
}



How come these two functions are empty in main.ccp?
06-28-2011 01:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: D.full ??
please check comments on "D" and its class in headers

Quote:How come these two functions are empty in main.ccp?
because they are unused
06-28-2011 01:03 PM
Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #5
RE: D.full ??
I am talking here about the MMO,
where D is instanciated ?
And where updates and drawing are done if not in the Update and Draw functions ?
06-28-2011 01:08 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Morto Offline
Member

Post: #6
RE: D.full ??
lindsay²

i don't think you need to update or draw the display it self, you need to update things and then send them to the display, sending things to display is done in the "Draw()".
usually you do something like this
D.text(0,0,"Hello world);

D.full(); is just a ON/OFF switch for full screen, as there is many other ON/OFF available calls.

maybe i am not getting you question right but, when you set D.full(true); it automatically goes full screen, you don't need to update or draw it.

i took the time to edit the tutorial 1.
pressing space will switch from window to full screen.

Code:
/******************************************************************************/
#include "stdafx.h" // include precompiled header
/******************************************************************************/
void InitPre() // init before engine inits
{
   // here you will have to setup initial engine settings
   // like application name, its options, screen resolution...

   App.name("Start");              // application name
   Paks.add("../../data/engine.pak"); // load engine data
   D.sync(true);                   // enable screen synchronization
}
/******************************************************************************/
Bool Init() // initialize after engine is ready
{
   // here when engine will be ready you can load your game data
   // return false when error occured

   return true;
}
/******************************************************************************/
void Shut() // shut down at exit
{
   // this is called when the engine is about to exit
}
/******************************************************************************/
Bool Update() // main updating
{
   // here you have to process each frame update

   if(Kb.bp(KB_ESC))return false; // exit if escape on the keyboard pressed
   return true;                   // continue
}
/******************************************************************************/
void Draw() // main drawing
{
   // here you have to tell engine what to draw on the screen

   D.clear(TURQ);                                                                        // clear screen to turquoise color
   D.text (0, 0.1f,"This is the First Tutorial");                                        // draw text at (0, 0.1) position
   D.text (0,-0.1f,"Replace the CPP with some other file to view a different Tutorial"); // draw text at (0,-0.1) position
   if(Kb.bp(KB_SPACE))
      D.full(!D.full());
}
/******************************************************************************/
(This post was last modified: 06-28-2011 02:55 PM by Morto.)
06-28-2011 02:46 PM
Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #7
RE: D.full ??
It's ok it helps me. Thank you.
06-28-2011 03:06 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #8
RE: D.full ??
ambPower
hpRt
shdSoft

???
06-28-2011 06:17 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Morto Offline
Member

Post: #9
RE: D.full ??
hi,

yet again those are variables that you can set for the display, in this case floats/bool.
please read the comments on "Display.h", Esenthel does have good comments.

Display& ambPower ( Flt power ); Flt ambPower () {return _amb_color.avg();} // set/get Ambient Power ( 0..1 , default= 0.4), this is equivalent to using ambColor with RGB components set to the same value

Display& hpRt (Bool hp_rt ); Bool hpRt () {return _hp_rt ;} // set/get High Precision Render Targets (true/false , default= false )

....
(This post was last modified: 06-28-2011 06:24 PM by Morto.)
06-28-2011 06:23 PM
Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #10
RE: D.full ??
Ok thank. but i didn't know where to look at. Display.h, ok ^^
What didn't know what "D" is.
(This post was last modified: 06-28-2011 06:33 PM by Jben.)
06-28-2011 06:27 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Morto Offline
Member

Post: #11
RE: D.full ??
D is the instance of the class Display.
commented in display.h
06-28-2011 06:58 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #12
RE: D.full ??
06-29-2011 10:37 PM
Find all posts by this user Quote this message in a reply
Jben Offline
Member

Post: #13
RE: D.full ??
Thank !
07-01-2011 11:13 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply