coneneko.units

render stateはdetachで値を修復しておく。 textureやshaderなど、他に影響を与えるものもdetachで修復しておく。 他に影響を与えないものは、修復しなくてもいい。

class Viewport: coneneko.scenegraph.Unit;


int x;


int y;


int width;


int height;


this(int x, int y, int width, int height);


class Perspective: coneneko.scenegraph.Unit;


double fovy;


double aspect;


double zNear;


double zFar;


this(double fovy, double aspect, double zNear, double zFar);


class MatrixMode: coneneko.scenegraph.Unit;


int mode;


this(uint mode);
GL_MODELVIEW GL_PROJECTION GL_TEXTURE

class LoadIdentity: coneneko.scenegraph.Unit;


class Clear: coneneko.scenegraph.Unit;
GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT GL_ACCUM_BUFFER_BIT GL_STENCIL_BUFFER_BIT

uint mask;


this();
GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT

this(uint mask);


class ClearColor: coneneko.scenegraph.Unit;


float red;


float green;


float blue;


float alpha;


this(float red = 0F, float green = 0F, float blue = 0F, float alpha = 0F);


class Enable: coneneko.scenegraph.Unit;


uint cap;


this(uint cap);


class CullFace: coneneko.scenegraph.Unit;


uint mode;


this(uint mode);
GL_FRONT GL_BACK GL_FRONT_AND_BACK

class Rotate: coneneko.scenegraph.Unit;


float angle;


float x;


float y;


float z;


this(float angle, float x, float y, float z);


class Translate: coneneko.scenegraph.Unit;


float x;


float y;


float z;


this(float x, float y, float z);


void glErrorCheck(char[] file, long line, Object obj = cast(Object)null, char[] msg = null);
エラーが発生していたら、throw new ConenekoException(_FILE__, _LINE__, this, "message");

class Texture: coneneko.scenegraph.Unit, coneneko.scenegraph.Rgba;
使い終わったらdelete

protected final uint handle;


this(Rgba rgba, uint index);


this(uint width, uint height, uint[] pixels, uint index);


protected int internalformat();
GL_RGBA8

protected uint dataType();
GL_UNSIGNED_BYTE

class LoadMatrix: coneneko.scenegraph.Unit;


Matrix matrix;


this(Matrix matrix);


class MultMatrix: coneneko.scenegraph.Unit;


Matrix matrix;


this(Matrix matrix);


class BlendFunc: coneneko.scenegraph.Unit;


uint sfactor;


uint dfactor;


this();
GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA

this(uint sfactor, uint dfactor);


class VertexBuffer: coneneko.scenegraph.Unit;
使ったらdelete

this(void[] data);


class PositionBuffer: coneneko.units.VertexBuffer;


this(float[] positions);
float3

class ColorBuffer: coneneko.units.VertexBuffer;


this(float[] rgba);
float4

class NormalBuffer: coneneko.units.VertexBuffer;


this(float[] normals);
float3

class TexCoordBuffer: coneneko.units.VertexBuffer;


this(float[] texCoords);
float2

class AttributeBuffer: coneneko.units.VertexBuffer;


uint location;
shaderのglGetAttribLocationARB

this(void[] data, uint floatLength);
floatN, N = floatLength

class Shader: coneneko.scenegraph.Unit;
glsl

this(char[] vertexSource, char[] fragmentSource);


protected int getUniformLocation(char[] key);
使わない値には代入できないようなので注意

void setFloat(char[] key, float a);


void setInt(char[] key, int a);


void setVector(char[] key, float x, float y, float z, float w);


void setVector(char[] key, Vector a);


void setMatrixArray(char[] key, float* p, uint matrixLength);
Matrix[]

void setMatrixArray(char[] key, Matrix [] a);


uint getAttributeLocation(char[] key);


class Fbo: coneneko.units.Texture, coneneko.scenegraph.RenderTarget;


this(uint width, uint height, uint index, bool enableDepthBuffer);


protected void attachFramebuffer(ubyte attachmentIndex = cast(ubyte)0);


protected void detachFramebuffer();


class Renderbuffer;
fboのdepth

this(Fbo owner, uint width, uint height);


class FloatFbo: coneneko.units.Fbo;


this(uint width, uint height, uint index, bool enableDepthBuffer);


protected int internalformat();
GL_RGBA32F_ARB

protected uint dataType();
GL_FLOAT

float[] floatPixels();


uint[] pixels();
4倍のサイズになる

class Disable: coneneko.scenegraph.Unit;


uint cap;


this(uint cap);


interface VirtualSizeUnit: coneneko.scenegraph.Unit;
左上(0, 0)、右下(virtualWidth, virtualHeight)、windowサイズに依存しない

class Quadrangle: coneneko.units.VirtualSizeUnit;


int x;


int y;


int width;


int height;


Vector color;


float tcX;


float tcY;


float tcWidth;


float tcHeight;


this(int x, int y, int width, int height);


this(int x, int y, int width, int height, Vector color);


class AlphaBlend: coneneko.scenegraph.UnitMerger;


this();


class WindowRgba: coneneko.scenegraph.Rgba;


this(Window wnd);


class ProgressBar: coneneko.scenegraph.UnitMerger;


this(uint x, uint y, uint width, uint height, Vector foreColor, Vector backColor);


void value(float a);
0.0 <= value <= 1.0

float value();
0.0 <= value <= 1.0

class VirtualMousePoint: coneneko.scenegraph.MousePoint, coneneko.units.VirtualSizeUnit;


this(Window wnd);


bool isInner(int rectX, int rectY, int rectWidth, int rectHeight);


class LineQuadrangle: coneneko.units.VirtualSizeUnit;


int x;


int y;


int width;


int height;


Vector color;


this(int x, int y, int width, int height);


this(int x, int y, int width, int height, Vector color);


class BlendQuadrangle: coneneko.units.Quadrangle;


this(int x, int y, int width, int height, Vector color = (create)(1F,1F,1F,1F));



Page generated by Ddoc.