Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - bgilb

#1
Support / Re: Texturing problem
May 10, 2010, 10:58:54 PM
I am also having a problem with texturing. My cube is just showing up as one color instead of showing any texture.

private World world;
private FrameBuffer buffer;
private Object3D box;

public static void main(String[] args) throws Exception {
new HelloWorld().loop();
}

public HelloWorld() throws Exception {
world = new World();
world.setAmbientLight(0, 255, 0);

TextureManager.getInstance().addTexture("box", new Texture("res/grass.png"));

box = Primitives.getBox(4f, 4f);

box.build();
box.setTexture("box");
world.addObject(box);

world.getCamera().setPosition(50, -50, -5);
world.getCamera().lookAt(box.getTransformedCenter());
}


private void loop() throws Exception {
buffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_NORMAL);
buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
buffer.enableRenderer(IRenderer.RENDERER_OPENGL);

while (!org.lwjgl.opengl.Display.isCloseRequested()) {
box.rotateY(0.01f);
buffer.clear(java.awt.Color.BLUE);
world.renderScene(buffer);
world.draw(buffer);
buffer.update();
buffer.displayGLOnly();
Thread.sleep(10);
}
buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
buffer.dispose();
System.exit(0);
}
#2
Support / Canvas inside Panel in Swing
May 10, 2010, 03:02:08 AM
I'm trying to build a map editor, and was trying to find an elegant solution to intergrating the Canvas inside Swing. My crappy attempt resulted in failure. Any help on this? I couldn't really find anything in the wiki or forums.
#3
Projects / my freeware particle engine
April 13, 2005, 01:57:49 AM
alright, just wondering is there a way to change the color of a object3d?
#4
Projects / my freeware particle engine
April 11, 2005, 09:52:24 PM
this is bgilb btw just forgot to login :D
#5
Support / Tutorials!
April 07, 2005, 12:13:09 AM
Any chance someone can make a short tutorial on the workings of object matrices, camera matrices, and how to properly do all types of rotations and translations. Maybe then we can build on this and make a complete tutorial set
#6
Support / Engine Limitations?
January 19, 2005, 09:54:04 PM
it almost works, it just creates 2 windows now ( one thats empty but still has action listiner for mouse ) and then the graphics are in the new window ..
#7
Support / Engine Limitations?
January 18, 2005, 11:02:01 PM
quick question .. how do i enable Opengl properly? It seems the way im doing it isnt working because i dont get any fps gain at all, heres what i call:


buffer.enableRenderer(IRenderer.RENDERER_SOFTWARE, IRenderer.MODE_OPENGL);
buffer.usesRenderer(IRenderer.RENDERER_OPENGL);
#8
Support / Engine Limitations?
January 18, 2005, 01:09:16 AM
damnit i wish i woulda saw this polygonmanager earlier!!! thank you egon!
#9
Support / Engine Limitations?
January 18, 2005, 12:30:22 AM
its a mapeditor :O so im trying to be able to place tiles and such on he map ( changing its texture etc )

basically im trying to make a mapeditor like wc3
#10
Support / Engine Limitations?
January 18, 2005, 12:15:51 AM
then what could i do besides rebuilding the mesh? is there way to add and delete polys on runtime?
#11
Support / Engine Limitations?
January 17, 2005, 11:40:57 PM
well i fixed it by doing -Xmx1024m and it works but now it takes forever to load the map and every time i change the texture the rebuilding takes forever... right now for each texture its its own Object, would it be bad to make each tile its own object? sounds risky since that would be ( for the biggest map ) 65,000 objects
#12
Support / Engine Limitations?
January 17, 2005, 11:32:57 PM
im using JCreator and i added it under project settings where it says Command: and it says invalid heap size
#13
Support / Engine Limitations?
January 17, 2005, 11:27:34 PM
yeah i have no idea how to use command line stuff :O
#14
Support / Engine Limitations?
January 17, 2005, 11:08:52 PM
i get the error "OutOfMemory" sorry if i didnt say
#15
Support / Engine Limitations?
January 17, 2005, 09:35:54 PM
Im wondering why the maxtriangles for a Object3D exists, because it leaves me second guessing and having to use the max amount of triangles possible ( its somethign like 33,000 ) this seems like alot but im trying to make maps 512x512 tiles big. Now im not stupid and each tile isn't its own object3d.. instead i made each texture a object3d. Now is there anyway around this to allow me to have Much larger maps? the current limit only allows me 128x128 maps ( and at still very good FPS and such )