• 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.

Adrian Bibby Walther

Members
  • Content count

    7
  • Joined

  • Last visited

Community Reputation

112 Neutral

About Adrian Bibby Walther

  • Rank
    Newbie

Personal Information

  • Location
    Denmark
  1. I have been trying to solve this for some time, but after googling and googling, again ang again. I finally decided to post it here. I use the following code to load a texture into OpenGL, using DevIL: [CODE] bool CImage::Load(const std::string &File){ Clear(); ILuint Image; ilGenImages(1,&Image); ilBindImage(Image); ilLoadImage(File.c_str()); if(ilGetInteger(IL_IMAGE_ORIGIN) == IL_ORIGIN_LOWER_LEFT) iluFlipImage(); Tex = ilutGLBindTexImage(); Width = ilGetInteger(IL_IMAGE_WIDTH); Height = ilGetInteger(IL_IMAGE_HEIGHT); int W,H; glGetTexLevelParameteriv(GL_TEXTURE_2D,0,GL_TEXTURE_WIDTH,&W); glGetTexLevelParameteriv(GL_TEXTURE_2D,0,GL_TEXTURE_HEIGHT,&H); ilDeleteImages(1,&Image); return Tex != 0; } [/CODE] My problem is that after the texture is loaded, it only has a size of 1*1 ie. one pixel, which it 512 times smaller than the actual image. The pixel is the same color as the top left pixel in the actual image, so I know that some of the data is loaded. If you want you can download the code here, and check it out: [attachment=10879:Engine.zip] PS: I don't know if this fits in this forum. It kind of has to do with OpenGL, and kind of doesn't.
  2. OpenGL

    [quote name='V-man' timestamp='1338384608' post='4944664'] Are you sure glGetError doesn't detect any problems? Also, what is your GL version? [/quote] This time, errors did appear. I traced (due to the lack of a better word) it back to the SDL OpenGL configuration: I apparently didn't enable SDL_GL_MULTISAMPLEBUFFERS. ~Solved
  3. OpenGL

    Turns out I only fixed the code for "power of 2"-textures. My graphics card does support GL_ARB_texture_non_power_of_two, and in my other project it worked absolutely fine.
  4. OpenGL

    After fiddling around with the code for a bit, it appears that I've solved the problem. I don't know what caused it though.
  5. OpenGL

    wglGetCurrentContext() doesn't return NULL. I don't know if there is more to check than that.
  6. OpenGL

    Here you go: [CODE] Clear(); SDL_Surface *Surf = IMG_Load(File.c_str()); if(!Surf) return false; GLenum Mode = GL_RGB; if(Surf->format->BytesPerPixel == 4){ Mode = GL_RGBA; } Width = Surf->w; Height = Surf->h; glGenTextures(1,&Tex); glBindTexture(GL_TEXTURE_2D,Tex); glTexImage2D(GL_TEXTURE_2D,0,Mode,Width,Height,0,Mode,GL_UNSIGNED_BYTE,Surf->pixels); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); int Min,Mag; glGetTexParameteriv(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,&Min); glGetTexParameteriv(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,&Mag); SDL_FreeSurface(Surf); glBindTexture(GL_TEXTURE_2D,0); [/CODE]
  7. OpenGL

    I'm using SDL_image to load textures for my game, I then try to load them into OpenGL using glTexImage2D. Using the following code I've found out, that the problem lies in glTexImage2D, as it simply does nothing. (at least the width and height of the texture remains unchanged) [CODE] int ID,Width,Height; glGetIntegerv(GL_TEXTURE_BINDING_2D,&ID); glGetTexLevelParameteriv(GL_TEXTURE_2D,0,GL_TEXTURE_WIDTH,&Width); glGetTexLevelParameteriv(GL_TEXTURE_2D,0,GL_TEXTURE_HEIGHT,&Height); std::cout << ID << ": " << Width << "*" << Height << std::endl; [/CODE] The weird thing is that I have another program, and it uses the exact same code, but it works in that program. glGetError returns 0 ie no error. The code loading the texture and all is compiled and linked into a static library, and I have a test project that links with it, so I can see, if the code I've written works or not.