mirror of https://github.com/buggins/dlangui.git
fixes for #183
This commit is contained in:
parent
698e3bc36e
commit
d882a203c0
|
@ -118,7 +118,7 @@ string glerrorToString(in GLenum err) pure nothrow {
|
|||
}
|
||||
|
||||
|
||||
class GLProgram : dlangui.graphics.scene.effect.GraphicsEffect {
|
||||
class GLProgram : dlangui.graphics.scene.mesh.GraphicsEffect {
|
||||
@property abstract string vertexSource();
|
||||
@property abstract string fragmentSource();
|
||||
protected GLuint program;
|
||||
|
|
|
@ -9,22 +9,6 @@ import dlangui.graphics.glsupport;
|
|||
import dlangui.graphics.gldrawbuf;
|
||||
import dlangui.graphics.scene.mesh;
|
||||
|
||||
/// Base class for graphics effect / program - e.g. for OpenGL shader program
|
||||
abstract class GraphicsEffect : RefCountedObject {
|
||||
/// get location for vertex attribute
|
||||
int getVertexElementLocation(VertexElementType type);
|
||||
|
||||
void setUniform(string uniformName, mat4 matrix);
|
||||
|
||||
void setUniform(string uniformName, vec2 vec);
|
||||
|
||||
void setUniform(string uniformName, vec3 vec);
|
||||
|
||||
void setUniform(string uniformName, vec4 vec);
|
||||
|
||||
void draw(Mesh mesh);
|
||||
}
|
||||
|
||||
/// Reference counted Effect object
|
||||
alias EffectRef = Ref!Effect;
|
||||
|
||||
|
|
|
@ -8,6 +8,23 @@ import dlangui.graphics.scene.effect;
|
|||
/// Reference counted Mesh object
|
||||
alias MeshRef = Ref!Mesh;
|
||||
|
||||
/// Base class for graphics effect / program - e.g. for OpenGL shader program
|
||||
abstract class GraphicsEffect : RefCountedObject {
|
||||
/// get location for vertex attribute
|
||||
int getVertexElementLocation(VertexElementType type);
|
||||
|
||||
void setUniform(string uniformName, mat4 matrix);
|
||||
|
||||
void setUniform(string uniformName, vec2 vec);
|
||||
|
||||
void setUniform(string uniformName, vec3 vec);
|
||||
|
||||
void setUniform(string uniformName, vec4 vec);
|
||||
|
||||
void draw(Mesh mesh);
|
||||
}
|
||||
|
||||
|
||||
/// vertex element type
|
||||
enum VertexElementType : ubyte {
|
||||
POSITION = 1,
|
||||
|
|
Loading…
Reference in New Issue