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

ArgusMaker

Members
  • Content count

    80
  • Joined

  • Last visited

Community Reputation

102 Neutral

About ArgusMaker

  • Rank
    Member
  1. Hi there. I would like to optimize the double buffer rendering system I made in win32 c++ programming with gdi+. So far I created an offscreen static bitmap surface and a global Graphics object to draw onto it. The problem is, every time I want to update the HDC of my window i need to create a new Graphic object and destroy it at the end of the event, like this: ... case WM_PAINT: hdc = BeginPaint(hWnd,&ps); graphics = Graphics(hdc); graphics.DrawImage(backbuffer,0,0,width,height); EndPaint(hWnd,&ps); break; ... //graphics gets destroyed at the end of WndProc   Since this operation is repeated almost 40 times per second, i was wondering wether creating and destroying every time that object would somehow slow down my program. Maybe this solution would be better: - using a new compatible HDC as the backbuffer instead of the BMP - inside WM_PAINT, copy that with BitBlt instead of creating a Graphics object What do you think?
  2. OpenGL

    it works fine now, thanks!!
  3. Hi there! I'm programming in C++ - Win32 exe application environment. My exe makes use of OpenGL and glew, so it needs glew32.dll to be in System folder or in the same directory of my exe. What if i want to publish my exe without that additional DLL? Is there a way to include the DLL inside the EXE?
  4. Hi! I'm pretty new to OpenGL. I'd like to draw a line with a color gradient ranging from red to blue, but i can't give a color to my always-white vertices! I'm using a Vertex Buffer Object to render the line. This is my code. This is executed once at the beginning [CODE] GLuint VBuffer; GLuint CBuffer; GLfloat Vertices[] = { 0.0f,0.0f, //0,0 100.0f,100.0f, //100,100 2.0f,2.0f, 3.0f,3.0f }; // the line will be rendered using the first two vertices GLfloat Colors[] = { 1.0f,0.0f,0.0f,1.0f, //red 0.0f,0.0f,1.0f,1.0f, //blue 1.0f,0.0f,0.0f,1.0f, 1.0f,0.0f,0.0f,1.0f }; //the line will be rendered using the first two colors glGenBuffers(1,&VBuffer); glBindBuffer(GL_ARRAY_BUFFER,VBuffer); glBufferData(GL_ARRAY_BUFFER,sizeof(GLfloat)*8,Vertices,GL_DYNAMIC_DRAW); glGenBuffers(1,&CBuffer); glBindBuffer(GL_COLOR_BUFFER_BIT,CBuffer); glBufferData(GL_COLOR_BUFFER_BIT,sizeof(GLfloat)*16,Colors,GL_DYNAMIC_DRAW); [/CODE] When i render the line i use this code: [CODE] glBindBuffer(GL_ARRAY_BUFFER,VBuffer); glVertexPointer(2,GL_FLOAT,0,BUFFER_OFFSET(0)); glBindBuffer(GL_COLOR_BUFFER_BIT,CBuffer); glColorPointer(4,GL_FLOAT,0,BUFFER_OFFSET(0)); glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_COLOR_BUFFER_BIT); glDrawArrays(GL_LINES,0,2); glDisableClientState(GL_COLOR_BUFFER_BIT); glDisableClientState(GL_VERTEX_ARRAY);[/CODE] Yet the line is completely white. What is wrong?
  5. [spoiler] Hi there! I migrated from Direct3D to OpenGL a few days ago, i'm trying to obtain my first rendering. I already have a problem around using VBOs. [CODE]GLuint VertexBuffer; glGenBuffers(1,&VertexBuffer);[/CODE] Visual C++ generates this error: First-chance exception at 0x00000000 in myprogr.exe: 0xC00000005: Access violation execeuting location 0x00000000 within "glGenBuffers" line. The entire source is: [CODE] void InitOpenGL() { hDC = GetDC(GameWindow); PIXELFORMATDESCRIPTOR pfd; ZeroMemory(&pfd,sizeof(pfd)); pfd.nSize = sizeof(pfd); pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; pfd.nVersion = 1; pfd.iPixelType = PFD_TYPE_RGBA; pfd.cColorBits = 32; pfd.cDepthBits = 24; pfd.iLayerType = PFD_MAIN_PLANE; int pixelFormat = ChoosePixelFormat(hDC,&pfd); SetPixelFormat(hDC,pixelFormat,&pfd); hRC = wglCreateContext(hDC); wglMakeCurrent(hDC,hRC); GLuint VertexBuffer; glGenBuffers(1,&VertexBuffer); }[/CODE] InitOpenGL is called inside WinMain, just before the beginning of the main loop (while(1) {...} ) where windows messages are controlled and rendering is processed. I've already checked my OpenGL version (glGetString(GL_VERSION) returns "2.1.8395 Release") against OpenGL specifications and glGenBuffers should be supported..[/spoiler] edit: Never mind! I had to place glewInit() after the activation of OpenGL.
  6. Hi there. I have a variable with a pointer to my Direct3DDevice9 (IDirect3DDevice9* pd3dDevice) and i know my code may modify its value. How can i quickly test if pd3dDevice actually points to a valid device?
  7. What do you mean?
  8. Hi there! I made an exe which loads an fx hsls shader effect file. It works properly as long as i execute it in windows 32bit, yet when i try in 64bit the effect file is no longer loaded. D3DXCreateEffectFromFile leaves my [color=#000000][font=Consolas, Courier, monospace][size=3]LPD3DXEFFECT NULL and does not return any of the following values: D3D_OK,[/size][/font][/color][color=#2A2A2A]D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA, E_OUTOFMEMORY. Still the exe and the fx files are the same![/color] [color=#2A2A2A][img]http://public.gamedev.net//public/style_emoticons/default/wacko.png[/img] What's going on?[/color]
  9. Ok, i forced sketchup to triangulate faces, now my importer works fine, thanks
  10. Already tried with some obj models exported from sketchup. It doesen't work. I'm starting to believe sketchup doesent export obj well.
  11. Hello I want to develop an OBJ importer class in DirectX. I know there already is one created by microsoft but it simply doesen't satisfy me since i tried it with lots of obj models and barely two result correctly loaded. BUT there is still one thing about obj files that i don't understand. When a new line begins with 'f' it means that a list of vertices ID defining a face will follow, so i expect to find three IDs (eg: 1/1/1, 2/2/1, 3/3/1), instead, i find a variable number of indices, often greater than 3. The point is, how should i consider the vertex indices when they are more than 3? They are not supposed to be drawn with trianglestrip/fan/list method, i tried.
  12. Yes, but i had to guarantee up to 30 lights, and each pixel shader has a limited number of mathematical functions available. Thank you anyway
  13. Ok thank you, i'm understanding a little bit more about directx every day with such little questions. How useful is this forum!
  14. Tnaks! Useful as usual! It works fine, but.. could you please just explain me why you made me turn the zbuffer off?
  15. ok i wrote this to prepare the device to draw in blending mode, it still only shows the second light. Maybe I forgot something? [CODE] pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE,FALSE); pd3dDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL); pd3dDevice->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_ONE); pd3dDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_ONE);[/CODE] Of course I restored the render states to the right values after rendering the second pass..