Jump to content
  • Advertisement

Bob Wade

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

120 Neutral

About Bob Wade

  • Rank
    Newbie

Personal Information

  • Interests
    Programming
  1. Bob Wade

    Laptop problem

    Hey, Long time since I last posted here but anyway. I'm going on a trip next month and wanted to take my laptop with me (for occasional programming), but it doesn't seem to start. Last time I used it was maybe 3-4 years ago, it's a laptop from like 2006 or something. I have no battery on the laptop since it died years ago also had to replace the charger cable (or whatever you call it) like 6 years ago when the old one died. It's old HP laptop. When the power cable is plugged in the input port has blue light lit, but whenever I press the power button the hotbar lights flash for less than a second and the power indicator flashes too. After that though the power cable light pulses (doesn't flash) for few seconds. The model is HP Pavilion dv6700 I was thinking could a dead CMOS battery cause this or some piece of hardware has died? Last time I used it, it worked fine (3-4 years ago). Anyone have any idea or something I could try to figure out what's wrong? I'm leaving in two weeks. EDIT: Googling about it atm, but thanks if someone has some idea EDIT2: I guess it's a common problem with that laptop because of bad cooling system on MB
  2. Bob Wade

    C++ Graphics Library

    I'd recommend SFML. Although personally I'd recommend OpenGL but since you want to do a 2D, SFML or SDL2. I haven't used SDL2 only SDL many years ago, been experimenting with SFML occasionally and so far I like it more than SDL I used years ago. You should surely check it out some day if not now
  3. Bob Wade

    VBO rendering issues

    Thanks for the reply, I double checked .data() and .front() and got it working with: void CCore::DrawModel(Model_OBJ model, float x, float y, float z) { ... glBindBuffer(GL_ARRAY_BUFFER,model.vbo_vertices); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3,GL_FLOAT,0,0); // instead of // glVertexPointer(3,GL_FLOAT,0,&model.vertices.front()); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,model.ibo); glDrawElements(GL_TRIANGLES,model.elements.size(),GL_UNSIGNED_SHORT,NULL); glDisableClientState(GL_VERTEX_ARRAY); glBindBuffer(GL_ARRAY_BUFFER,0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); ... }
  4. Bob Wade

    VBO rendering issues

    Didn't cross my mind tbh, I copied stuff from my old project.. haven't been programming in a long long time...   I'll try that when I get a chance, thanks
  5. Bob Wade

    Starting Game-Dev

    If you want to use either Unity or UE4, go with Unity. It's slightly easier to understand and to get in to. UE4 somewhat more complicated (atleast in my opinion). But for a platformer, definitely Unity unless you feel adventurous
  6. Hey.   I've been trying to get my rendering working but I'm sure I'm missing something and I can't see what I'm doing wrong here.. struct Model_OBJ { vector<GLfloat> vertices; vector<GLushort> elements; GLuint vbo_vertices; GLuint ibo; }; Init: glGenBuffers(1,&Model[i].ibo); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,Model[i].ibo); glBufferData(GL_ELEMENT_ARRAY_BUFFER,Model[i].elements.size() * sizeof(GLushort),Model[i].elements.data(),GL_STATIC_DRAW); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); glGenBuffers(1,&Model[i].vbo_vertices); glBindBuffer(GL_ARRAY_BUFFER,Model[i].vbo_vertices); glBufferData(GL_ARRAY_BUFFER,Model[i].vertices.size() * sizeof(GLfloat),Model[i].vertices.data(),GL_STATIC_DRAW); glBindBuffer(GL_ARRAY_BUFFER,0); Render: this doesn't draw the model void CCore::DrawModel(Model_OBJ model, float x, float y, float z) { ... glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,model.ibo); glBindBuffer(GL_ARRAY_BUFFER,model.vbo_vertices); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3,GL_FLOAT,0,&model.vertices.front()); glDrawElements(GL_TRIANGLES,model.elements.size(),GL_UNSIGNED_SHORT,NULL); glDisableClientState(GL_VERTEX_ARRAY); glBindBuffer(GL_ARRAY_BUFFER,0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); ... } Render (alternative): this draws the model void CCore::DrawModel(Model_OBJ model, float x, float y, float z) { ... glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,model.ibo); //glBindBuffer(GL_ARRAY_BUFFER,model.vbo_vertices); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3,GL_FLOAT,0,&model.vertices.front()); glDrawElements(GL_TRIANGLES,model.elements.size(),GL_UNSIGNED_SHORT,NULL); glDisableClientState(GL_VERTEX_ARRAY); //glBindBuffer(GL_ARRAY_BUFFER,0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); ... } Am I storing the VBO data somehow wrong? I've googled alot but I can't figure out what's the problem.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!