move all graphics API calls into RageDisplay_*
This commit is contained in:
@@ -11,7 +11,6 @@
|
|||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include "ModelManager.h"
|
#include "ModelManager.h"
|
||||||
#include "SDL_opengl.h"
|
|
||||||
|
|
||||||
const float FRAMES_PER_SECOND = 30;
|
const float FRAMES_PER_SECOND = 30;
|
||||||
const CString DEFAULT_ANIMATION_NAME = "default";
|
const CString DEFAULT_ANIMATION_NAME = "default";
|
||||||
@@ -425,12 +424,12 @@ bool Model::EarlyAbortDraw()
|
|||||||
void Model::DrawCelShaded()
|
void Model::DrawCelShaded()
|
||||||
{
|
{
|
||||||
this->SetGlow(RageColor(0,0,0,1));
|
this->SetGlow(RageColor(0,0,0,1));
|
||||||
glPolygonMode (GL_BACK, GL_LINE);
|
DISPLAY->SetPolygonMode( POLYGON_LINE );
|
||||||
glLineWidth(4.0f);
|
DISPLAY->SetLineWidth( 4 );
|
||||||
this->Draw();
|
this->Draw();
|
||||||
DISPLAY->ClearZBuffer();
|
DISPLAY->ClearZBuffer();
|
||||||
this->SetGlow(RageColor(1,1,1,0));
|
this->SetGlow(RageColor(1,1,1,0));
|
||||||
glPolygonMode(GL_BACK, GL_FILL);
|
DISPLAY->SetPolygonMode( POLYGON_FILL );
|
||||||
this->Draw();
|
this->Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -232,6 +232,10 @@ public:
|
|||||||
|
|
||||||
void DrawQuad( const RageSpriteVertex v[] ) { DrawQuads(v,4); } /* alias. upper-left, upper-right, lower-left, lower-right */
|
void DrawQuad( const RageSpriteVertex v[] ) { DrawQuads(v,4); } /* alias. upper-left, upper-right, lower-left, lower-right */
|
||||||
|
|
||||||
|
// hacks for cell-shaded models
|
||||||
|
virtual void SetPolygonMode( PolygonMode pm ) {}
|
||||||
|
virtual void SetLineWidth( int iWidth ) {}
|
||||||
|
|
||||||
enum GraphicsFileFormat
|
enum GraphicsFileFormat
|
||||||
{
|
{
|
||||||
SAVE_LOSSLESS, // bmp
|
SAVE_LOSSLESS, // bmp
|
||||||
|
|||||||
@@ -1814,6 +1814,23 @@ void RageDisplay_OGL::UpdateTexture(
|
|||||||
delete img;
|
delete img;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RageDisplay_OGL::SetPolygonMode( PolygonMode pm )
|
||||||
|
{
|
||||||
|
GLenum m;
|
||||||
|
switch( pm )
|
||||||
|
{
|
||||||
|
case POLYGON_FILL: m = GL_FILL; break;
|
||||||
|
case POLYGON_LINE: m = GL_LINE; break;
|
||||||
|
default: ASSERT(0); return;
|
||||||
|
}
|
||||||
|
glPolygonMode( GL_FRONT_AND_BACK, m );
|
||||||
|
}
|
||||||
|
|
||||||
|
void RageDisplay_OGL::SetLineWidth( int iWidth )
|
||||||
|
{
|
||||||
|
glLineWidth( iWidth );
|
||||||
|
}
|
||||||
|
|
||||||
CString RageDisplay_OGL::GetTextureDiagnostics( unsigned id ) const
|
CString RageDisplay_OGL::GetTextureDiagnostics( unsigned id ) const
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@@ -65,6 +65,10 @@ public:
|
|||||||
RageCompiledGeometry* CreateCompiledGeometry();
|
RageCompiledGeometry* CreateCompiledGeometry();
|
||||||
void DeleteCompiledGeometry( RageCompiledGeometry* p );
|
void DeleteCompiledGeometry( RageCompiledGeometry* p );
|
||||||
|
|
||||||
|
// hacks for cell-shaded models
|
||||||
|
virtual void SetPolygonMode( PolygonMode pm );
|
||||||
|
virtual void SetLineWidth( int iWidth );
|
||||||
|
|
||||||
CString GetTextureDiagnostics( unsigned id ) const;
|
CString GetTextureDiagnostics( unsigned id ) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Reference in New Issue
Block a user