Exemplo n.º 1
0
        private void PrepareState_Texture_Common(GpuStateStruct gpuState)
        {
            var textureMappingState = gpuState.TextureMappingState;
            //var ClutState = &TextureMappingState->ClutState;
            var textureState = textureMappingState.TextureState;

            if (!GL.EnableDisable(GL.GL_TEXTURE_2D, textureMappingState.Enabled))
            {
                return;
            }

            if (VertexType.Transform2D)
            {
                PrepareState_Texture_2D(gpuState);
            }
            else
            {
                PrepareState_Texture_3D(gpuState);
            }

            //GL.PixelStore(PixelStoreParameter.UnpackAlignment, 1);
            //glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

            RenderbufferManager.TextureCacheGetAndBind(gpuState);
            //CurrentTexture.Save("test.png");

            //GL.glTexEnv(TextureEnvTarget.TextureEnv, TextureEnvParameter.TextureEnvMode, (int)TextureEnvModeTranslate[(int)TextureState->Effect]);
        }
Exemplo n.º 2
0
 void IInjectInitialize.Initialize()
 {
     RenderbufferManager = new RenderbufferManager(this);
     TextureCache        = new TextureCacheOpengl(Memory, this, InjectContext);
     VertexReader        = new VertexReader();
 }