Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: the bottom is not drawn on: 2005-04-10 15:33:59
Quote
hmm maybe i should delet the comments from the bottom...
its the same bottom size like a quad... so i copied it ...
but it is the bottom of the pyramide....


The comments don't matter, they're not processed. My guess is that the system becomes confused once it stops doing triangles because of the extra vertex. At any rate, doing it the way I posted makes it work (whereas doing it the way you did doesn't render the bottom to me either).

Here, check this out:
2  Java Game APIs & Engines / JOGL Development / Re: the bottom is not drawn on: 2005-04-10 12:15:55
I can't believe I'm the one replying to a request for help, I'm greener than glColor3f(0.0f,1.0f,0.0f)! ^^;

Anyways, you should try not doing this in a single glBegin/end section. If you split triangles from quads it works fine:

       gl.glBegin(GL.GL_TRIANGLES);      // Drawing Using Triangles
         gl.glColor3f(1.0f,0.0f,0.0f);   // Red
         gl.glVertex3f( 0.0f, 1.0f, 0.0f);   // Top Of Triangle (Front)
         gl.glColor3f(0.0f,1.0f,0.0f);   // Green
         gl.glVertex3f(-1.0f,-1.0f, 1.0f);   // Left Of Triangle (Front)
         gl.glColor3f(0.0f,0.0f,1.0f);   // Blue
         gl.glVertex3f( 1.0f,-1.0f, 1.0f);   // Right Of Triangle (Front)
         gl.glColor3f(1.0f,0.0f,0.0f);   // Red
         gl.glVertex3f( 0.0f, 1.0f, 0.0f);   // Top Of Triangle (Right)
         gl.glColor3f(0.0f,0.0f,1.0f);   // Blue
         gl.glVertex3f( 1.0f,-1.0f, 1.0f);   // Left Of Triangle (Right)
         gl.glColor3f(0.0f,1.0f,0.0f);   // Green
         gl.glVertex3f( 1.0f,-1.0f, -1.0f);   // Right Of Triangle (Right)
         gl.glColor3f(1.0f,0.0f,0.0f);   // Red
         gl.glVertex3f( 0.0f, 1.0f, 0.0f);   // Top Of Triangle (Back)
         gl.glColor3f(0.0f,1.0f,0.0f);   // Green
         gl.glVertex3f( 1.0f,-1.0f, -1.0f);   // Left Of Triangle (Back)
         gl.glColor3f(0.0f,0.0f,1.0f);   // Blue
         gl.glVertex3f(-1.0f,-1.0f, -1.0f);   // Right Of Triangle (Back)
         gl.glColor3f(1.0f,0.0f,0.0f);   // Red
         gl.glVertex3f( 0.0f, 1.0f, 0.0f);   // Top Of Triangle (Left)
         gl.glColor3f(0.0f,0.0f,1.0f);   // Blue
         gl.glVertex3f(-1.0f,-1.0f,-1.0f);   // Left Of Triangle (Left)
         gl.glColor3f(0.0f,1.0f,0.0f);   // Green
         gl.glVertex3f(-1.0f,-1.0f, 1.0f);   // Right Of Triangle (Left)
       gl.glEnd();      // Finished Drawing The Pyramid
       gl.glBegin(GL.GL_QUADS);      // Drawing Using Quads
         gl.glColor3f(1.0f, 1.0f, 1.0f);
         gl.glVertex3f( 1.0f,-1.0f, 1.0f);   // Top Right Of The Quad (Bottom)
         gl.glVertex3f(-1.0f,-1.0f, 1.0f);   // Top Left Of The Quad (Bottom)
         gl.glVertex3f(-1.0f,-1.0f,-1.0f);   // Bottom Left Of The Quad (Bottom)
         gl.glVertex3f( 1.0f,-1.0f,-1.0f);
       gl.glEnd();      // Finished Drawing The Quad
3  Java Game APIs & Engines / JOGL Development / Re: DemoBox demos added! on: 2005-04-10 07:23:12
Quote
Nope. The exporter is C++ and only runs under Windows. As does Milkshape Smiley

I'm working on an example on how to load models + animation from my exportet format. *in java*


Good to hear. Smiley I'll have to make a demo game of sorts starting to learn opengl from scratch, and I surmise it would be much easier if I could do it not making every single 3d object from scratch as well, so a modelling tool seems in order. Of course, to make things more complicate, I'm used to work with java, hence the adoption of jogl. ^^;
4  Java Game APIs & Engines / JOGL Development / Re: DemoBox demos added! on: 2005-04-09 09:41:28
Thank you. It's not that I'd need the source to use the exporter, anyway? This one exports *to* java, but does it need Java to export? To call it up, for example?
5  Java Game APIs & Engines / JOGL Development / Re: DemoBox demos added! on: 2005-04-08 13:00:02
Some things about the demobox...

When switching to or from it, it turns into a cpu hog! What gives?

The Shaded Teapot looks very beautiful. Did you know that you can see the exterior of the pot through the hole of its beak?

[edit: About the milkshape exporter...the readme says "source" but there's but a dll inside the zip...?]
6  Java Game APIs & Engines / JOGL Development / Re: [Newbie] Colouring, Lighting, Texturing on: 2005-04-08 10:13:16
As an example of how I don't know the way things work, after enabling GL_COLOR_MATERIAL, lights work and colors show up (if I understand correctly, the material is what determines how a surface reflects lights, and the constant above enables management of such a property in terms of fill color and not just textures?), but I notice the light is a lot brighter everywhere. My guess would be that the pyramid is reflecting light and diffusing it, but I notice that this light is brighter even on the other side of the cube (see image below), so this brightness increase is not directional. If the behaviour before enabling GL_COLOR_MATERIAL is to be considered the default, then I wonder what exactly causes this variation.

(this picture *does* have shadows, they just are less evident. Check the right face of the cube)
7  Java Game APIs & Engines / JOGL Development / Re: [Newbie] Colouring, Lighting, Texturing on: 2005-04-08 09:02:12
Quote


Why not load models instead? That way it'll be the artists problem Smiley

Lot's of free model resources on the internet too.
I have some classes to easily load/display models of various format if you're interested.


It's just that I'm still learning everything from scratch, so...I don't even know what a model is. ^^;
It will probably come in handy for what I have to do, though. If it is not complicated, could you give me a brief explanation, or otherwise point me to one?
8  Java Game APIs & Engines / JOGL Development / Re: [Newbie] Colouring, Lighting, Texturing on: 2005-04-08 07:17:29
Quote
If you enable GL_COLOR_MATERIAL your vertex colors should work for the pyramid as well.



Thank you sir, once again you were most useful. That did the trick.

Guess next thing I'll look into is how to texture triangles, just so that the poor thing doesn't feel left out. ^^
9  Java Game APIs & Engines / JOGL Development / Re: [Newbie] Colouring, Lighting, Texturing on: 2005-04-08 06:09:30
Quote
You probably need to use the function
glTexEnv() to control how the colors from
the lights are combined with the colors
from the texture.


Thank you. I will look it up in the reference book (it's too bad that the javadoc for jogl is still in embryo form, though it's certainly of help sometimtes).

10  Games Center / Archived Projects / Re: Star Gauge (formally Exigent), v0.2.1a (update on: 2005-04-07 21:01:19
It is so fast it almost is too tough to play. Framerate at 75 all the time when running at 1280x960 whether fullscreen or windowed. Very well done. The game mechanics are rough but that's to be expected from an in-progress work, the engine is certainly sound though. Haven't had any problem running it. Sure, I have 1GB of ram, that might help a bit, but still. ^^

Keep up the good work.
11  Java Game APIs & Engines / JOGL Development / [Newbie] Colouring, Lighting, Texturing on: 2005-04-07 20:57:40
Greetings again, and thanks for the help provided so far.

I come again with some questions, this time concerning interaction between colors, lights and texturing.

I've been piling up the various tutorials at NeHe on the framework of the one in the "how to get started with jogl" in this very forum, and so far it's been fine. One problem I've found has come up when mixing textured and untextured polygons.

I made the colored pyramid and cube in the solid tutorial, and then decided to texture that same cube. At first, it would work but make the pyramid colored weird. So I thought of disabling the textures when the pyramid was being drawn and reenabling them for the cube, and it worked:


Then I did the lights and filters demo, which adds various filtered textures and, more importantly, lights, to the scene. This time, the trick of enabling and disabling hasn't been enough. If lights are on, it will look like this:


I did put some normals on the pyramid faces to get that reaction to the light (not sure if they're ok, probably wrong) otherwise it'd come out as if lights didn't touch the pyramid, but when I disable the lights, the colors appear just fine (mind that this happens because, as I said, I disable textures when drawing the pyramid and reenable them for the cube):


So, I believe there is some interaction between the textures, the lights and the colors, but I haven't been able to figure out a way to unbundle that. More importantly, I get the feeling that enable-disable isn't good programming, but then again I'm new to all this, so the answer might just be in front of my eyes and I just can't see. What do you make of it?

Thanks for your time in advance.
12  Java Game APIs & Engines / JOGL Development / Re: Really Newbie Puzzled by glTranslate on: 2005-03-31 05:59:38
Thank you, will do. I already downloaded the webstarted version of your demobox, anyway.  Wink


[edit: Yes, it was a matter of perspective, coupled with inexperience. At some point I had both failed to properly init perspective settings and tried to compensate by altering proportions, which had led to invisible and/or misplaced objects. Well, learning one stumble at a time. ^^;]
13  Java Game APIs & Engines / JOGL Development / Really Newbie Puzzled by glTranslate on: 2005-03-31 05:36:53
(reposted as a new thread because I noticed the "how to get started with jogl" thread was kind of old)

Greetings. As a novice to OpenGL, I humbly come with a bit of confusion in my mind.  

The example ("how to get started with jogl") worked pretty well for me. Then I went to NeHe's tutorial and I thought I'd include bits of that in this example, and sure enough, coloured triangles and quads were soon spinning on my window. But not everything went ok.

The three points of this thread:

1) The usual proportion for windows is 4:3 and so is the one proposed in this example, at 512x384. But that  kind of flattens the proportions of the objects, so how does one decouple the dimensions of the window from the ones of the drawing space?

2)NeHe uses a glTranslatef(float,float,float) line to translate (duh) stuff on the drawing space, but if I can't seem to make it work for the Z axis. Take the example in this thread exactly as it is and put a gl.glTranslatef(x,y,z) line before the glcolor. Changes to x and y will show up, but changes to z will be erratic. Between -1.0 and 1.0, it won't change at all, and any other value will make the triangle disappear. Is this something that requires more than the simple inits performed in this example, or is it something jogl-related?

(ok, I had forgotten the 3rd point)

3) Have the GL-types been implemented in jogl, or should one use standard java types?

Thanks for your time in advance.
14  Java Game APIs & Engines / JOGL Development / Re: How to: Getting started with JOGL on: 2005-03-30 17:52:27
Greetings. As a novice to OpenGL, I humbly come with a bit of confusion in my mind.

The example worked pretty well. Then I went to NeHe's tutorial and I thought I'd include bits of that in this example, and sure enough, coloured triangles and quads were soon spinning on my window. But not everything went ok.

The three points of this post:

1) The usual proportion for windows is 4:3 and so is the one proposed in this example, at 512x384. But that  kind of flattens the proportions of the objects, so how does one decouple the dimensions of the window from the ones of the drawing space?

2)NeHe uses a glTranslatef(float,float,float) line to translate (duh) stuff on the drawing space, but if I can't seem to make it work for the Z axis. Take the example in this thread exactly as it is and put a gl.glTranslatef(x,y,z) line before the glcolor. Changes to x and y will show up, but changes to z will be erratic. Between -1.0 and 1.0, it won't change at all, and any other value will make the triangle disappear. Is this something that requires more than the simple inits performed in this example, or is it something jogl-related?

(ok, I had forgotten the 3rd point)

3) Have the GL-types been implemented in jogl, or should one use standard java types?

Thanks for your time in advance.

Immano
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (114 views)
2014-11-26 15:22:04

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!