Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

We can do something now =P

Sign in to follow this  


Hi my friends...

After this late in post here...

I bring some news...

The PLabel class supports the Outline Fonts, Bitmap Fonts and Texture mapped fonts..

the PPanel class is almost done, it's working now, except by some details that I'll implement tomorrow, like caption align, borders visible, etc...

the PGraphicObjectCollection is dead...it just brought me problems...

PPanel : PInputEventReceiver

PLabel* FCaption;
SColor* FBackgroundColor;
SColor* FBorderColor;

std::string FTextureFileName;

unsigned int FTexture;
unsigned int FDisplayListRectWireFrame;
unsigned int FDisplayListRect;
unsigned int FDisplayListRectTexture;

int FBorderWidth;
int FRectType;
bool FFilled;
PPanel(SRect* ABounds, int ARectType, IVideoDriver* AVideoDriver);

PLabel* GetCaption(void);
void SetCaption(PLabel* AValue);

SColor* GetBackgroundColor(void);
void SetBackgroundColor(SColor* AValue);

SColor* GetBorderColor(void);
void SetBorderColor(SColor* AValue);

std::string GetTextureFileName(void);
void SetTextureFileName(std::string AValue);

int GetBorderWidth(void);
void SetBorderWidth(int AValue);

bool GetFilled(void);
void SetFilled(bool AValue);

void PrepareToDraw(void);

void Draw(void);

The IVideoDriver have some new methods too

virtual AUX_RGBImageRec* LoadBMPRec(std::string AFileName) = 0;

virtual void SetBlend(bool AValue) = 0;
virtual void SetTexture(bool AValue) = 0;

virtual unsigned int GenerateDisplayList(int AListSize) = 0;
virtual void CallDisplayList(unsigned int ADisplayList) = 0;
virtual void DestroyDisplayList(unsigned int ADisplayList, int ASize) = 0;

virtual void LoadTexture(std::string AFileName, unsigned int &ATextureBuffer, int ATextureType) = 0;
virtual void BindTexture(unsigned int ATextureBuffer) = 0;

virtual void DrawText(std::string AText, float ASize, SColor* AColor, SCoord* ACoord, unsigned int ADisplayList, int AFontType) = 0;

virtual unsigned int GenerateDisplayListRectWireFrame(SRect* ABounds, SColor* ABorderColor, int ABorderWidth) = 0;
virtual unsigned int GenerateDisplayListRect(SRect* ABounds, SColor* ABackgroundColor) = 0;
virtual unsigned int GenerateDisplayListRectTexture(SRect* ABounds, SColor* AColor) = 0;

I'm using display list for everything, if someone has any suggestion in how I can approach the performance...tell me...

I have made a little demo with two panels and one running label to show the use of layers and what we have until now:

Predator Engine Demo

well...I hope you like the system...

I think that our next step is make some buttons..right?

see ya
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!