• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

103 Neutral

About addiem7c5

  • Rank
  1. Visual Studio wasn't updating my .dll file, that is the cause of this problem. It is fixed now.
  2. I am having troubles getting texturing working in my OpenTK/OpenGL 3.3 code. I am sure it is something simple that I am missing, but I just can't seem to get a texture on the square I am rendering. (I'm writing a rendering framework for a game). The relevant code pieces are: //setup Texcoord array. GL.BindBuffer(BufferTarget.ArrayBuffer, VertexBufferObject[2]); GL.BufferData<float>(BufferTarget.ArrayBuffer, (IntPtr)(sizeof(float) * texcoord_information.Count), texcoord_information.ToArray(), BufferUsageHint.StaticDraw); GL.EnableVertexAttribArray(2); GL.VertexAttribPointer(2, 2, VertexAttribPointerType.Float, false, 0, 0); GL.BindBuffer(BufferTarget.ArrayBuffer, 0); //Set up our textures for(int i = 0; i < Textures.Count; i++) { Console.WriteLine("Preparing texture."); Uniform_To_Texture[GL.GetUniformLocation(Shader.GetProgram(), "diffuse")] = Textures[i]; } //Render int texture_unit = 0; foreach (KeyValuePair<int, ITexture> kvp in Uniform_To_Texture) { GL.Uniform1(kvp.Key, texture_unit); GL.ActiveTexture(TextureUnit.Texture0 + texture_unit); GL.BindTexture(TextureTarget.Texture2D, kvp.Value.GetTextureHandle()); texture_unit++; } if (!GL.IsVertexArray(VertexArrayObject)) throw new OpenGLException("Vertex Array Object not set up correctly, cannot render!"); GL.BindVertexArray(VertexArrayObject); GL.DrawArrays(BeginMode.Triangles, 0, Vertices.Count); GL.BindVertexArray(0);   Then the vertex and fragment shaders are: //Vertex shader #version 330 uniform mat4 viewmatrix, projmatrix, transformmatrix; in vec3 position; in vec3 normal; in vec2 texcoord; varying vec2 texturecoord; void main() { texturecoord = texcoord; gl_Position = projmatrix * viewmatrix * transformmatrix * vec4(position, 1.0) ; } //Fragment Shader #version 330 uniform sampler2D diffuse; varying vec2 texturecoord; out vec4 color; void main(void) { color = texture2D(diffuse, texturecoord); }   The square I am rendering is just coming up white, if that helps any. 
  3. OpenGL

    [quote name='karwosts' timestamp='1297362056' post='4772467'] Have you stepped through line by line and verified that all your values are good and valid? Didn't forget to initialize numberofvertices or anything stupid like that? [/quote] Hah. Hah. It would have been that of course. I must've been tired or something last night, I forgot to copy number of vertices and number of indices over. That did the trick. It's a good feeling that I knew how to do VBOs, but didn't know how to pass arguments into a function XD Thanks for your help!
  4. OpenGL

    [quote name='JimmyDeemo' timestamp='1297339661' post='4772313'] Ok i might not know much about this but here goes. Doesn't the index data need to be stored in sequentially in memory? Does boost::shared_array do this? Try your vertex and index data in a std::vector<GLfloat> and std::vector<GLuint> respectively and then filter that type through the creation of the VBOs. See if that renders what you expect. From what i am aware the latest spec of std::vector make sure that the data is in sequential order. [/quote] I am fairly sure boost::shared_array keeps contiguous memory, since you new a pointer and give it to shared_array to manage it as a smart pointer. Just for the sake of checking it though, I did change them to vectors and it still doesn't render. Thanks for the idea, though
  5. OpenGL

    Oh yeah, I forgot to add that. I was checking glGetError(), and it was returning 0. I'm very baffled. Edit: I also threw in a couple fixed function pipeline calls just to see if anything was rendering. A red triangle showed up, just as it should have. Edit 2: I am actually using the data that I'm putting in the VBO on the FFP, and it's rendering correctly.
  6. Hello everyone, It's been a long while since I last posted here, so long that I forgot my old username/password. Ah well. I am very far behind in OpenGL spec, and am getting off the fixed function pipeline. I've been trying to get Vertex Buffer Objects to render to no avail. Could someone tell me what is wrong with this code? [code] //m_indices is a boost::shared_array<unsigned int> //m_vertices is a boost::shared_array<vertexinformation> where vertex information is: struct vertexinformation { float px, py, pz; float nx, ny, nz; float t1x, t1y; float t2x, t2y; float t3x, t3y; float t4x, t4y; float t5x, t5y; }; //This is in my initialization glGenBuffers(1, &m_vertexbufferobject); glGenBuffers(1, &m_indexbufferobject); glBindBuffer(GL_ARRAY_BUFFER, m_vertexbufferobject); glBufferData(GL_ARRAY_BUFFER, m_numberofvertices * 16 * sizeof(float), m_vertices.get(), GL_STATIC_DRAW); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexbufferobject); glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_numberofindices * sizeof(unsigned int), m_indices.get(), GL_STATIC_DRAW); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); //Render Code glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glBindBuffer(GL_ARRAY_BUFFER, m_vertexbufferobject); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_FLOAT, 64, 0); glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(GL_FLOAT, 64, BUFFER_OFFSET(3*sizeof(float))); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexbufferobject); glDrawElements(GL_TRIANGLES, m_numberofindices, GL_UNSIGNED_INT, 0); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); glBindBuffer(GL_ARRAY_BUFFER, 0); glfwSwapBuffers(); [/code] What it should be drawing is a quad consisting of two triangles. The vertices specified are the four corners, and the indices specified are the two triplets of vertices to create the triangle. Can anyone see anything wrong with any of this? Thanks -Addie