Search found 5 matches

by Odin
Wed Aug 22, 2012 5:46 am
Forum: Programming Discussion
Topic: OpenGL/TK Texture Animation Problems
Replies: 1
Views: 1524

OpenGL/TK Texture Animation Problems

Yay another problem :I sorry just keep running into problems i can't seem fix myself :] I have been re-writing my game engine and wanted to move away from the problem I'm having now. I have a class that takes care of my animations per texture/tileSet C# tile class snippet... /* X = _x; Y = _y; _size...
by Odin
Sat Aug 18, 2012 2:34 am
Forum: Programming Discussion
Topic: [Solved] OpenTK Static VBO Help
Replies: 7
Views: 3913

Re: OpenTK Static VBO Help

I just don't like handling all of the data in a vertex struct :/ struct vertex { public float x, y, z, s, t; public vertex(float _x, float _y, float _z, float _s, float _t) { x = _x; y = _y; z = _z; s = _s; t = _t; } } vertex[] _vertices = { new vertex(-1.0f, -1.0f, 0.0f, 0.0f, 1.0f), new vertex( 1....
by Odin
Fri Aug 17, 2012 1:18 am
Forum: Programming Discussion
Topic: [Solved] OpenTK Static VBO Help
Replies: 7
Views: 3913

Re: OpenTK Static VBO Help

I think i know what you mean, i fixed the problem. i was binding textureCoords to the TextureBuffer changed that to write to ArrayBuffer instead //load GL.GenBuffers(1, out vertexBuffer); GL.BindBuffer(BufferTarget.ArrayBuffer, vertexBuffer); GL.BufferData(BufferTarget.ArrayBuffer, (IntPtr)(vertices...
by Odin
Thu Aug 16, 2012 2:00 am
Forum: Programming Discussion
Topic: [Solved] OpenTK Static VBO Help
Replies: 7
Views: 3913

Re: OpenTK Static VBO Help

Well here is my actual class i tried cutting it down in the first post for convenience with the problem :P public class e2Rect { private float[] vertices = { -1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, 1.0f, 0.0f }; private float[] textureCoords = { 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, ...
by Odin
Tue Aug 14, 2012 12:59 am
Forum: Programming Discussion
Topic: [Solved] OpenTK Static VBO Help
Replies: 7
Views: 3913

[Solved] OpenTK Static VBO Help

I'm having a problem learning to use VBO's mainly drawing, Hoping that someone with alot more experience with OpenGL/TK can help. This is the working code (pseudo C#) i used the OpenTK static vbo example for a template to VBO's but didn't want to use interleaved arrays or a vertex struct float[] ver...