Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _GRAPHICCORE_H
- #define _GRAPHICCORE_H
- #include <stdio.h>
- #include <stdlib.h>
- #include <pspkernel.h>
- #include <pspdebug.h>
- #include <pspdisplay.h>
- #include <pspaudio.h>
- #include <psprtc.h>
- #include <png.h>
- #include <string>
- #include "BasicTypes.h"
- //------------------------------------------------------------------------------------------------
- class GraphicCore
- {
- private:
- bool mVsync;
- int mSwizzle;
- int mTexCounter;
- int mCurrentTex;
- int mCurrentBlend;
- PIXEL_TYPE* mVRAM;
- u32 mVideoBufferStart;
- u32 mCurrentPointer;
- public:
- GraphicCore();
- virtual ~GraphicCore();
- static GraphicCore * GetInstance();
- void Init();
- void Destroy();
- void BeginRender();
- void EndRender();
- void RenderQuad(Quad* quad, float xo, float yo,
- float angle = 0.0f, float xScalexScale = 1.0f, float yScale = 1.0f);
- void FillRect(int x, int y, int width, int height, PIXEL_TYPE color);
- void DrawLine(int x1, int y1, int x2, int y2, PIXEL_TYPE color);
- void Plot(int x, int y, PIXEL_TYPE color);
- void PlotArray(float * x, float * y, int count, PIXEL_TYPE color);
- void ScreenShot(const char* filename);
- Texture * LoadTexture(const char* filename, bool useVideoRAM = false);
- Texture * LoadTexture(String filename, bool useVideoRAM = false)
- {
- return LoadTexture(filename.c_str());
- }
- void ClearScreen(PIXEL_TYPE color);
- void EnableVSync(bool flag) { mVsync = flag; }
- void ResetPrivateVRAM() { mCurrentPointer = mVideoBufferStart; }
- String LoadFile(String filename);
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement