Jump to content

  • Log In with Google      Sign In   
  • Create Account


glu

Member Since 11 Sep 2011
Offline Last Active Apr 30 2013 04:11 PM
-----

Topics I've Started

OpenGL Change Window Drawing Size

31 March 2013 - 10:06 AM

Hey, I have no clue why this is such a huge problem, it should be extremely easy to fix, but I've spent hours looking on how to simply change the window from 0, 0 being the center and 1, 1 being the max to whatever I want, or in this case, the window width, and height. I have tried using glOrtho, and gluOrtho2D, but when I do, I get a black screen, nothing works.


This code SHOULD draw a perfect line across the screen, but doesn't do anything


gluOrtho2D(0, 800, 600, 0); //This is the code messing up, when I remove it, I get an imperfect line, but a line none the less.

glBegin(GL_LINE_STRIP);
glVertex2i(0, 0);
glVertex2i(800, 600);
glEnd();

Flash(AS3) Unable to Remove All Children

19 February 2013 - 06:42 PM

Hi, I'm making a game in Action Script, and I need to change levels. The current method I'm using for this, is removing all children from the first level, and then replacing them with the new children from the next level. It loads the children from the next level, and even appears to remove the ones from the first level, but it doesn't. When I move my player arround(which I shouldn't even be able to do since the player should have been deleted too), I will bump into the walls that I placed, even though the only things visible is from the new level. Here is my code for changing levels.

 

function changeLevel(id)
{
	trace(this.numChildren); //shows all my objects
	
	while(this.numChildren)
		this.removeChildAt(0);
	
	trace(this.numChildren); //shows 0 children
	
	addChild(new swfLoader().loadSWF("level\\" + id.toString() + ".swf")); //class i made for loading SWF files
	
	trace(this.numChildren); //shows children of new level
}

If no one posts anything, then I'll upload a video showing the problem.


OpenGL is missing functions

11 September 2011 - 11:31 AM

Hi, I'm learning OpenGL. I assumed this would be the best section to post this thread, because many games are made in OpenGL. There's no place to post this in my other forum, so yeah, I came here.

Anyways, here's the problem. I first off do not have glut.h I was first following some guy's tutorial, but quit because of missing functions(this video was from 2007). Then, I moved on to XoaX's video, and at first, I was missing glut.h, so I replaced it with
#include <gl/GL.h>
#include <gl/GLU.h>
Still, there were missing functions. I then opened a book I got, and turned to a random page, with a OpenGL function, and tried it, and it wasn't there. The thing is, is that he's using the same compiler, and IDE, and OS as me. I don't understand why it's not working. Not only that, but he didn't tell us to download any SDK, or anything at all.

Thanks for your help you guys.

PARTNERS