00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __SP_RENDERER_OPENGLES1_H__
00009 #define __SP_RENDERER_OPENGLES1_H__
00010
00011
00012 #include "Base/spStandard.hpp"
00013
00014 #if defined(SP_COMPILE_WITH_OPENGLES1)
00015
00016
00017 #include "RenderSystem/OpenGL/spOpenGLPipelineFixed.hpp"
00018 #include "RenderSystem/OpenGLES/spOpenGLES1Texture.hpp"
00019
00020
00021 namespace sp
00022 {
00023 namespace video
00024 {
00025
00026
00028 class SP_EXPORT OpenGLES1RenderSystem : public GLFixedFunctionPipeline
00029 {
00030
00031 public:
00032
00033 OpenGLES1RenderSystem();
00034 ~OpenGLES1RenderSystem();
00035
00036
00037
00038 io::stringc getVersion() const;
00039
00040 bool queryVideoSupport(const EVideoFeatureQueries Query) const;
00041
00042
00043
00044 void setupConfiguration();
00045
00046
00047
00048 void setupMaterialStates(const MaterialStates* Material);
00049
00050
00051
00052 void drawMeshBuffer(const MeshBuffer* MeshBuffer);
00053
00054
00055
00056 void draw2DImage(
00057 Texture* Tex, const dim::point2di &Position, const color &Color = color(255)
00058 );
00059
00060 void draw2DImage(
00061 Texture* Tex, const dim::rect2di &Position,
00062 const dim::rect2df &Clipping = dim::rect2df(0.0f, 0.0f, 1.0f, 1.0f),
00063 const color &Color = color(255)
00064 );
00065
00066 void draw2DImage(
00067 Texture* Tex, const dim::point2di &Position, f32 Rotation, f32 Radius, const color &Color = color(255)
00068 );
00069
00070 void draw2DImage(
00071 Texture* Tex,
00072 const dim::point2di &lefttopPosition,
00073 const dim::point2di &righttopPosition,
00074 const dim::point2di &rightbottomPosition,
00075 const dim::point2di &leftbottomPosition,
00076 const dim::point2df &lefttopClipping = dim::point2df(0.0f, 0.0f),
00077 const dim::point2df &righttopClipping = dim::point2df(1.0f, 0.0f),
00078 const dim::point2df &rightbottomClipping = dim::point2df(1.0f, 1.0f),
00079 const dim::point2df &leftbottomClipping = dim::point2df(0.0f, 1.0f),
00080 const color &lefttopColor = color(255),
00081 const color &righttopColor = color(255),
00082 const color &rightbottomColor = color(255),
00083 const color &leftbottomColor = color(255)
00084 );
00085
00086
00087
00088 void draw2DLine(
00089 const dim::point2di &PositionA, const dim::point2di &PositionB, const color &Color = 255
00090 );
00091 void draw2DLine(
00092 const dim::point2di &PositionA, const dim::point2di &PositionB, const color &ColorA, const color &ColorB
00093 );
00094
00095 void draw2DRectangle(
00096 const dim::rect2di &Rect, const color &Color = 255, bool isSolid = true
00097 );
00098 void draw2DRectangle(
00099 const dim::rect2di &Rect, const color &lefttopColor, const color &righttopColor,
00100 const color &rightbottomColor, const color &leftbottomColor, bool isSolid = true
00101 );
00102
00103
00104
00105 void draw2DPolygon(
00106 const ERenderPrimitives Type, const scene::SPrimitiveVertex2D* VerticesList, u32 Count
00107 );
00108
00109
00110
00111 void draw3DPoint(
00112 const dim::vector3df &Position, const color &Color = 255
00113 );
00114 void draw3DLine(
00115 const dim::vector3df &PositionA, const dim::vector3df &PositionB, const color &Color = 255
00116 );
00117 void draw3DLine(
00118 const dim::vector3df &PositionA, const dim::vector3df &PositionB, const color &ColorA, const color &ColorB
00119 );
00120 void draw3DTriangle(
00121 Texture* hTexture, const dim::triangle3df &Triangle, const color &Color = 255
00122 );
00123
00124 private:
00125
00127 void drawPrimitiveList(
00128 const ERenderPrimitives Type,
00129 const scene::SMeshVertex3D* Vertices, u32 VertexCount, const void* Indices, u32 IndexCount,
00130 const TextureLayerListType* TextureLayers
00131 );
00132
00133 };
00134
00135
00136 }
00137
00138 }
00139
00140
00141 #endif
00142
00143 #endif
00144
00145
00146
00147