mirror of
https://github.com/edubart/otclient.git
synced 2025-10-18 21:43:26 +02:00
experimental minimap
* a lot of rework in MapView * new APIs for UIMap
This commit is contained in:
@@ -76,6 +76,8 @@ void Graphics::init()
|
||||
|
||||
#endif
|
||||
|
||||
glHint(GL_LINE_SMOOTH_HINT,GL_NICEST);
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST);
|
||||
glEnable(GL_BLEND);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
@@ -99,8 +101,6 @@ bool Graphics::parseOption(const std::string& option)
|
||||
m_generateMipmaps = false;
|
||||
else if(option == "-no-smoothing")
|
||||
m_useBilinearFiltering = false;
|
||||
else if(option == "-realtime-mipmapping")
|
||||
m_generateRealtimeMipmaps = true;
|
||||
else if(option == "-no-hardware-buffering")
|
||||
m_useHardwareBuffers = false;
|
||||
else
|
||||
|
@@ -38,7 +38,6 @@ public:
|
||||
bool canUseHardwareBuffers() { return m_useHardwareBuffers; }
|
||||
bool canGenerateMipmaps() { return m_generateMipmaps; }
|
||||
bool canGenerateHardwareMipmaps() { return m_generateHardwareMipmaps; }
|
||||
bool canGenerateRealtimeMipmaps() { return m_generateRealtimeMipmaps; }
|
||||
|
||||
void resize(const Size& size);
|
||||
void beginRender();
|
||||
@@ -59,7 +58,6 @@ private:
|
||||
Boolean<true> m_useBilinearFiltering;
|
||||
Boolean<true> m_generateMipmaps;
|
||||
Boolean<true> m_generateHardwareMipmaps;
|
||||
Boolean<false> m_generateRealtimeMipmaps;
|
||||
};
|
||||
|
||||
extern Graphics g_graphics;
|
||||
|
@@ -33,6 +33,8 @@ public:
|
||||
Color() : m_r(1.0f), m_g(1.0f), m_b(1.0f), m_a(1.0f) { }
|
||||
Color(uint32 rgba) { setRGBA(rgba); }
|
||||
Color(uint8 r, uint8 g, uint8 b, uint8 a = 0xFF) : m_r(r/255.0f), m_g(g/255.0f), m_b(b/255.0f), m_a(a/255.0f) { }
|
||||
Color(int r, int g, int b, int a = 0xFF) : m_r(r/255.0f), m_g(g/255.0f), m_b(b/255.0f), m_a(a/255.0f) { }
|
||||
Color(float r, float g, float b, float a = 1.0f) : m_r(r), m_g(g), m_b(b), m_a(a) { }
|
||||
|
||||
uint8 a() const { return m_a*255.0f; }
|
||||
uint8 b() const { return m_b*255.0f; }
|
||||
|
Reference in New Issue
Block a user